Manage placement tags

Use the ins tag

The ins tag works for ads that use iframe/JavaScript or JavaScript tags and improves Verification and Reporting data. There are several benefits to using the ins tag, including:

  • For advertisers: This tag provides richer domain information in Verification, giving you greater visibility into where your ads are serving, as well as better facilitating brand safety and spam protection.
  • For publishers: There’s no need to add cache busters (ord=) to this tag, allowing for easier tag implementation.

About the ins tag

  • Supported ads: The tag works for any ads that use iframe/JavaScript or JavaScript tags. Campaign Manager 360 will only generate the ins tag for ads on supported placements, so you don't have to worry whether your placement is supported.

  • Tag format: The tag uses HTML attributes rather than URL parameters. When the tag fires on your site, the HTML attributes will change into the corresponding parameters in the tag and then return the requested content.

  • Browser support: If the rendering mode is set to iframe, then the browser must support both iframes and JavaScript for the ad to load. If the rendering mode is set to JavaScript, then the browser only needs to support JavaScript. The browser must always support JavaScript for these tags because there is no noscript portion of the tag.

Sample ins tag

You will see <ins at the beginning of the tag, and the tag will contain class='dcmads'.

This simple sample tag includes three attributes: one for the placement (data-dcm-placement), one for a custom key-value parameter (data-dcm-param-custom_key), and one for the rendering mode (data-dcm-rendering-mode). 

<ins class='dcmads'
 style='display:inline-block;width:300px;height:250px'
 data-dcm-placement='N7480.1664088DOUBLECLICK.NETTEST/B8299600.114131924'
 data-dcm-param-custom_key='custom_value'
 data-dcm-rendering-mode='iframe'>
 <script src='https://www.googletagservices.com/dcm/dcmads.js'></script>
</ins>

Use the tag generation guide for steps to generate tags.

How to edit the ins tag

If you want to use ad parameters in the tag, enter them as HTML attributes in the HTML code of the tag.

  1. Find the data attributes you need in the table below. Note that there is no option to add cache busters (ord=). The tag automatically adds a random number.

  2. Add each HTML attribute you need on its own line. This makes it easier to find and edit them in your tag. Do not add the ad parameters. Only add the HTML attributes.

    One advantage of the ins tag is that you do not need to add a cache buster. The tag automatically adds a cache buster.

  3. When the tag fires on your site, its HTML attributes will change into the corresponding parameters and then return the requested content.

Table of data attributes

The ins tag uses HTML data attributes. These attributes change into corresponding ad parameters in your browser.

