Implementing Quantcast Measure (Server Side) with Google Tag Manager
  • 15 Feb 2024
  • 3 Minutes to read
  • Contributors
  • Dark
    Light

Implementing Quantcast Measure (Server Side) with Google Tag Manager

  • Dark
    Light

Article summary

Quantcast Measure (Server-Side) is fully integrated with Google Tag Manager. Installing your tag is now easier than ever.

Implement with Google Tag Manager

Get your P-Code

Your “P-Code” is the unique ID associated with your account. To copy your P-Code, navigate to the Accounts page in the Organization Manager.

1. Sign in to Quantcast.

2. In the navigation menu at the top of the screen, choose Accounts option in the Organization section.

3. On the Accounts screen, you will find your P-Code under the name of the account.

Create Client Side Variables

Create client-side variables:  These variables will read directly from your site and then be available to pass data from the client side to the server.

1. Within Google Tag Manager select the “Variables” section.

2. Create a new variable and select the relevant variable type depending on how you plan to access your data. For example, if you are leveraging a data layer that type can be used here.

3. Name the variable something appropriate and, depending on your variable type, set where the data will be read from. For example, a data layer variable. Take note of your variables as you will need to refer to them later.

4. Repeat steps 2 and 3 for other variables.

Create Server Side Variables

We recommend creating server side variables within Google tag manager to ensure data is collected correctly.

1. Within Google Tag Manager, select the “Variables” section.

2. Create a new variable and select “Event data” as the variable type

 

3. Add a descriptive name into the key path field. This should be a string, beginning with lowercase and containing no spaces.

4. Repeat steps 2 and 3 for other data points you intend to track (Available data points are userID, orderID, and revenue).

Add the Tag to Your Server Container

1. Create a new tag in your Server container within your Google Tag Manager account.

2. Click inside the tag configuration box, then select “Discover more tag types in the Community Template Gallery”.

3. Select Quantcast Measure.

4. Paste your P-Code in the first field. This field is required to enable your tag.

5. Add a value to the label field that represents your event. We recommend using labels such as _fp.event.pageview that reflect the trigger for this tag.

6. (optional) Add a variable for the email address of your logged-in users. These variables are those set up in the Create Client Side Variables section. 

7. Click inside the Triggering box and select an appropriate trigger for your tag. For example, your pageview tag would use the All Pages trigger.  This will fire the tag on all page load events. Please see additional information at the end of these instructions for further instructions on setting up tags.

8. Add the GA4 client tag. To do this go to the “Clients” section.

9.  Create a new GA4 server config. 

10. Check the Default GA4 paths and the Default gtag.js for specific IDs.

The measurement ID is an arbitrary ID to link the client and server-side configs and should not be your Google Analytics measurement ID. Take note of this value as you will have to use it again in the client tag setup.

11. Save and Publish the container.

12. Click on your Container ID on your workspace and copy your default Container URL.

For this step, we recommend first deploying server-side tagging on a subdomain of your website to improve Measure. Learn more here Custom domain configuration | Google Tag Manager - Server-side.

Setup a Client Tag

Tag setup can be done again through the tag manager or by adding tags directly to your site.

Using Tag Manager

1. Create a new tag in the Web container of your Google Tag Manager account. This is the container that typically contains traditional tags that can be found on your web pages. One tag per event is required.

2. Click inside the Tag Configuration box and select “Google Analytics: GA4 Configuration”. This tag will push the relevant data into the data layer allowing the server to read from it.

3. Add a measurement ID. This should not be your GA measurement ID and any generic string will work here but it must match that set in the server GA4 config.

 

4.  Select the Send a page view event when this configuration loads checkbox. 

5.  Select the Send to server container checkbox and enter the copied Container URL. This can be found in your server container settings.

6. Add the relevant fields to your GA4 tag.

Note: The field names for these should match the key path used in the server-side “Event data” variables.

7. Click on the triggers section and select All Pages. We recommend using the same trigger as step 7 of the Add the Tag to Your Server Container section.  The trigger will define when your event fires and we recommend using a trigger that reflects the event type such as conversion.

8. Save and Publish the tag.

 

 


Was this article helpful?

Changing your password will log you out immediately. Use the new password to log back in.
First name must have atleast 2 characters. Numbers and special characters are not allowed.
Last name must have atleast 1 characters. Numbers and special characters are not allowed.
Enter a valid email
Enter a valid password
Your profile has been successfully updated.
ESC

Q, facilitating knowledge discovery through conversational intelligence