This guide will provide detailed instructions on how to implement the Quantcast Choice Universal Tag. Please note that before tagging, you should complete the site and consent configurations - these steps and more are outlined in our User Guide which features detailed instructions for setting up your CMP.
The Universal Tag includes both Quantcast Choice & Quantcast Measure, our audience insights and analytics tool. This enables us to provide Quantcast Choice for free to all users and makes implementation of the combined tag easier.
This guide will show you how to implement your Quantcast Choice Universal Tag in order to capture consent before allowing any tags to fire across your websites. Please note:
- The Universal Tag is asynchronous and, once consent is gathered, will not impact the other tags on your site from loading.
- It is strongly recommended that the CMP tag fires first in the header to ensure you capture user consent before firing any vendor tags.
- Firing tags before a user makes consent choices leaves your website open to compliance risks.
- Loading the CMP later may cause timeout issues (ex. IAB vendors unable to get the consent string in time, which may negatively impact revenue).
Retrieving & Implementing your Tag
- After Adding your Sites, click on Get Universal Tag in the top, right corner of the Privacy portal
- A modal will appear that contains the code that you will copy and place on your site as well as helpful links to more detailed instructions.
- Make sure you copy and paste the full tag into your site header and avoid modifying the tag as changes may prevent the CMP from working properly.
- Once your tag is implemented successfully, consent metrics will begin populating in 1-2 days (and the status beacon will change from orange to green).
Implementing with Google Tag Manager
For GTM support, please see the TCFv2 Google Tag Manager (GTM) Implementation Guide.
Confirming the Tag is Live
Callbacks are intended to be handled directly by the CMP through event listeners, as the calls to the CMP commands are intended to be resolved in a synchronous way. We recommend attaching asynchronous callbacks to the CMP through this method as it will be the source of information set up by the CMP at specific moments.
- Asynchronous Consent String API - When implemented, can add the consent handler, then call the TC Data API to retrieve the string
- CMP Ping - You can use the Ping once loaded to ensure the CMP is available to you.
Troubleshooting the CMP behavior using developer console of a browser is the best way to ensure that the tag implementation is done correctly. Some of the common issues that can impact CMP prompt are listed below.
Site is attempting to load the choice configuration and errors out.
Solution: Please ensure that the API call, like the example above, matches the exact same site URL you configured in the Choice Portal. Most common mistakes include:
- Entering domain.com in the Choice 'Site' portal when the site actually loads as www.domain.com (or vice versa) - be sure these match exactly and are lower-case.
- Not enabling 'Apply to all my subdomains?' option when creating or editing sites.
- Not entering the exact 'accountId' or 'p-accountId' - please copy this exactly since it is case-sensitive and do not include the 'p-' prefix.
Custom implementation invokes API to retrieve nonIAB vendor list
Solution: Since the CMP handles the call to get non-IAB vendors by default, we do not recommend making edits to the tag to do so manually. If a developer intends to invoke this manually, they need to handle HTTP 403 error response returned when there are no non-IAB vendors listed for the account.