Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Help with JavaScript button / ADTECH

Contributor ,
Apr 04, 2019 Apr 04, 2019

Hi

I made an HTML5 banner ad in Animate which has a simple button with similar code to the following:

this.btn.addEventListener("click", fl_ClickToGoToWebPage);  function fl_ClickToGoToWebPage() {     window.open("http://www.adobe.com", "_blank"); }

This functions correctly but now the ad needs to be prepared for an Ad Server (ADTECH) and I have been sent the following example which demonstrates how the adserver tracks clicks:

var twitterButton = document.getElementById('twitter-button');

twitterButton.onclick = function() {

  ADTECH.click('Twitter', 'http://twitter.com/twittername');

}

Does anyone know how I can incorporate this into my current button, can I simply modify my existing code or will it need to be written differently?

Thanks for your help

139
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
no replies

Have something to add?

Join the conversation