Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  1. From within Google Web Designer, click the + button under Events to add a new event. 
     
  2. Select a target.

    This will be the element of the ad that will be clickable.
  3. Select an event. 
  4. Select Custom under Action
  5. Type a unique name into the field (next to gwd.) provided (e.g., appnexusClick). Then paste the code below into the text box provided (this is your clickTag code). 

    Code Block
    languagejs
    function getParameterByName(name) {
      var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search);
      return match && decodeURIComponent(match[1].replace(/\+/g, ' '));
    }
    window.open(getParameterByName('clickTag'), '_blank');

    Note
    Paste the code using your computer's menu bar as Google Web Designer has a known issue with key commands.
  6. Then click Click OK.
  7. Test (optional)

    Click Preview to open the ad in your browser. Add ?clickTag=http://yoururlhere.com at the of the URL in the address bar with the landing page you want to test. Refresh the page and click on the ad. A new window with the landing page you entered should open in your browser. When the ad is served, AppNexus sets the value of clickTag to AppNexus' click tracker and set a redirect to the landing page URL provided in Console.