Creative Macros
  • 10 Sep 2024
  • 3 Minutes to read
  • Contributors
  • Dark
    Light

Creative Macros

  • Dark
    Light

Article summary

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

${AD_SET_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. Works only for display creatives (Numeric)

300

${CREATIVE_HEIGHT}

The height, in pixels, of the ad slot the creative was served into. Works only for display creatives (Numeric)

250

${DOMAIN}

The domain of the web page

quantcast.com

${SUBDOMAIN}

The subdomain of the web page

app.quantcast.com

${AUCTION_URL}

The full domain of the web page an ad is being displayed on. This will be based on information in the bid request, so may vary from the actual full page URL. Intended to be used to identify the web page to brand safety tags within a creative.

https://www.quantcast.com/advertiser

${BUNDLE_ID}

The bundle ID identifies the app an impression is being served on. Will be replaced with an empty string for impressions served on the web. For iOS apps the bundle ID is a number found in the app URL, whereas for Android apps it is a string similar to the example.

com.quantcast.www

${DEAL_ID}

The Deal ID used to bid on the impression.

4576

${ZIPCODE}

The zip code of the user an ad is being displayed to. This zip code will be based on information in the bid request, so may vary from a user's actual location. For privacy reasons, the zip code inserted to replace this macro will be partially masked in some countries, and this macro will be replaced with an empty string where a given zip code identifies a small number of users.

10001

 Tracking Macros

These macros are most commonly used for reporting purposes.

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 Macros

Click macros are also used for reporting purposes, and expand to a Quantcast URL which is used to measure and report clicks when using display ad server tags 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, which will redirect to the landing page:

<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

${CLICK}

Unescaped. Replaced with a Quantcast URL so that clicks can be measured and reported in the Quantcast Platform. Only works within the display creative tag/HTML field.

 

${CLICKESC}

Escaped.  Replaced with a Quantcast URL so that clicks can be measured and reported in the Quantcast Platform. Only works within the display creative tag/HTML field.

 

 

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. The 'X's should be an integer vendor ID from the TCF's Global Vendor List.

 

${ADDTL_CONSENT}

Expands to the Additional Consent string associated with the request

 

Video-Specific Macros

These macros are available only for video creatives.

Macro

Description

Example

${VIDEO_DURATION}

The video duration in milliseconds

30000

 

Example Implementation

Macro Implementation in Impression Pixel

Macro Implementation in Click-Through URL

Finding Creative IDs from Creative Names

Within the report builder section of the platform you can 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. 


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.
ESC

Q, facilitating knowledge discovery through conversational intelligence