Follow the process below to ensure strong campaign performance and robust insights.
Video Overview
The below videos walk through the exact steps to implement the Quantcast tag in Google Tag Manager. The steps are in text form further down the guide.
- Quantcast EasyTag Implementation
Reminders:
-
The Quantcast pixel template in GTM is only compatible for conversion tracking when the conversion event occurs on a page view event. If the conversion event occurs as part of a single page application or button click, then we will need to implement the pixel code in the Custom HTML field. Please refer to the instructions here.
-
Do not alter the code. Any edits to the code may result in the tag not collecting data.
-
The tag does not interfere with your page load. Quantcast tag is asynchronous, meaning, it loads in the background. See Get Started with Quantcast Tagging for more technical details.
What you need to continue:
- Quantcast P-code <P-CODE>
- Conversion Page Label <Conversion Label>
Quantcast Conversion Tag Implementation
Add the Quantcast Tag to your Conversion Activity
- Log into GTM, click Add A New Tag
2. Select Tag Configuration to open the GTM Tag Library
3. Find Quantcast Advertise in the Library
- IMPORTANT: Select the Quantcast Advertise tag type
4. Place the P-Code <p-code>
5. Place the Conversion Page label <INSERT CONVERSION LABEL>
- The Conversion Page Label allows Quantcast to collect your conversion activity separately from the rest of the site data. This is required for campaign configuration.
- Quantcast Advertise labels always begin with a _fp.event, and this has to be included. (For example, “_fp.event.Purchase Confirmation” would be appropriate for a Purchase Confirmation tag.)
-
In addition to the _fp.event label, Quantcast can capture additional hardcoded or dynamic labels in this field. These additional labels are optional, but they can be used for further segmentation of the conversion event. Each individual label should be separated by a comma. Examples include:
- Customer Type: _fp.customer.
- Product Category: _fp.pcat.
- Channel: _fp.channel.
6. Add Revenue, Order ID, and User ID by clicking the box with the + and selecting the Google Tag Manager Variable for the respective variable.
- See section “Adding Variables for Data Pass Back” at the end of the doc if you do not have variables created.
- For more information about User ID, click here.
7. Click Triggering
8. Select your Conversion Trigger
- See the section “Creating a Trigger” if you do not have a Conversion Page Trigger created.
- The pixel will only be compatible with page view triggers. If the conversion event occurs outside of a page view, then we will need to implement the pixel code as Custom HTML.
9. Your tag should look like the below. Click Save.
10. Name the tag you have created. We recommend using “Quantcast Conversion Tag”.
11. Click Save.
Your Conversion Tag setup is complete! Move on to the next step to finish setting up the rest of your tags.
Remaining Site Activity Setup
Navigate to a new Quantcast Advertise template (steps 1 and 2 in the Conversion Tag process).
1. Place the P-Code provided by Quantcast.
-
-
- P-Codes are case sensitive and 15 characters in length
- This is the only box you have to fill in!
-
2. Select Triggering
3. Select the All Pages trigger.
4. Select Add Exception to exclude the conversion page. The Quantcast conversion tag will only fire if this exception is setup.
5. Select the Trigger for your Conversion Page and click Save
6. Give the tag a name. We recommend using “Quantcast Advertise Remaining Pages”.
7. Click Save.
8. Navigate back to the GTM Account Page and click the red Publish button on the upper right. This will publish the Quantcast tag to your site.
9. Click Publish again after reviewing your changes
10. Add a description of the tag you are publishing and select Continue or select Skip to proceed without a description.
You are done! Please notify your Quantcast rep so that they can confirm your tags are collecting data.
Additional Instructions:
Creating a Trigger: Triggers govern when a tag is fired or not fired.
2. Click on Trigger Configuration
3. Select Page View from the Trigger Type
4. Enter the criteria to identify the page for which you want to create a trigger. Select Some Page Views.
- In this example, we are using “Page URL contains www.quantcast.com/thankyou”.
5. Click Save in the upper right. A window will prompt you to name your Trigger.
6. Enter a name that reflects the function of the Trigger. E.g. Conversion Page
7. Click Save
8. You Trigger is now ready to use
Adding Variables for Data Passback
1. Generate data on the page: There are various ways to complete this step. Below is the most common via a data layer.
- Update your page code to capture the data you want to collect in the data layer (e.g., order ID, revenue, customer type, etc). Additional instructions on the implementation of the data layer can be found here. The code would look something like this:
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'OrderID': 'OrderID_Value1',
'Variable_Name2': 'Variable_Value2',
'Variable_Name3': 'Variable_Value3'
});
2. Indicate to GTM the location of the data: In this example, we will set up OrderID.
- Click Variables from the GTM Menu.
- Click New under User-Defined Variables to open the setup menu.
- Click Untitled Variable and name your variable.
- Click the Variable Configuration area.
- Select the method which GTM will look for data pass back. We will select Data Layer Variable from this menu.
Add the Data Layer Variable Name in the field.
- We are using orderid as this is the name of the variable in the data layer. Your Data Layer Variable Name may be different. Leave all other settings as-is.
- Click Save on the upper right corner once this is complete.
- Repeat the steps above to add additional variables.
- Once your User Defined Variables are setup, they will be visible on the menu.
- Once you created the variables, return to the Conversion Tag setup to complete the implementation.
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.