Quantcast is fully integrated with Google Tag Manager. Installing your tag is now easier than ever.
💡Reminder:
Do not alter the code. Any code edits may cause the tag to stop functioning.
The tag does not affect your page load because it loads asynchronously (in the background). For more technical details, see Get Started with Quantcast Tagging.
⚠️What you need to continue:
You will need your Quantcast Live Tag, which is found on the Event Manager page.
Download Your Personalized GTM Container File
Navigate to the Q-Pixel section within the platform.
Select “Install Live Tag”
Expand the Google Tag Manager instructions and download your container file.
This will download a container file named quantcast_gtm_PCODE.json to your local machine.

Import Your Container File to Google Tag Manager
Note: To complete this step, you must have the necessary access to the Google Tag Manager container where you would like to deploy the pixel. If you do not have access, you can forward the file to the relevant teams for action.
Navigate to Google Tag Manager and select the container you wish to deploy the pixel within.
Navigate to the admin panel.
Select Import Container.
Select your Quantcast container file for upload.
Define the workspace to which you want to push your changes.
IMPORTANT!! Ensure you select the Merge option when importing; otherwise, this will override all existing settings
Select “Add to Workspace”
(1).png?sv=2022-11-02&spr=https&st=2026-01-05T14%3A10%3A36Z&se=2026-01-05T14%3A23%3A36Z&sr=c&sp=r&sig=sQiPCqUHSFBW6UteN%2BoLjn0SLrZ%2FaEmIBq6whJA49hc%3D)
Import Content Overview
Quantcast Base Tag (Tag)
This foundational tag initializes the Quantcast pixel and enables the capture of rule-based and code-defined events across your website.
Quantcast Tag Conversion (Tag)
This tag records the primary conversion event for your Quantcast account — typically the most valuable user action on your site.
By default, the event label is PurchaseConfirmation, though you can customize this to reflect your actual conversion event.
Ensure the label retains the _fp.event prefix.
The trigger for this tag is included by default, but you can substitute it with an existing trigger specific to your conversion setup.
Quantcast Tag Conversion Trigger (Trigger)
This trigger activates the conversion tag when a qualifying conversion occurs, based on a dataLayer push with the name purchase.
You may replace or remove this trigger if a suitable one already exists in your GTM setup.
The trigger name can also be customized to match your site’s existing dataLayer event name.
Quantcast Tag History Change (Trigger)
Triggers on changes to the URL fragment or when the HTML5 pushState API is used.
Ideal for measuring virtual pageviews in single-page applications (SPAs).
Quantcast Tag ID (Variable)
Stores your unique Quantcast p-code, which links data captured on your site to your Quantcast account.
This is essential for ensuring proper data partitioning across customer accounts.
Quantcast Tag Order ID (Variable)
Captures the order or transaction ID associated with a conversion for detailed attribution.
Defaults to the dataLayer variable transactionId. Update as needed to reflect your implementation.
If left unset, measuring remains functional, but conversion Order IDs will not be captured.
Quantcast Tag Pageview (Tag)
Fires on all pageviews to log user navigation across the site.
Uses GTM’s default pageview trigger by default but can be customized.
Consent is managed by the Quantcast tag itself, but it can also integrate with consent signals if required.
Quantcast Tag Revenue (Variable)
Captures the revenue amount associated with a conversion to support campaign performance analysis.
Defaults to the dataLayer variable transactionTotal. Update this to match your current setup.
If left unset, conversion events will still be measured, but revenue data will not be recorded.
Reviewing Your Import
You can now navigate to the container overview in Google Tag Manager to view the changes being implemented. In order for all tags to work as intended, we recommend reviewing the following factors:
Review all tags and variables included in the import
You may update tag labels, but the prefix _fp. must remain intact
Add relevant triggers to any tags where they are missing
Review the value for Quantcast Tag Conversion Trigger
This is currently set to fire when a data-layer push occurs with the label purchase.
Please update the label to match that of your current conversion data layer push
If you do not have an existing conversion data layer push, then please update the Quantcast Tag Conversion with your existing conversion trigger
Review the value for Quantcast Tag Order ID.
By default, this variable is set to read from a data layer variable named transactionId
To capture your order ID, either add a data layer variable for transactionId or update the variable to read the relevant data variable
Review the value for Quantcast Tag Revenue
By default, this variable is set to read from a data layer variable named transactionTotal
To capture your revenue, either add a data layer variable for transactionTotal or update the variable to read the relevant data variable
Remove any tags that are not applicable to your use case
Publish Your Changes and Go Live
Once you are happy with the changes in Google Tag Manager, you are ready to publish the changes and go live.
If you have any questions, please contact platform.support@quantcast.com.