26 Sep 2019

Integration with affiliate network: tracking code

Read later or share with friends

Proper tracking installation and set up is, perhaps, one of the main steps of the advertiser on the way to effective work in affiliate networks. Today we’ll talk about the tracking code – front-end integration: for this tracking method, a code is embedded in the advertiser’s website that allows receiving the information about targeted actions.

In this article, we will review the operating principles of the tracking code, and also take a look at the current misconceptions on its account and check out how things really are.

What is a tracking code?

A tracking code is a script that the advertiser adds to the code of his website. There are two tracking code options on the market:

  • Tracking pixel. This is an obsolete tracking method currently not used in Admitad. It is a 1×1 pixel (<img>) image tag that is installed on the conversion confirmation page. It is triggered when the user submits an order / application and sees the “Thank you for your purchase” page. This is a basic configuration, which was subsequently upgraded to a new tracking code called TagTag.
  • TagTag. Current frontend integration method in Admitad. The solution consists of two parts:
  • The pass-through code is set in the header of the website. It follows all the user transitions made via the affiliate link from the first entry to the website to the purchase arrangement.
  • The code for transmitting order data is installed on the conversion page (confirmation of the completion of the order or submission of an application).

Today we will talk about the TagTag tracking code, since it includes both that unique function of the <img>-pixel (tracking actions), and many others — we will tell you more about them. In addition, it is already used by most advertisers who are integrated with Admitad using the tracking code method — and those who have not done so already are currently in the process of switching to this method.

Functions and features of the tracking code

Some TagTag functions are standard for tracking code, others have become an advantage over similar solutions of other affiliate networks.

  • Creating cookies with publisher data. Without this option, the advertiser writes the code himself, it takes time and resources. When the user comes to the advertiser’s website Admitad cookies are assigned to the visitor, and from that moment on, the system knows who brought the buyer. This, in fact, is the primary task of the tracking code — to track which publisher brought the buyer in order to pay him a reward for the action of the user brought to the website.
  • Protection against incorrect blocking. The tracking code is not blocked by ad blockers (anti-advertising extensions) if you install it directly on the website in accordance with the instructions. It is not recommended to install the script in the Google Tag Manager container — in this case the code will not have the protection from the blockers.
  • Deduplication. This parameter is necessary if you use other paid traffic channels in addition to Admitad. It helps separating traffic by source and determining who exactly brought the client (who was the last paid channel in the conversion chain, if we work according to the Last Cookie Wins scheme). Moreover, the deduplication code is ready-to-use: the advertiser only needs to enter his parameters in it.
  • Cross-device tracking. This function is necessary so as not to lose mobile traffic. It allows tracking the user’s movement between devices. For example, if the potential buyer clicked on an affiliate link on a mobile device, took interest in the product, but made a purchase on the desktop, the system will still know which publisher brought the client.

Operational speed of a website with a tracking code

The misconception is still alive that adding extra code to the website of an online store or online service will slow down the loading of its pages. In fact, the tracking code cannot cause a slowdown in loading website page. The reason is simple: the Admitad tracking code script is processed in the background.

What does it mean? This means that the script is loaded after the main content of the site is loaded. As a result the user already sees that what he came to the website for, and only at that moment the tracking code is triggered.

Cases of loading slowdown of pages with the tracking code are rare. How can this happen?

  • If the tracking code conflicts with other scripts. For example, the advertiser changed the field in which the order number is transmitted, but did not change this valu e in the Admitad tracking code. The tracking code expects to receive the order number, but the name of the variable has changed, and this can lead to an error. Such situations are detected in the test mode: Admitad tracking department sees error logs and solves the problem together with the advertiser before the launch of the affiliate program. If the advertiser adds his scripts after the launch, such errors are detected by the advertiser’s web developer in a test environment (a special version of the website for developers). As a rule, not a single release on the website passes without such tests.
  • If you go to the advertiser’s website from one country, and the servers of that website are located in another country, then in this case not only the tracking script, but also the whole website with all the contents may slow down. TagTag is protected from these problems by CDN technology — the user is “redirected” to the server closest to his location.
  • The tracking code is installed in the GTM container or another external tag container — then the download speed of the tracking code can be limited by the slow loading of the GTM container itself or the queue for loading other scripts in the container. That is why we highly recommend installing the tracking code directly.
  • Sometimes the advertiser may mistakenly believe that the website loading speed is low when he runs it through special tests measuring the loading speed. The server of such a tester may be located in another country, and the speed will slow down by 2-3 times due to the double loading path (Country 1 -> Country 2 -> Country 1). In reality, the download speed on this website will be higher.

As you can see, such individual cases are not related to the script itself, but to the installation specifics and tests. Anyone can see how fast the script actually works: just open the Admitad advertiser’s website, look at the code (Ctrl + Shift + I) and check out the load time for all the scripts in the Network — Timing section. A few milliseconds — this is the time it takes for the Admitad script to load taking into account the expectation of the response from the affiliate network.

The script download speed on the advertiser’s website is open information for anyone to see.


Another misconception about adding third-party code is that it reduces the level of security for the advertiser’s website. Website owners are afraid that the tracking code may make their store vulnerable to cybercriminals, including dishonest publishers who can hack into it and interfere with the tracking mechanism for their benefit.

In reality no publisher can influence the tracking set up by the advertiser. It is virtually impossible to change the code supplied by Admitad: for this, the attackers will have to hack into the company servers, go through several security layers, make changes to the code and “roll it out” again on the advertiser’s website. The likelihood of this happening tends toward zero. In addition, the code undergoes a multi-stage check before each release and is secure from compromise.

And what about cookie stuffing (substitution of cookies by dishonest publishers), you may ask? Substitution of content does not occur through hacking into the advertiser’s or Admitad server, but through a change of content the user sees, i.e. on the side of the user’s browser.

Wrong cookies are assigned to the user even before he arrives at the advertiser’s website, loads the product page, and the tracking script activates. In some cases, on the other hand, after the transition via the publisher’s link occurs, the transition via another link is simulated.

Therefore, any integration methods are equal before this type of fraud, including server methods and / or customized solutions of advertisers / agencies. The ways that publishers substitute cookies do not affect the operation of the tracking script itself. At the same time, the act of fraud is monitored by the affiliate network using specialized programs — the orders involved with the fraud are rejected, and the publisher gets disconnected from the network. Antifraud protection is not built into the tracking code, but is triggered before the transition to the advertiser’s website (the Admitad tracking platform analyzes clicks) and after that (actually completed orders are analyzed). The tracking code itself is protected against changes from the outside.


Integration setup is supported by Admitad technical experts. They lead the whole process from beginning to end, checking whether the code works correctly and how the data is exchanged between the advertiser and Admitad.

The advertisers help center contains all the information that your technical department will need in order to connect to the Admitad affiliate network: «Integration via tracking code». If you have any questions, you can always refer them to Admitad Technical Support.

Read later or share with friends


Leave comment