Search
Clear search
Close search
Google apps
Main menu
true

Use the ins tag

This article is available in two places: in the DoubleClick Campaign Manager Help Center, which is restricted to DCM users, and in the DoubleClick Campaign Manager Partner Help Center, which is available to anyone. If you're an agency or direct marketer that needs to share this article with a publisher, external app developer, webmaster, or anyone else who doesn't have access to DCM, you can share the version in the Partner Help Center, at https://support.google.com/dcm/partner/answer/6080468.

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 DCM 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. DCM 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 (DCM users only).

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-placement placement Designates the DCM 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-user-defined u User-defined information. For reporting purposes only.
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 any parameters you enter into the "Additional key-values" settings for a placement.
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-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-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 
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). DCM adds this automatically.
There is no HTML attribute for ord. DCM automatically adds a cache busting number, so this is unnecessary. ord Allows cache busting with a random number. DCM adds a random number automatically, so there is no HTML attribute you need to add. Do not add an ord value to your tag.
Was this article helpful?
How can we improve it?