In this article, we are going to see how to implement the macro in the Iframe and Javascript tag from the CM360 formerly known as DCM.

Mostly Google Ad Manager will automatically recognize the DCM tag automatticaly and will insert the macro. Suppose just in case, macro is not inserted automatically means you can follow the below setps to insert it.

This is how the tag will looks like before inserting the tags,

<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>

After Inserting 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>

DCM(CM360) Legacy Iframes/Javascript tag wihtout macro,

<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>

After Macro insertion it will looks like below one,

<IFRAME SRC="https://ad.doubleclick.net/ddm/adi/N2308384.4381276ASIANET/B32107665.39507456;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;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>