HTML attribute Changes into this ad request parameter Purpose
data-dcm-rendering-mode command Designates adi or adj for the tag: whether the tag is an iframe tag or a JavaScript tag. The rendering mode is either “iframe” or “script.”
data-dcm-refresh-count rc Allows a publisher to declare that the current tag is loading as a "refresh" of a previously existing ad slot (i.e., replacing another ad). The value should be the number of times this ad slot previously had an ad (no need to specify "0" for initial load). The value of "1" can be used if the load is a refresh but the exact count is unknown.
data-dcm-placement placement Designates the Campaign Manager 360 placement with a string.
data-dcm-click-tracker click Third-party click tracker URL. Redirects clicks to a third-party site for tracking.
data-dcm-landing-page-escapes N in clickN The number of times the landing page will be escaped before it is appended to the third-party click tracker.
data-dcm-interstitial dcopt=1_ist Designates interstitial ads.
data-dcm-impression-exchange-id pc The IAB impression exchange ID.
data-dcm-keywords kw Keywords used for targeting, separated by commas.
data-dcm-dart-iframe-path mtfIFPath Rich media creatives only: The path to the publisher-supplied DARTIframe.html.
data-dcm-disable-iframe-breakout mtfIFrameRequest=false Rich media creatives only: Ensures that rich media content will not attempt to break out of the iframe if the dimensions of the content exceed those of the iframe.
data-dcm-top-float mtfTop Rich media creatives only: The distance in pixels from the top of the page or viewing area to where an interstitial rich media creative is rendered.
data-dcm-left-float mtfLeft Rich media creatives only: The distance in pixels from the left of the page or viewing area to where where an interstitial rich media creative is rendered.
data-dcm-multi-bottom-float mtfBottomFloat Rich media creatives only: Two numbers separated by a comma. The first number represents the distance from the top of the page, and the second number represents the distance from the left of the page, in px, %, or pxc (pixels from center) for a rich media display multi-floating interstitial.
data-dcm-multi-left-float mtfLeftFloat Rich media creatives only: Two numbers separated by a comma. The first number represents the distance from the top of the page, and the second number represents the distance from the left of the page, in px, %, or pxc (pixels from center) for a rich media display multi-floating interstitial.
data-dcm-multi-right-float mtfRightFloat Rich media creatives only: Two numbers separated by a comma. The first number represents the distance from the top of the page, and the second number represents the distance from the left of the page, in px, %, or pxc (pixels from center) for a rich media display multi-floating interstitial.
data-dcm-multi-top-float mtfTopFloat Rich media creatives only: Two numbers separated by a comma. The first number represents the distance from the top of the page, and the second number represents the distance from the left of the page, in px, %, or pxc (pixels from center) for a rich media display multi-floating interstitial.
data-dcm-param-dc_expa dc_expa Rich media creatives only: Track real-time expansions of rich media display expanding creatives. The publisher must insert an unescaped URL that will receive a postback when the creative is expanded.
data-dcm-param-[KEY] KEY This populates with parameters you enter into the "Additional key-values" settings for a placement. Any parameters you use here cannot contain any semicolons or capital letters.
data-dcm-child-directed tag_for_child_directed_treatment Accepts a value of 0 or 1. A value of 1 indicates that this particular request may come from a user under the age of 13, under COPPA compliance.
data-dcm-underage tfua Accepts a value of 0 or 1. A value of 1 indicates that this particular request may come from a user under the age of 16 (may differ by country), under compliance with the EU’s General Data Protection Regulation (GDPR).
data-dcm-limit-ad-tracking dc_lat Accepts a value of 0 or 1. A value of 1 means that the user has enabled the “Limit Ad Tracking” option for IDFA or AdID in order to opt out of personalized ads and remarketing. If "Limit Ad Tracking" is off, the value is 0.
data-dcm-limited-ads ltd Set by the publisher, a value of 1 indicates that the user hasn't provided consent for cookies, therefore impressions won't use, or create cookies. Only limited ads can be served.
data-dcm-resettable-device-id dc_rdid User resettable device identifiers in the form of IDFA for iOS or advertising ID (AdID) for Android. The publisher must pass a value into this parameter in order to enable in-app conversion tracking. The values should be the unhashed, raw value. We will only accept values passed securely over SSL-enabled tags.
data-dcm-external-id dc_xid An external unique identifier. Publishers must pass this value when configuring mobile postbacks. This is also the parameter value that is returned in a postback to indicate a conversion.
data-dcm-app-id dc_msid The Google Play Store or iOS App Store ID of a given app. Publishers must pass this value to enable the App and App ID reporting dimensions.
data-dcm-publisher-url dc_ref Allows publishers to pass the exact URL where an impression serves. Learn more
data-dcm-ssaid pdid and pdidtype Used for impression, click, and conversion tracking on non Google Play Android devices in China. Learn more 
data-dcm-api-frameworks dc_sdk_apis A comma-separated list of identifiers for API frameworks supported by the publisher (e.g., VPAID 2.0 and OMID 1.0 support would be "2,7"). The identifiers are drawn from the AdCOM 1.0 spec.
data-dcm-omid-partner dc_omid_p An identifier for the publisher's Open Measurement SDK integration. This should be in the form "partnerName/partnerVersion". This is required to convey and verify certification status of Open Measurement SDK integrations.
There is no HTML attribute for sz. Instead, the size is obtained from the width and height properties in the style of the ins tag. sz The size of the placement (width x height). Campaign Manager 360 adds this automatically.
There is no HTML attribute for ord. Campaign Manager 360 automatically adds a cache busting number, so this is unnecessary. ord Allows cache busting with a random number. Campaign Manager 360 adds a random number automatically, so there is no HTML attribute you need to add. Do not add an ord value to your tag.

Macros and the ins tag

Macros can be inserted into the ins tag attributes that match the corresponding ad parameters. There's no option for cache buster or timestamp macros with the ins tag because the tag handles cache busting.

The sample tag below gives an example with a click tracking macro:

<ins class='dcmads'
 style='display:inline-block;width:300px;height:250px'
 data-dcm-placement='N7480.1664088DOUBLECLICK.NETTEST/B8299600.114131924'
 data-dcm-rendering-mode='script'
 data-dcm-click-tracker='${CLICK_URL}'>
 <script src='https://www.googletagservices.com/dcm/dcmads.js'></script>
</ins>

TCF macros

The IAB TCF v2.0 supports the use of macros in creative tags to indicate where in the URL the TC string should be inserted and sent onwards, as well as to identify which vendors are present. Advertisers who wish to integrate with the IAB TCF v2.0 should work with their pixel vendors to ensure they properly support the following macros. Learn more

Macro Description

${GDPR} 

0 = traffic from a non-GDPR region, 1= traffic from a GDPR region.
${GDPR_CONSENT_xxxxx} Where xxxxx is the numeric Vendor ID of the vendor receiving the TC string: TC string received in bid request.
${ADDTL_CONSENT} Where ADDTL_CONSENT is a dot-separated list of user-consented Google Ad Tech Provider (ATP) IDs.

 

Was this helpful?

How can we improve it?

Need more help?

Try these next steps:

true
2024 Privacy Readiness guide

Prepare for a world without third-party cookies and unlock the AI
opportunity by adopting a durable measurement setup.
Start Today

Search
Clear search
Close search
Google apps
Main menu
15285452909907145773