Implementing Quantcast Easy Tag for Advertise in Google Tag Manager (GTM)

Follow the process below to ensure strong campaign performance and robust insights.

Reminders:

  • 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 here for more technical details.

What you need to continue:

  • Quantcast P-code <P-CODE>
  • Conversion Page Label <Conversion Label>

Add the Quantcast Tag to your Conversion Activity

  1. Log into GTM, click Add A New Tag

1

2.  Select Tag Configuration to open the GTM Tag Library

2

3. Find Quantcast Advertise in the Library

  • IMPORTANT: Select the Quantcast Advertise tag type

3

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 page 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.)

6. Add Revenue and Order ID by clicking the box with the + and selecting the Google Tag Manger 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.  

7. Click Triggering

GTM Convesrion page

8. Select your Conversion Trigger

  • See section “Creating a Trigger” if you do not have a Conversion Page Trigger created.

GTM Conversion Trigger

9.Your tag should look like the below. Click Save.

GTM Conversion Trigger complete

10. Name the tag you have created. We recommend using “Quantcast Conversion Tag”.

11. Click Save.

Name and save conversion tag

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 Conversion Tag process).

1. Place the P-Code provided by Quantcast.

      1. P-Codes are case sensitive and 15 characters in length
      2. This is the only box you have to fill in!

2. Select Triggering

remaining tags pcode and trigger

3. Select the All Pages trigger.

all pages trigger

4. Select Add Exception to exclude the conversion page.  

add exception

5. Select the Trigger for your Conversion Page and click Save

Conversion tag exception

6. Give the tag a name. We recommend using “Quantcast Advertise Remaining Pages”.

7. Click Save.

remaining page 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.

14

9. Click Publish again after reviewing your changes

15

10. Add a description of the tag you are publishing and select Continue or select Skip to proceed without a description.

16

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.

1. Select Triggering and click the + in the upper right to create a new trigger.

17

2. Click on Trigger Configuration

18

3. Select Page View from the Trigger Type

19

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”.

20

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

21

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). This code must be added before the Google Tag Manager Container tag to ensure the data will be available. If the data layer is added after Google Tag Manager, your values will pass back as “undefined”.

22

2. Indicate to GTM the location of the data: In this example, we will set up OrderID.

  • Click Variables from the GTM Menu.

23

  • Click New under User-Defined Variables to open the setup menu.

24

  • Click Untitled Variable and name your variable.
  • Click the Variable Configuration area.

25

  • Select the method which GTM will look for data pass back. We will select Data Layer Variable from this menu.

26

  • 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.

27

  • 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 the Quantcast Inspector.

You are done! Please notify your Quantcast rep so that they can confirm your tags are collecting data.