It's now possible to add your own preferred tracking for your NEXD Campaign Manager creatives. Please bear in mind that implementing this additional tracking layer to your NEXD Campaign Manager tags is a little bit on the technical side. If you have any questions after reading this article please feel free to reach out to the support team directly.

There's a number of reasons why you may want to add additional, third-party tracking to your creatives. You may, for example, have a partner agreement that requires tracking creatives using a specific platform. In any case, gathering tracking and analytics from more than one source is always good practice.
By gathering data from multiple sources it gives you a frame of reference to compare and contrast numbers.

Note: Adding a Global Pixel (third-party impression) tracker can drastically penalize your programmatic traffic reach. We strongly advise you to use third-party trackers only for interactions.

Implementation Methods

There are three methods for implementing 3rd party tracking for NEXD Campaign Manager generated tags:

  1. Javascript Method 1 (Simplest)
  2. Javascript Method 2 (Technical)
  3. Image Method (Simple)

Javascript Method 1 (Simplest)

Add one of the two parameters to the tag:

  • data-onEvent="[JSFunctionName]" - JSFunctionName Javascript function is gets called out, function has to be global. Every event initiation is called out on this function/url
  • data-onEvent-[EventName]="[JSFunctionName]" - EventName can be either Click, Gyro, CTR or something else. See our full list of events.

Extra parameter:

  • data-unique-events="[true/false]" - if your provided tracking is only called on unique events. (Default on URL true, JS function false)

JS Function will receive two arguments. Example for Javascript tracking:

<script>
window.adcEvents = function(category,action) {
sendMyEvent(category,action);
}
</script>
<ins class="adcads"
     data-adc-id="123456789012"
     ...
     data-onEvent="adcEvents"
     ...
</ins>                 

Example based on Google Analytics:

<script>
window.adcEvents = function(category,action) {
ga('send','event',category,action);
}
</script>
<ins class="adcads"
     data-adc-id="123456789012"
     ...
     data-onEvent="adcEvents"
     ...
</ins>

Javascript Method 2 (Technical)

All of our tags also send the event to our tag element, which you are able to grab easily, if you have a solid understanding of how Javascript works.

<script src="mraid.js"></script>
<ins class="adcads"
data-adc-id="123456789012"
     ...
</ins>
<script>
// Check that the data-adc-id is the same in the tag
document.querySelector('ins.adcads[data-adc-id="123456789012"]').addEventListener("adcanvas.event",function(e) {
/**
* variable data contains event information
* @param category {string} Category of the event
* @param action {string} Action of the event
* @param tag {object} Reference to the tag
* @param timestamp {int} Timestamp when the event was initiated
* @type {object}
*/
var data = e.data;
},false);
</script>

Example based on Google Analytics:

<script src="mraid.js"></script>
<ins class="adcads"
data-adc-id="123456789012"
     ...
</ins>
<script>
// Check that the data-adc-id is the same in the tag
document.querySelector('ins.adcads[data-adc-id="123456789012"]').addEventListener("adcanvas.event",function(e) {
/**
* variable data contains event information
* @param category {string} Category of the event
* @param action {string} Action of the event
* @param tag {object} Reference to the tag
* @param timestamp {int} Timestamp when the event was initiated
* @type {object}
*/
var data = e.data;
ga('send', 'event', data.category, data.action);
},false);
</script>

Image Choice (Simple)

Add to one of the two parameters to the tag:

  • data-onEvent="[URL]" - URL gets called out, function has to be global. Every event initiation is called out on this function/url
  • data-onEvent-[EventName]="[URL]" - EventName can be either Click, Gyro, CTR or something else. See our full list of events.

Extra parameter:

  • data-unique-events="[true/false]" - if your provided tracking is only called on unique events. (Default on URL true, JS function false)

With URL it's even easier, you only have to add:

<ins class="adcads"
     ...
     data-onEvent="https://track.adform.net/adfserve/?bn=CREATIVEID;1x1inv=1;srctype=3;ord=[timestamp]"
    ...

URLs can be also populated with Category name and Action name with macros {eventCategory} and {eventAction}.

Did this answer your question?