Server-Side Tracking Basics

Peter Hamilton

In affiliate marketing (and virtually all performance marketing) there are two primary ways to track transaction flow from the moment of first click to the point where conversion takes place. Either you are tracking users via cookies on their browser, or doing a server call to store a unique identifier. You might have read my post a while ago about the difference between Client-Based Tracking and Server-Based Tracking, but based on a large number of inquiries to our customer support and a general misunderstanding of how server-side tracking works, I thought it would be helpful to cover the basics of server-side tracking including various implementations and benefits.

Basic Server Tracking for the Web

Generally speaking, server-to-server tracking on the web works by generating and storing a unique identifier of some kind when a user clicks a tracking link or generates an ad impression. When the same user later commits a conversion (or other trackable action) the unique ID is matched back to the user by posting that same unique identifier back to the tracking server.

How It Works with Affiliates

Affiliate tracking software like HasOffers allows you to track which conversions came from affiliates. If you choose to utilize server-side tracking, sometimes called Server Response, a unique transaction identifier is generated when a user views or clicks an ad with an affiliate link.

The ID gets passed through the tracking URL to the server hosting the offer landing page and is stored by the advertiser. This identifier is passed through as a variable throughout the conversion funnel. When the transaction is complete, the ID is passed back to the affiliate tracking server by calling a “Postback URL” at the time of conversion.

How Does the Advertiser Store the Transaction ID?

There are several ways an advertiser can store the transaction ID. One method is for the advertiser to generate a cookie on the landing page that carries through the duration of the transaction. Another method is to log the transaction ID as a hidden variable. A third option is to continue carrying the transaction ID as a URL parameter until the conversion completes. This process will likely vary depending on the CRM solution used by the advertiser.

This diagram shows the progression of a transaction from the initial click to postback.

Affiliate tracking diagram

Types of Identifiers

The Transaction ID generated for server-side tracking can be a number of things. In some cases, it may be a randomly generated unique ID. A transaction ID can also be based on a combination of available variables, like a username, email address, or the IP address logged at the time the transaction starts. For some types of affiliate transactions, using the affiliate ID may also work as the identifier to track the transaction.

Third-Party Tracking

For affiliates who are tracking campaigns independently, it’s important to note that they must implement their own Postback URL. The roundtrip for 3rd party tracking starts with the affiliate appending a transaction ID to the offer URL. When that offer URL is clicked, the affiliate transaction ID is logged. The tracking server then passes a unique transaction ID to the advertiser’s server, where the transaction ID is logged by the advertiser. When a conversion occurs, the advertiser posts back to the tracking software, which in turn posts back to the 3rd party tracking for the affiliate, completing the roundtrip.

Using an iframe or image pixel for third-party tracking will not work if the advertiser is only using server-to-server tracking because the postback process will not cause the image pixel to fire on conversion.

Server-to-Server Benefits

The simplicity of placing an iframe or javascript pixel for cookie tracking is certainly attractive, but there are definitely benefits to getting server-side tracking in place.

One primary advantage of server-to-server tracking is accuracy. By generating a unique identifier at the time a click or impression occurs, you get a greater degree of accuracy in tracking a specific transaction back to a specific affiliate. In most cases, the transaction ID is tied to something constant, like an email address or username, which again results in a higher degree of accuracy. Another added benefit of server-to-server tracking is the ability to add additional third-party tracking, so an affiliate can use the transaction ID to verify campaign results independently.

Dual-Tracking Option

While server-to-server tracking is extremely accurate, it’s also possible to simultaneously track a transaction using both an image pixel and server-to-server tracking. When both options are used, server-to-server tracking is configured as described above, while a cookie is also placed on the user’s browser. If both tracking methods log the same transaction, the tracking software only counts the transaction once, since the transaction ID for the cookie and the transaction ID for the server response postback are the same value.

The primary reason most affiliate tracking continues to rely on cookie-based methods such as iFrame and image pixels is due to the requirement for advertisers to do some additional work, storing the tracking identifier on their own servers and passing it back to the affiliate tracking platform. For this reason, the convenience of an iFrame is often chosen over the required implementation for the advertiser. It is simply easy to place a pixel than store and pass transaction IDs. With that said, once server-to-server tracking is in place, the accuracy is awesome.

Never miss a thing!

Want the goods delivered straight to your inbox?
Sign up for our blog recap emails to stay in-the-know about digital marketing, analytics, and optimization.

Peter Hamilton

A performance marketer by background, Peter is the CEO of TUNE, the world's leading mobile marketing platform. Peter has lead the company to 9 offices around the world and nearly 300 employees, now trusted by companies like Expedia, Starbucks, Supercell, and Uber. Follow @peterhamilton