- Print
- DarkLight
Article summary
Did you find this summary helpful?
Thank you for your feedback
Implementing Quantcast Measure on your Shopify is simple and easy.
Code:
Please refer to Shopify’s Standard Events page for additional information.For a resource on building Shopify themes, see Shopify's Cheat Sheet.
- Login, and select Online Store from the navigation bar.
- On the top right corner, click on the 3 dots, and select Manage App.
- Navigate to Customer Events, click on “Add Custom Pixel”, and give it a descriptive name.
- Copy the code below and paste it into the Code box. Make sure to update the placeholder in the "qacct" field to reflect your Quantcast P-Code.
Code:
// Load Quantcast SDK
const script = document.createElement('script');
script.src = "https://secure.quantserve.com/quant.js";
script.async = true; script.type = "text/javascript";
const script = document.createElement('script');
script.src = "https://secure.quantserve.com/quant.js";
script.async = true; script.type = "text/javascript";
document.head.appendChild(script);
// Initialize Quantcast
window._qevents = window._qevents || [];
// Subscribe to Shopify events
analytics.subscribe("page_viewed", (event)=>{
window._qevents.push({
"qacct": "p-*************",
"labels": "_fp.event.PageView,_fp.event." + event.context.document.title,
"event": "refresh"
});
});
analytics.subscribe("checkout_completed", (event) => {
window._qevents.push({
"qacct": "p-*************",
"labels": "_fp.event.Purchase Confirmation",
"orderid": event.data?.checkout?.order?.id,
"revenue": event.data?.checkout?.totalPrice?.amount,
"event": "refresh"
});
});
- The end result should look something like this:
Please refer to Shopify’s Standard Events page for additional information.For a resource on building Shopify themes, see Shopify's Cheat Sheet.
Verify tag implementation using the Quantcast Tag Inspector
The Quantcast Tag Inspector is a Google Chrome plugin that checks whether your Quantcast Tag and Audience Segments are implemented correctly. Install the Inspector to review your site's individual pages and ensure the audience segments are firing correctly. For more information, see the Inspect Your Tag help document.You are done! Please check the Q Pixel app to confirm that your tags are collecting data. If you do not see any activity, contact [email protected] or submit a Help Center request at www.quantcast.com. For more information on tagging, see our Tagging Overview article.Was this article helpful?