Use Server-Side Tracking

  • Updated

The Adform API enables clients to leverage site tracking capabilities while sending tracking events server-side. As illustrated in the diagram below, tracking points are sent from the client’s (Adform customer) or third-party tag manager's server (A) directly to Adform servers (B) without any direct interaction with the user’s browser (C).


Server-Side Tracking Advantages

  • Fewer tracking scripts on advertisers' websites (a high number of tracking scripts can be blocked by the user's browser, and can result in long loading times).

  • More control over what data is collected by Adform.

  • No browser compatibility issues.

  • Doesn't contribute to advertiser site latency, since no tracking script is loaded in the user's browser.

Server-Side Tracking Considerations

Direct control over data means that you must configure each needed parameter to be sent (no context is being captured automatically). To attribute conversions, one of the identifiers must be passed:

  • cookieId: Adform third-party cookie ID.

  • advertisingId: Mobile Advertising ID (IDFA or AAID), use for in-app tracking.

To build audiences and retarget, one of the identifiers must be passed:

  • eids: An object array of extended IDs.

  • firstPartyId: Adform first-party ID. Only use for hybrid setups, where part of site tracking is implemented client side to be able to pass this ID that Adform has set previously.

  • cookieId: Adform third-party cookie ID.

  • advertisingId: Mobile Advertising ID (IDFA or AAID), use for in-app tracking.

Send Tracking Request

To send server-side tracking events, make a POST request to Adform Server Side Tracking API.

Endpoint Path:



  • {trackingDomain} is the tracking domain set on the advertiser level.

  • {apiVersion}is the latest API version.

  • {trackingsetupid} is the advertiser's tracking ID, which can be found under Site Tracking in Adform UI.

Add all necessary tracking point parameters in the POST request body as Json object.

Filling POST Body Parameters

Make sure to include and pass relevant values to the POST body from the parameters listed below. Include mandatory parameters and any of the recommended and optional.


To use audience building and retargeting, make sure to pass any of user identity parameters.

To use geo and device information, include userIp and userAgent.

Standard conversion attribution currently works only if cookieId (Adform 3rd party cookie) or advertisingId (mobile advertising ID) is passed correctly.

Cookieless Insights reporting is enabled by userIp and userAgent.

Supported Parameters



Value type



Tracking Point name. In case empty, pageUrl will be set if not empty.




Web page URL where the event originated from




Web page URL the user visited before navigating to the current page.



User Identity


An object array of extended IDs, where:

  • id: User identifier, type: text.

  • atype: Agent type (which environment ID is bound to) based on IAB standard, type: integer.

  • source: ID provider, type: text. See examples of sources from Prebid.



id - text

atype - integer

source - text

Optional, Recommended


Adform first-party ID. Only use for hybrid setups, where part of site tracking is implemented client side to be able to pass this ID that Adform has set previously.

id - First-party ID set by Adform prior s2s even in client side environment, type: integer.

domain - The domain on which the first-party ID has been set (advertiser’s website domain), type: integer.


    "firstPartyId": {
        "id": 243503985029384,
        "domain": ""

id - integer

domain - text

Mandatory (you must pass either firstPartyId or cookieId for conversion attribution and retargeting to work)


Adform third-party cookie ID.




Mandatory (you must pass either cookieID or firstPartyId for conversion attribution and retargeting to work)


Mobile Advertising ID (IDFA or AAID), use for in-app tracking.




Optional, Recommended







  • gdpr - GDPR applicability (possible values 1 - applies, 0 - doesn’t apply), type: integer.

  • gdprConsent - GDPR user consent string, type: text. This is required if gdpr has value 1, according to IAB TCF.

  • usPrivacy - US privacy signal (CCPA), type: text.

  • gpp - User’s Consent string according to IAB Global Privacy Platform (GPP)

  • gppSid - GPP Section ID which Adform uses for privacy resolution (Possible values 2 = EU TCF v. 2; 7 = US MSPA)



gdpr - integer

gdprConsent - text

usPrivacy - text

gpp - text

gppSid - text

Optional, Recommended

User Context


User’s browser user agent


Optional, Recommended


User’s IP address.


Optional, Recommended


User’s browser language




    "userAgent":"Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36",

Add Custom Variables

Additional information can be collected and passed together with the POST request using Adform variables. These can be passed in variables: { } object alongside other parameters in the POST body.

  • Variables used in variables object accept a single value per request.

  • Variables used in subVariables object arrays can form multiple value sets in the same request. For example, product information of several products in case of an ecommerce purchase.

Send Multiple Tracking Requests

Server-side tracking API allows multiple tracking points and tracking requests to be sent via a single POST request. To do that, include up to 20 data objects in the post request body.

Retrieve Third-Party Cookie ID

Adform cookie ID can be retrieved from the client-side by using a JavaScript code and from Adform campaign banner tags using macros. The retrieved cookie ID needs to be stored and later sent in the post-back URL.

To make sure that cookie ID is retrieved in all possible cases, both cookie retrieval options must be implemented. Resorting to a single option will negatively impact attribution and retargeting capabilities.

Using JavaScript

In order to get Adform cookie ID from the user’s browser using JavaScript, use the following JavaScript tag:

<script src=";adfcookname=uid"></script>

Once the script is loaded, the cookie ID will be assigned to a JavaScript variable window.Adform._uid which can be stored client-side and passed in the server-side request.

The cookie retrieval script doesn't set a cookie. Hence, if there is a need to expand the possible retargeting pool, it is common practice to fire a single tracking point of any type before cookie retrieval to make sure the user has the Adform cookie set.

Use Landing Page Macro on Tags

You can add Adform ID directly to the landing page URL. This can be useful when you don't want to put JavaScript on our page. Even with JavaScript, having Adform ID on a landing page adds a second source for the ID, so if JavaScript is blocked, or late, the ID still exists. Thus, as the best practice, Adform recommends having both the JavaScript solution and the landing page parameter.

To add Adform ID to the landing page, the following macro needs to be added to it as an appended URL parameter value:


This macro can be entered by using auto-tagging or URL append functions in the tags section of your campaign. After clicking on an ad, the user lands on the landing page with macro replaced by the actual cookie ID.

An example URL of how the landing page could look like when landing from the ad:

The extracted cookie ID’s are 19-digit strings which can also be negative values.

Example values of Adform cookie IDs:



The cookie ID passed with the server-side request is used to attribute tracking point visits to campaigns or for re-targeting later on.

Was this article helpful?

How we can make it better?

Thank you for your feedback!