Skip to main content

How to add Adinton's scripts in your site

Adinton works with two scripts:

  1. Common Tracker
  2. Events Tracker

Common Tracker

The primary purpose of the Common Tracker pixel is to monitor page views.

<script>
window.adintonSettings = {
app_ns: 'demo-account',
email : "customer@example.com"
};
var _adn=_adn||[]; adnv = decodeURIComponent((new RegExp('[?|&]_adnv=([^&;]+?)(&|#|;|$)').exec(location.search)||[,""])[1].replace(/\+/g, '%20'))||"";
cName = ""; acc = ""; if (adnv=="") { cookArr = document.cookie.split('; '); for (bb = 0; bb < cookArr.length; bb++) { if (cookArr[bb].split('=')[0] == 'adsmkt_ns') acc = unescape(cookArr[bb].split('=')[1]).replace(/ +$/, '');} }
_adn.push(['_setDomain',document.domain],['_setAdnv', adnv],['_setNamespace', window.adintonSettings.app_ns],['_setAccount', acc]);
(function(){function oCallback(){adnL=true;adnConv();} var adn=document.createElement('script');adn.type='text/javascript';adn.async=1;adn.onload=oCallback;adn.src='https://prod.adinton.com/tag/tags?dn='+_adn[0][1]+'&adnv='+_adn[1][1]+'&ns='+_adn[2][1]+'&acc='+_adn[3][1];adn.id='adn'; document.getElementsByTagName('head')[0].appendChild(adn,oCallback);})();
</script>

If you aim to track auto-logins on your website, we suggest replacing the "customer@example.com" value with the variable you use to store the email addresses of users who access your site while logged in.

Events Tracker

The Events Tracker pixel is designed to track both micro-conversions and main conversions.

<script>(function(){
_adn.push(['_cparams', {"conversion_type":"purchase","email":"customer@example.com","amount":"1.01","transaction_id":"0000000001"}]);
adn_mconv=true; adn_cfimg=0; function adnConversionFunction() { if (typeof adnConv=='function') adnConv();
else{ var re=new RegExp("adsmkt_"+_adn[4][1]+"=([^;]+)"); var value=re.exec(document.cookie);}} adnConversionFunction();
})()</script>
  • conversion type: Define your conversion: Purchase, lead,...
  • email: Enter the email variable. Adinton will capture the email of the user completing the purchase. Alternatively, Adinton can record a user-id or another hashed or encrypted value.
  • amount: Input the purchase value.
  • transcation_id: Provide the transaction id value.

None of these four fields are mandatory; Adinton can operate seamlessly without them.

However, with this data, Adinton can differentiate between recurring and new revenue, and adjust attribution calculations based on whether it's analyzing a new or returning customer.

It's evident that the customer journey for new versus returning customers will vary significantly.

If you wish to create a custom event, such as 'add-to-cart', you'll need to incorporate the following value into your events tracker code:

"microconversion":"1"

With this addition, your microconversion tracking code will appear as follows:


<script>(function(){
_adn.push(['_cparams', {"conversion_type":"venta","microconversion":"1","email":"customer@example.com","amount":"1.01","transaction_id":"0000000001"}]);
adn_mconv=true; adn_cfimg=0; function adnConversionFunction() { if (typeof adnConv=='function') adnConv();
else{ var re=new RegExp("adsmkt_"+_adn[4][1]+"=([^;]+)"); var value=re.exec(document.cookie);}} adnConversionFunction();
})()</script>

### Conversions:

Adinton operates with a single type of conversion, such as a purchase, lead, etc. You'll need to select just one objective.

### Micro conversions:

Micro-conversions encompass various events that can influence a user's decision-making process.

Example of micro conversions include:

  • Adding to cart
  • Navigating the checkout process
  • Subscribing to newsletters
  • Generating leads

Adinton determines attribution based on Conversions. While micro-conversions aid in producing more precise calculations, all system recommendations will solely focus on conversions.