Tag implementation is simple and straightforward directly on your site. If you're using a Tag Manager, see our platform-specific implementation guides for popular vendors.
As a reminder, we recommend tagging every page of your site to ensure strong campaign performance and robust insights.
Implementing Quantcast Tag Directly on Your Website
Follow this simple 2-step process to ensure strong campaign performance and robust insights. Place the tag between the <body> … </body> HTML markers.
Reminders:
- Do not alter the code. Edits to the code may disable the tag from collecting data.
- The tag does not interfere with your page load. Quantcast tag is asynchronous (it loads in the background). See Get Started with Quantcast Tagging for more technical details.
1. Conversion Activity tag: add the below tag to your conversion page(s) and replace the placeholders in the tag to fire the corresponding data. This data allows Quantcast to refine optimizations, validate campaign performance, and share detailed insights. Example: revenue.INSERT+REVENUE will return orderid.23.45 to indicate a transaction of $23.45. See how to implement data passback in more details.
<!-- Start Quantcast Tag --> <script type="text/javascript"> window._qevents = window._qevents || []; (function() { var elem = document.createElement('script'); elem.src = (document.location.protocol == "https:" ? "https://secure" : "http://edge") + ".quantserve.com/quant.js"; elem.async = true; elem.type = "text/javascript"; var scpt = document.getElementsByTagName('script')[0]; scpt.parentNode.insertBefore(elem, scpt); })(); window._qevents.push({qacct:"p-test",uid:"__INSERT_EMAIL_HERE__",labels:"_fp.event.Order Completed,_fp.pcat.INSERT+PRODUCT+CATEGORY,_fp.customer.INSERT+CUSTOMER+TYPE,_fp.clothingtype.INSERT+CLOTHINGTYPE",orderid:"INSERT+ORDER+ID",revenue:"INSERT+REVENUE",event:"refresh"}); </script> <!-- End Quantcast tag -->
2. Remaining Site Activity: add the below tag to the remaining pages.
<!-- Start Quantcast Tag --> <script type="text/javascript"> window._qevents = window._qevents || []; (function() { var elem = document.createElement('script'); elem.src = (document.location.protocol == "https:" ? "https://secure" : "http://edge") + ".quantserve.com/quant.js"; elem.async = true; elem.type = "text/javascript"; var scpt = document.getElementsByTagName('script')[0]; scpt.parentNode.insertBefore(elem, scpt); })(); window._qevents.push({qacct:"p-test",uid:"__INSERT_EMAIL_HERE__"}); </script> <!-- End Quantcast tag -->
Verify tag implementation using the Quantcast Tag Inspector.
The Quantcast Tag Inspector is a Google Chrome plugin that helps you check whether your Quantcast Tag and Audience Segments are implemented correctly. Install the Inspector to review individual pages of your site, and make sure the Audience Segments are firing correctly. Learn more about how to Inspect Your Tag.
You are done! Please notify your Quantcast rep so that they can confirm your tags are collecting data.