Creative macros are special strings that can be added to HTML tags, VAST URLs, impression trackers and landing page URLs within your Quantcast creatives. These macros can be used to pass back information about the impressions served or creative clicked.
Available Macros
Data Passback and Rendering Macros
The following macros are available for all impressions, and allow data to be passed back to your ad server, or can be used in the rendering of a creative.
Macro | Description | Example |
${ACCOUNT_ID} | Account ID (Numeric) | 9000001 |
${CAMPAIGN_ID} | Campaign ID of the account (Numeric) | 9000049 |
${ADSET_ID} | Ad set ID of the account (Numeric) | 9002445 |
${CREATIVE_ID} | Creative ID (Numeric) | 10010448 |
${CREATIVE_WIDTH} | The width, in pixels, of the ad slot the creative was served into (Numeric) | 300 |
${CREATIVE_HEIGHT} | The height, in pixels, of the ad slot the creative was served into (Numeric) | 250 |
${DOMAIN} | The domain of the web page | quantcast.com |
${SUBDOMAIN} | The subdomain of the web page | app.quantcast.com |
${BUNDLE_ID} | The bundle ID of the app an impression is being served on. Will be replaced with an empty string for impressions served on the web | com.quantcast.www |
Tracking Macros
These macros are most commonly used for reporting purposes, and include our click macros.
Click macros expand to a Quantcast URL which is used to measure and report clicks in the Quantcast Platform. For ad servers in the list below, we will automatically insert Quantcast's click macro. Other ad servers can also be used in the Quantcast Platform, but we require that a click macro is placed manually.
- AdForm
- Google Rich Media
- EyeReturn
- Flashtalking
- Jivox
- Mediaplex
- Sizmek
For example, the following simple creative code can be modified to add our click macro at the start of the link:
<a href="https://www.quantcast.com/home">
<img src="image.png" />
</a>
<a href="${CLICK}https://www.quantcast.com/home">
<img src="image.png" />
</a>
Macro | Description | Example |
${CACHEBUSTER} | 6-digit cache buster (Numeric). A number of other strings can be used as aliases for ${CACHEBUSTER}, including [timestamp], [CACHEBUSTER], [RANDOM], [CACHE_BREAKER] and %%CACHEBUSTER%%. | 100034 |
${TIMESTAMP} | The UNIX timestamp of the auction, in seconds. | 9000049 |
${CLICK} | Unescaped. Replaced with a Quantcast URL so that clicks can be measured and reported in the Quantcast Platform. | |
${CLICKESC} | Escaped. Replaced with a Quantcast URL so that clicks can be measured and reported in the Quantcast Platform. |
Privacy Macros
These macros are most commonly used to meet transparency and consent requirements under GDPR and other similar privacy laws.
Macro | Description | Example |
${GDPR} | Indicates whether GDPR regulations are applicable to the impression - 0 for no, 1 for yes. | 1 |
${GDPR_CONSENT} | The Transparency and Consent String associated with the request | |
${GDPR_CONSENT_XXXX} | An alias for ${GDPR_CONSENT}. The Transparency and Consent String associated with the request | |
${ADDTL_CONSENT} | Expands to the Additional Consent string associated with the request |
Video-Specific Macros
These macros are available only for video campaigns.
Macro | Description | Example |
${VIDEO_DURATION} | The video duration in milliseconds | 30000 |
Example Implementation
Macro Implementation in Impression Pixel
Macro Implementation in Click Through URL
Note: Macros can only be included in the landing page URL for Quantcast-hosted creatives.
ID Mapping
Within the report builder section of the platform you are able to pull reports that will help you map the IDs passed within the macros to actual campaign/ad set/creative names.
These different ID name values are available in the "level" section of the report builder.