If you’re looking to leverage Google Ads in your Shopify store, we’ve got you covered. Understanding and implementing conversion tracking is key to optimizing campaigns and maximizing your return on investment, so following these steps will help set you up so you can gain the insight you need.
Sections
Install Google Ads Conversion Tracking in 5 Steps
To install Google Ads conversion tracking with Shopify customer events, you’ll need to follow these steps:
1. Set up Google Ads Conversion Tracking
Log into your Google Ads account and go to “Tools & Settings” > “Measurement” > “Conversions”. Create a new conversion action and choose “Website” as the source. Fill in the details for your conversion action like the name, value, and other settings. Select “Use Google Tag Manager” and click “Create and Continue.” Copy the conversion ID and conversion label provided.
2. Integrate Google Ads Conversion Tracking with Shopify
Log in to your Shopify admin panel and go to “Online Store” > “Preferences.” Scroll down to the “Google Analytics” section, and paste the conversion ID into the “Google Ads Conversion ID” field and the conversion label into the “Google Ads Conversion Label” field. Don’t forget to click “Save.”
3. Install Google Tag Manager (if not already installed)
Sign in to your Google Tag Manager account or create one if you haven’t already. Create a new container for your Shopify store and follow the instructions to install the Google Tag Manager container code on your Shopify store. You’ll typically add it to your theme files in the section where you find other scripts such as Google Analytics.
4. Set Up Shopify Customer Events
Log in to your Shopify admin panel and go to “Settings” > “Checkout.” Scroll down to the “Order Processing” section and enable “Additional scripts.” Below is the code snippet you’ll need to paste into the “Additional scripts” field, replacing it with your Google Tag IDs.
// Initialize the dataLayer array
window.dataLayer = window.dataLayer || [];
// Function to send data
function gtag() { dataLayerPYS.push(arguments); }
// Create a script element for the Google Tag Manager
var gtagScript = document.createElement(‘script’);
gtagScript.async = true;
gtagScript.src = ‘https://www.googletagmanager.com/gtag/js?id=AW-1111654878’;
// Append the script to the document head
document.head.appendChild(gtagScript);
// Initialize
gtag(‘js’, new Date());
// Set your configuration
gtag(‘config’, ‘AW-1111654878’);
// Assuming you have the analytics library loaded
analytics.subscribe(“page_viewed”, (event) => {});
analytics.subscribe(“checkout_completed”, (event) => {
gtag(‘event’, ‘conversion’, {
‘send_to’: ‘AW-1111654878/_j77CJXitJAYJHINIUHrIp’,
‘value’: event.data.checkout.totalPrice.amount,
‘currency’: event.data.checkout.currencyCode,
‘transaction_id’: event.data.checkout.order.id
});
});
Please make sure you place a test order on your Shopify store and complete the checkout process. Then, check your Google Ads and Google Tag Manager accounts to ensure that the conversion tracking is working correctly.