Using poll units with Google Tag Manager

It is possible to utilize Google Tag Manager (GTM) to inject a tag of custom HTML based on a trigger. 

First, create a custom HTML tag: 


Next, insert the poll unit integration code from the InsightStore or provided by the account manager.


Example integration code:

Markup
<div id="civsci-id-923320755" data-civicscience-widget="50f3b64e-00fa-11e2-bb87-12313809f6d1"></div> 
<script type="text/javascript" async src="https://get.civicscience.com/jspoll/5/csw-polyfills.js"></script>

By default, GTM will place all custom HTML tags at the end of the body element of the page. This is probably not where an instance of the poll unit should be placed. The actual implementation of where and how a poll unit should be placed varies per media partner design and system implementation. The easiest route is to:

  1. Place the integration div (a div like the one above) somewhere in the site's web pages via CMS or another tool.
  2. Create a custom tag but only utilize the script portion of the integration code so that the poll unit will be rendered at the location of the integration div.

Finally, configure the trigger in GTM. For example, a poll unit could be rendered on all pages by default. 

Notes

  • Some browsers and/or adblockers are known to block items originating from GTM
    • Firefox and Safari have been observed to prevent the display of poll units via GTM
  • Google Tag Manager and Google Ad Manager are different products, and these instructions will not work in GAM.