,

How to Insert Click & Cachebuster Macros in DCM (CM360) Tags for GAM and GAM 360

By

ยท

ยท

2โ€“3 minutes

When trafficking third-party ad tags exported from Campaign Manager 360 (CM360, formerly DoubleClick Campaign Manager / DCM) into Google Ad Manager (GAM / GAM 360), inserting the proper Click Tracking Macro and Cachebuster Macro is critical. Without these macros, Google Ad Manager will fail to record clicks in publisher reports, or browsers may cache ad calls and cause severe impression discrepancies between GAM and CM360.

In most cases, when you select the native Campaign Manager 360 or Third-party creative type in Google Ad Manager and click Insert macros, GAM recognizes the CM360 tag syntax and inserts the macros automatically. However, if you are trafficking custom creative templates, out-of-page units, or troubleshooting a tag manually, follow the exact macro placements below.

1. Modern CM360 <ins> Tag: Before & After Macro Insertion

The modern asynchronous CM360 <ins class="dcmads"> tag handles cache-busting (ord=) automatically via dcmads.js, so you only need to add the data-dcm-click-tracker='%%CLICK_URL_UNESC%%' attribute inside the opening <ins> element.

Raw CM360 <ins> Tag (Before Macro Insertion):

<ins class='dcmads' style='display:inline-block;width:728px;height:90px'
    data-dcm-placement='N2308384.4381276ASIANET/B32107665.39507456'
    data-dcm-rendering-mode='iframe'
    data-dcm-https-only
    data-dcm-api-frameworks='[APIFRAMEWORKS]'
    data-dcm-omid-partner='[OMIDPARTNER]'
    data-dcm-gdpr-applies='gdpr=${GDPR}'
    data-dcm-gdpr-consent='gdpr_consent=${GDPR_CONSENT_755}'
    data-dcm-addtl-consent='addtl_consent=${ADDTL_CONSENT}'
    data-dcm-ltd='false'
    data-dcm-resettable-device-id=''
    data-dcm-app-id=''>
  <script src='https://www.googletagservices.com/dcm/dcmads.js'></script>
</ins>

CM360 <ins> Tag (After Inserting Click Macro):

<ins data-dcm-click-tracker='%%CLICK_URL_UNESC%%' class='dcmads' style='display:inline-block;width:728px;height:90px'
    data-dcm-placement='N2308384.4381276ASIANET/B32107665.39507456'
    data-dcm-rendering-mode='iframe'
    data-dcm-https-only
    data-dcm-api-frameworks='[APIFRAMEWORKS]'
    data-dcm-omid-partner='[OMIDPARTNER]'
    data-dcm-gdpr-applies='gdpr=${GDPR}'
    data-dcm-gdpr-consent='gdpr_consent=${GDPR_CONSENT_755}'
    data-dcm-addtl-consent='addtl_consent=${ADDTL_CONSENT}'
    data-dcm-ltd='false'
    data-dcm-resettable-device-id=''
    data-dcm-app-id=''>
  <script src='https://www.googletagservices.com/dcm/dcmads.js'></script>
</ins>

2. Legacy CM360 Iframe / JavaScript Tag: Before & After Macro Insertion

In legacy CM360 <IFRAME> / <SCRIPT> tags, you must replace [timestamp] with %%CACHEBUSTER%% in both the <IFRAME> and <SCRIPT> URLs, and insert click=%%CLICK_URL_ESC%%; into the key-value string so GAM tracks clicks properly.

Legacy Iframe / JavaScript Tag (Before Macro Insertion):

<IFRAME SRC="https://ad.doubleclick.net/ddm/adi/N2308384.4381276ASIANET/B32107665.39507456;sz=728x90;ord=[timestamp];dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;tfua=;dc_sdk_apis=[APIFRAMEWORKS];dc_omid_p=[OMIDPARTNER];gdpr=${GDPR};gdpr_consent=${GDPR_CONSENT_755};dc_tdv=1?" WIDTH=728 HEIGHT=90 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR='#000000'>
<SCRIPT language='JavaScript1.1' SRC="https://ad.doubleclick.net/ddm/adj/N2308384.4381276ASIANET/B32107665.39507456;abr=!ie;sz=728x90;ord=[timestamp];dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;tfua=;dc_sdk_apis=[APIFRAMEWORKS];dc_omid_p=[OMIDPARTNER];gdpr=${GDPR};gdpr_consent=${GDPR_CONSENT_755};dc_tdv=1?">
</SCRIPT>
</IFRAME>

Legacy Iframe / JavaScript Tag (After Macro Insertion):

<IFRAME SRC="https://ad.doubleclick.net/ddm/adi/N2308384.4381276ASIANET/B32107665.39507456;click=%%CLICK_URL_ESC%%;sz=728x90;ord=%%CACHEBUSTER%%;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;tfua=;dc_sdk_apis=[APIFRAMEWORKS];dc_omid_p=[OMIDPARTNER];gdpr=${GDPR};gdpr_consent=${GDPR_CONSENT_755};dc_tdv=1?" WIDTH=728 HEIGHT=90 MARGINWIDTH=0 MARGINHEIGHT=0 HSPACE=0 VSPACE=0 FRAMEBORDER=0 SCROLLING=no BORDERCOLOR='#000000'>
<SCRIPT language='JavaScript1.1' SRC="https://ad.doubleclick.net/ddm/adj/N2308384.4381276ASIANET/B32107665.39507456;abr=!ie;click=%%CLICK_URL_ESC%%;sz=728x90;ord=%%CACHEBUSTER%%;dc_lat=;dc_rdid=;tag_for_child_directed_treatment=;tfua=;dc_sdk_apis=[APIFRAMEWORKS];dc_omid_p=[OMIDPARTNER];gdpr=${GDPR};gdpr_consent=${GDPR_CONSENT_755};dc_tdv=1?">
</SCRIPT>
</IFRAME>

3. Quick Reference: Essential GAM Macros for CM360 Tags

GAM MacroPurposeWhen to Use
%%CLICK_URL_UNESC%%Unescaped click-tracking URLUsed inside data-dcm-click-tracker on CM360 <ins> tags or at the beginning of a redirect URL.
%%CLICK_URL_ESC%%Single-escaped click-tracking URLUsed when the click URL is passed as a parameter inside another URL query string (such as legacy adi/adj tags).
%%CACHEBUSTER%%Random 8โ€“10 digit integer per requestReplaces [timestamp] after ord= in legacy tags and 1×1 impression tracking pixels.

AdOpsPedia Practical Toolkit

Written by Ganesh โ€” Senior AdOps & Programmatic Specialist

Troubleshooting live Google Ad Manager, Campaign Manager 360, or DV360 delivery? Use our free browser-based Interactive AdOps Tools Suite (CPM/vCPM Calculator, Discrepancy Diagnostics, CM360 Macro Wrapper, and IAB Ads.txt Validator) or read more about our editorial standards on the About page.

Leave a Reply