To track conversions (like order confirmations) in Shopify using ClickGUARD, you can install the conversion code either through Google Tag Manager (GTM) or directly in Shopify. Follow the method that suits your setup.
Method 1: Using Google Tag Manager
This method assumes that your Shopify store already has the ClickGUARD tracking code installed via GTM.
Step 1: Verify ClickGUARD Tracking Code
Ensure the ClickGUARD tracking code is installed on your site. Refer to this guide if needed.
Step 2: Open Google Tag Manager
Log in to Google Tag Manager for the account connected to your Shopify store.
Step 3: Get the Installation Code
-
Click on Admin
- Select Install Google Tag Manager
- Copy the code block that belongs in the
<head>
section of a page
Step 4: Open Shopify Settings
-
Log in to your Shopify Admin
- Click the gear icon in the bottom left corner to open Settings
Step 5: Go to Customer Events
From the left sidebar, click Customer Events.
Step 6: Add a Custom Pixel
Click Add custom pixel to create a new pixel.
Step 7: Paste the GTM Code
Paste the GTM <script>
code, but remove the <script>
tags. Only include the JavaScript content.
Step 8: Add Conversion Tracking Code
You need to define which events to track. Use Shopify’s Standard Events documentation to identify the right one(s). For example, a completed checkout:
Step 9: Set Customer Privacy Permissions
Ensure the pixel is allowed to run under the customer’s privacy preferences.
Step 10: Connect the Pixel
Click Connect to save and activate the pixel.
Method 2: Without Google Tag Manager
If you're not using GTM, you can manually insert the ClickGUARD script as a custom pixel.
Step 1: Open Shopify Settings
Click the gear icon in the bottom-left corner to open Settings.
Step 2: Go to Customer Events
From the sidebar, click Customer Events.
Step 3: Add a Custom Pixel
Click Add custom pixel.
Step 4: Paste the ClickGUARD Script
const script = document.createElement('script');
//You can get your tracking ID by clicking "manual" on the tracking code settings
script.src = 'https://pulse.clickguard.com/s/YOUR_CLICKGUARD_TRACKING_ID
script.async = true;
Replace YOUR_CLICKGUARD_TRACKING_ID
with your actual tracking ID (found under “Manual” in ClickGUARD settings).
Step 5: Add Conversion Tracking Code
Add the code for which conversion needs to be recorded. Use Shopify’s Standard Events documentation to identify the right one(s).
Below is an example of a checkout complete event:
script.onload = () => {
analytics.subscribe("checkout_completed", (event) => {
if (window.CG) {
CG.conversion();
}
});
};
document.head.appendChild(script);
Step 6: Set Customer Privacy Permissions
Ensure the pixel is allowed to run under the customer’s privacy preferences.
Step 10: Connect the Pixel
Click Connect to save and activate the pixel.
Comments
0 comments
Article is closed for comments.