AT Connect Adback implementation

You can deploy the AT Connect Adback integration in a few clicks by adding a simple JavaScript code to your site. Here is a list of the prerequisites for the proper operation of this integration:

  • Have an Adback account.
  • Tag Composer : Use the user id first-party in your smarttag.js (activated by default since version 5.10.0.).
  • Tag Composer : Enable callbacks in your smarttag.js (enabled by default).

Adback-cookies.jpgAdback-caalbacks.jpg

 

You will find below the JS code to integrate on your site:

----------------------------------------------------------------------------------------------------------- 

window.ATInternet = window.ATInternet || {};

window.ATInternet.Callbacks = window.ATInternet.Callbacks || {};

window.ATInternet.Callbacks.Adback = window.ATInternet.Callbacks.Adback || function(tag) {

  tag.onTrigger("Tracker:Hit:Sent:Error", (trigger, data) => {

    var hitAt = data.details.hit;

    var configSecure = tag.getConfig("secure");

    var protocolSecure = document.location.protocol === "https:";

    var isSecure = configSecure || protocolSecure;

    var protocol = "";

    if (hitAt.indexOf("http") != 0) { protocol = isSecure ? "https:" : "http:"; }

    hitAt = protocol + hitAt;   window.parent[window.parent.document.getElementById("adback_data").getAttribute("data-adback")].API().sendATInternetPixel(hitAt);

  });

};

window.ATInternet.Utils = window.ATInternet.Utils || {dispatchCallbackEvent: function() {}};

window.ATInternet.Utils.dispatchCallbackEvent("Adback");

----------------------------------------------------------------------------------------------------------- 

You can also find these elements in the AT Internet GitHub. Here is a direct link to the AT Connect Adback page: https://github.com/at-internet/atinternet-js-smarttag-adback

Have more questions? Submit a request