A macro is a small piece of code that can be used to execute a specific task. In the ad tech industry, macros are unique to each company and are most commonly used as part of the impression and click-tracking processes. Each company’s servers have been programmed to recognize and perform a specific task for each individual macro. This task is typically to replace the macro with a specific value or set of values. For example, when the Viant click tracking macro is used, our servers recognize it and will complete the task of replacing the macro with the Viant click tracking URL.
All Viant macros follow the same format, with the actual token/parameter changing. Each macro has a specific functionality that coincides with certain use cases. If any portion of the macro is missing or misspelled then the system won’t recognize it. Additionally, each creative vendor’s tags are unique to them and therefore they must provide specific locations for each individual Viant macro to be placed. Please refer to the vendor-specific documentation for instructions on which macros to use and where to place them.
Format
${ADELPHIC_TOKEN}
See below for additional detail on common macros.
Click Tracking
Click trackers are used to track when a user has clicked on an ad and is being redirected to the advertiser’s landing page. The Viant click tracker also contains other details that allow us to associate it to a specific creative, site, etc.
Viant’s click tracker is fired as part of the redirect to the landing page:
${ADELPHIC_CLICK_REDIRECT_PROVIDED}
${ADELPHIC_CLICK_REDIRECT_PROVIDED_ENC}
Viant’s click tracker is not fired as part of the redirect to the landing page (ex. First user interaction):
${ADELPHIC_CLICK_NOREDIRECT}
${ADELPHIC_CLICK_NOREDIRECT_ENC}
Note
Any macro that ends in “ENC” should only be used if the creative vendor requires our URL to be URL-encoded. This is a special format to allow for special characters that browsers can’t read on their own.
Cache Buster
The cache buster (also referred to as the timestamp or random number generator) adds a unique number to each impression served, allowing each individual impression to be tracked.
Each time your browser loads, it caches a snapshot (almost like a save point) of everything that’s loaded. This allows for much faster loading the next time you go to that page as it just pulls from the already loaded browser cache.
The browser is essentially tricked into thinking each creative is brand new because they each have their own unique identification number. This is the “new” creative instead of pulling from the cache.
${ADELPHIC_CACHE_BUSTER}
Impression Tracking
Viant automatically tracks impressions (when the creative code is sent to the browser/app) and does not have a separate impression macro.
Location (Lat/Lon) Tracking
Viant lat/long macros can be added within creative to pass the user’s location coordinates. These macros should only be implemented for specific campaigns that rely on this functionality (e.g. Dynamic location banners).
Device ID Tracking
Viant has many options for which device IDs we pass and in what format they’re set. These macros should only be implemented for specific campaigns that rely on this functionality (ex. conversion tracking).
- IDFA Only
- AAID Only
- AID Only
- IDFA and AID/AAID
All of the above options can be sent in SHA1, MD5, or Any type (this sends the ID no matter what format it’s available in).
Note
Device IDs can only be utilized on mobile app campaigns. Please contact your Viant Account Representative for the specific macros.
Video Metrics
Viant automatically tracks video metrics for all VAST video creative meaning the macros do not need to be added separately. For banner video, the video metric macros must be added to your creative in order for Viant to track.
Please see below to assist in identifying the type of creative available.
Video Start
${ADELPHIC_VIDEO_TRACK_0}
1st Quartile
${ADELPHIC_VIDEO_TRACK_25}
2nd Quartile/Midpoint
${ADELPHIC_VIDEO_TRACK_50}
3rd Quartile
${ADELPHIC_VIDEO_TRACK_75}
Video Completion
${ADELPHIC_VIDEO_TRACK_100}
Note
If you’re uploading a VAST tag or VAST URL into the DSP UI this is considered video creative and does not need the macros added. If you’re uploading a banner tag (standard or rich media) this is considered banner creative the video metric macros need to be added.
Other Commonly Used Macros
Note
For additional uncommon macros, please contact your Viant Account Representative regarding the specific use case and setup.
Macro | Definition |
---|---|
${ADELPHIC_SITEID} |
Site ID: Pass the unique Viant numerical site ID |
${ADELPHIC_SITELET_URL_ENC} |
Site URL: Pass a url-encoded version of the page or bundle ID the ad is serving on |
${ADELPHIC_PUBID} |
Exchange ID: Pass the unique Viant numerical exchange ID |
${ADELPHIC_ADVERTISERID} |
Advertiser ID: Pass the numerical advertiser ID |
${ADELPHIC_CAMPAIGNID} |
Campaign ID: Pass the numerical campaign ID the creative is associated with |
${ADELPHIC_ADORDERID} |
Order ID: Pass the numerical order ID (similar to line item or placement in other systems) the creative is associated with |
${ADELPHIC_AUDIENCEID} |
Line ID: Pass the numerical Line ID |
${ADELPHIC_CREATIVEID} |
Creative ID: Pass the numerical creative ID |
${ADELPHIC_CLICKID_RAW} |
Raw Click ID: Pass the raw click ID. This is most commonly used for conversion postbacks implemented by reach extension customers and third-party app installs tracking vendors. |
${ADELPHIC_DNT} |
Do Not Track: Pass a 0 if a user has not enabled do not track/limit ad tracking, and pass a 1 if a user has enabled do not track/limit ad tracking |
${ADELPHIC_DEVICE_TYPE} |
Device Type: Pass the type of device being served on (e.g. smartphone, tablet, etc.) |
${ADELPHIC_CONTENTID} |
This will pass the id value contained in the contentId object passed from the corresponding publisher |
${ADELPHIC_APPLICATION_BUNDLE_ID} |
This will pass the application bundle id when delivering on a compatible publisher |
Note
Please consult with your Viant Account Representative on our conversion postback options prior to implementation.