Implementing Quantcast Easy Tag for Advertise in Shopify
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 (it loads in the background). See here for more technical details.
What you need to continue:
- Quantcast Easytag
- Conversion Activity Macros
Add the Quantcast Tag to your Conversion Activity
1. Login, select Setting and then Checkout
2. Navigate to the “Additional Scripts” text box
3. Update the added variables placeholder with custom variable macros to pull in the the corresponding information. The macros should be placed between single quotes.
a. Common macros are below. More details may be found here. This data allows Quantcast to refine optimizations, validate campaign performance, and share detailed insights.
i. Revenue: {{ total_price | money_without_currency | remove: ',' }}
ii. Order ID; {{ order_number }}
4. Quantcast recommends adding an additional Liquid If statement around the pixel to prevent the tracking of duplicate orders. This will ensure that the Quantcast pixel only fires the first time the order status page is accessed so that subsequent visits will not be considered conversions.
To set this up, place the Quantcast pixel between the Shopify Tags, {% if first_time_accessed %}
and {% endif %}
. Example below:
{% if first_time_accessed %}
<!-- Start Quantcast Tag -->
<script type="text/javascript"> window._qevents = window._qevents || []; (function() { var elem = document.createElement('script'); elem.src = (document.location.protocol == "https:" ? "https://secure" : "http://edge") + ".quantserve.com/quant.js"; elem.async = true; elem.type = "text/javascript"; var scpt = document.getElementsByTagName('script')[0]; scpt.parentNode.insertBefore(elem, scpt); })(); window._qevents.push({qacct:"p-123456789",labels:"_fp.event.Purchase Confirmation",orderid:'{{ order_number }}',revenue:'{{ total_price | money_without_currency | remove: ',' }}',event:"refresh"}); </script>
<!-- End Quantcast tag -->{% endif %}
5. Paste Quantcast tag into the box
6. Select Save
Remaining Site Activity
1. Navigate to themes
2. Under layout select “theme.liquid”
3. Select “Edit HTML/CSS” under the top right overflow button
4. Copy/paste the Quantcast tag before </body>
5. Select Save
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.
Additional instructions on Shopify:
Help Center - Implementing Order ID
Help Center - Revenue (Total Price)
Help Center - Returning Purchaser
https://help.shopify.com/themes/customization/order-status/first-time-accessed