Implementing 3rd-party viewability tags in custom creative templates
All 3rd-party scripts that track viewability should be entered in the “Third-Party Tags” field.
Some 3rd-party tags require additional changes to function correctly.
Below are detailed instructions for the two most commonly used tags: IAS tags and Google Campaign Manager (DCM ads).
IAS tags (Integral Ad Science)
An IAS tag typically looks like this:
<SCRIPT TYPE="application/javascript" SRC="https://pixel.adsafeprotected.com/rjss/st/1234567/98765432/skeleton.js"></SCRIPT>
<NOSCRIPT><IMG SRC="https://pixel.adsafeprotected.com/rfw/st/1234567/10000000/skeleton.gif?gdpr=${GDPR}&gdpr_consent=${GDPR_CONSENT_278}&gdpr_pd=${GDPR_PD}" BORDER=0 WIDTH=1 HEIGHT=1 ALT=""></NOSCRIPT>
To make these tags work properly, you need to add ?ias_adpath=[CSS_PATH] to the script source.
Here’s the updated version:
<SCRIPT TYPE="application/javascript" SRC="https://pixel.adsafeprotected.com/rjss/st/1234567/98765432/skeleton.js?ias_adpath=[CSS_PATH]"></SCRIPT>
<NOSCRIPT><IMG SRC="https://pixel.adsafeprotected.com/rfw/st/1234567/10000000/skeleton.gif?gdpr=${GDPR}&gdpr_consent=${GDPR_CONSENT_278}&gdpr_pd=${GDPR_PD}" BORDER=0 WIDTH=1 HEIGHT=1 ALT=""></NOSCRIPT>
Replace [CSS_PATH] with the appropriate value. See the table below for reference.
For example, in the Floater template the tag will look like this:
<SCRIPT TYPE="application/javascript" SRC="https://pixel.adsafeprotected.com/rjss/st/1234567/98765432/skeleton.js?ias_adpath=.genecyAd-floater-eCont"></SCRIPT>
<NOSCRIPT><IMG SRC="https://pixel.adsafeprotected.com/rfw/st/1234567/10000000/skeleton.gif?gdpr=${GDPR}&gdpr_consent=${GDPR_CONSENT_278}&gdpr_pd=${GDPR_PD}" BORDER=0 WIDTH=1 HEIGHT=1 ALT=""></NOSCRIPT>
CSS classes for different templates
| Template | CSS Class / Macro |
|---|---|
| Floater | .genecyAd-floater-eCont |
| Slider | %%GENECY_VIEW_SELECTOR%% |
| Wallpaper | .genecyAd-wallpaper-eCont |
| Expander | .genecyAd-expander-eCont |
| Baselayer | %%GENECY_VIEW_SELECTOR%% |
| Parallaxer | .genecyAd-parallaxer-eCont |
| Catfisher | .genecyAd-catfisher-eCont |
| Intexter | .genecyAd-intexter-eCont |
| Roller | .genecyAd-roller-eCont |
| Interstitial | .genecyAd-interstitial-eCont |
| Responsiver | .genecyAd-responsiver-eCont |
| Cube | .genecyAd-cube-eCont |
| Sitebar | %%GENECY_VIEW_SELECTOR%% |
| Masthead | %%GENECY_VIEW_SELECTOR%% |
| Backgrounder | .genecyAd-backgrounder-eCont |
| Slash | .genecyAd-slash-eCont |
| Welcomer | %%GENECY_VIEW_SELECTOR%% |
| Carousel | .genecyAd-carousel-eCont |
| Rotator | .genecyAd-rotator-eCont |
| Converger | .genecyAd-converger-eLayerCont |
| Clipbanner | .genecyAd-clipbanner-eCont |
| Revealer | .genecyAd-revealer-eCont |
Using macros instead of CSS classes
Some templates (currently Slider, Baselayer, Sitebar, Masthead and Welcomer) support macros.
Macros will gradually be implemented in all templates.
For those templates, use the following macro instead of a CSS class:
%%GENECY_VIEW_SELECTOR%%
The template will automatically replace the macro with the appropriate CSS class.
Google Campaign Manager (DCM) tags
A typical Google Campaign Manager tag looks like this:
<ins class='dcmads' style='display:inline-block;width:300px;height:600px'
data-dcm-placement='N1234567.8901234GENECY-TESTDCM/B12345678.12345678'
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-click-tracker='%%CLICK_URL_UNESC%%'
data-dcm-app-id=''>
<script src='https://www.googletagservices.com/dcm/dcmads.js'></script>
</ins>
Based on feedback, these tags do not work with the default method of insertion in templates.
To fix this, add the following setting in the “Configurations” field:
appendhtmliframe=yes
This ensures the 3rd-party tags are generated inside an <iframe> element.
For more details about these tags and their attributes, see: Google Campaign Manager documentation
Articles
- What is custom creative templates for Google Ad Manager?
- What are the requirements?
- How to download a purchased custom creative template?
- How to install or update a custom creative template?
- How to change default values for a custom creative template?
- How to use a custom creative template?
- How to change HTML5 ad contents depending on a state of the Expander?
- How to generate a creative (creative template) preview URL?
- How to use JS callback events with custom creative templates?
- Managing HTML and ZIP Files with Creative Templates
- Implementing impression tracking in custom creative templates
- Implementing 3rd-party viewability tags in custom creative templates
- How to use HTML banners with multiple clickTAGs