Site-tracking variables or macros are placeholders in the site-tracking code that you can use to pass information collected from Adform tracking points to third-party scripts. To start, you must decide on the macros that you want to use and define them in the code. Then they'll be replaced with specific data during the execution of the code. For example, you can use a macro for order ID to share conversion information with third-party pixels in Adform container tags.
Tip
For more information about site-tracking macros, see Overview of Supported Site-Tracking Macros.
Site-tracking macros can help you pass data to external tracking and analytics tools. This way, you can get insights into your user's profile and behavior on your website.
With the Macros Definitions section of the Tracking Variables API, you can see the range of macros that Adform provides for site tracking. To use the macros in your site-tracking code, you must add them manually when creating a tracking point.
To authenticate and use Adform APIs, your user account must have the necessary permissions and your OAuth client must have the required scopes assigned to it.
To retrieve site-tracking macros, Adform DSP and Ad Server user account must have this permission assigned by the business account admin:
-
Manage Site Tracking
You also need the following scope assigned to your OAuth client by Adform Support (technical@adform.com):
-
https://api.adform.com/scope/eapi: Grants access to Tracking Variables API.
Note
If you don't have an OAuth client yet, follow the procedure in Get Authentication Credentials for Adform APIs to register one.
To retrieve site-tracking macros with API, you must use the following ID in your requests:
|
ID |
Used To |
Retrieve From |
|---|---|---|
|
|
Specify a campaign's site‑tracking setup |
Note
Additional IDs might be used, but the listed one is required to pass a request.
Tip
To learn how to use Adform APIs, read Guide to Using Adform APIs.
To pass site-tracking variables with API:
-
GET endpoint in Macro definitions section of Tracking Variables API: To retrieve a list of macros that are available for the site-tracking setup.
-
Use Adform platform to add the macros when you create a tracking point code.
Note
Currently, it's not possible to create tracking points with Adform APIs. Tracking points are dynamically created once a tracking script is implemented on the advertisers website. To create tracking points upfront, use Adform platform , server-side tracking, or contact Adform Support (support@adform.com) for help.