Limited Offer: Get 2 Months FREE on annual plans, or get Lifetime Plan Claim Offer

Menu

How to Set Up Google Ads Conversion Tracking Correctly for Shopify Stores

## Why Accurate Conversion Tracking Matters For any Shopify store running Google Ads, conversion tracking is the foundation of measuring success. Without it, you're essentially flying blind — unable to calculate return on ad spend (ROAS), optimize campaigns, or allocate budget effectively. Many store owners assume built-in integrations handle everything, but subtle misconfigurations can lead to significant data discrepancies, double-counting, or under-reporting. This guide provides a step-by-step walkthrough for setting up conversion tracking correctly while avoiding common attribution pitfalls. ## Common Conversion Tracking Mistakes on Shopify Before diving into setup, let's review the frequent errors that cause data mismatches: - **Relying solely on the Google & YouTube app** without verifying event-level tracking. The app may only send basic page view data, missing key ecommerce events. - **Ignoring enhanced conversions**. Without hashed customer data, you lose the ability to match conversions back to ad interactions more accurately, especially with cookie restrictions. - **Duplicate conversion counting**. Placing the conversion snippet on your thank-you page without proper order ID deduplication can inflate metrics. - **Cross-domain tracking issues**. If your store uses a custom checkout domain (e.g., `checkout.yourstore.com`), the default tracking may break without `linker` configuration. - **Incorrect conversion attribution model**. Using last-click when data-driven is more appropriate can skew credit away from upper-funnel campaigns. ## Step-by-Step: Correct Setup for Shopify ### 1. Create Conversion Actions in Google Ads Navigate to **Tools & Settings > Measurement > Conversions**. Click **+ New conversion action** and select **Website**. Provide a name (e.g., "Purchase"), select category **Purchase/Sale**, and assign a value. Choose the attribution model that fits your business (we recommend **Data-driven** for most stores). Set the **conversion window** according to your sales cycle — typically 30-day click-through and 1-day view-through for ecommerce. ### 2. Install Global Site Tag (gtag.js) on Shopify In your Shopify admin, go to **Online Store > Themes > Actions > Edit code**. Open `theme.liquid` and locate the `<head>` section. Paste the Google Ads global site tag (gtag.js) directly before `</head>`. Alternatively, if you use Google Tag Manager (GTM), install the GTM container instead. **Pro tip**: If you already use the Google & YouTube app, the global tag might be pre-installed. Verify with Tag Assistant to avoid duplication. ### 3. Add the Purchase Event Snippet Create an event snippet for the conversion action. For Shopify, you can either: - **Use the Google & YouTube app’s conversion tracking module** (simpler but less flexible). - **Manually insert the snippet in the order status/thank-you page** (recommended for full control). To add manually, open `Settings > Checkout > Order status page` in Shopify. Paste the event snippet here. Ensure the snippet includes dynamic value and transaction ID to prevent duplicates: ```html <!-- Google Ads Purchase Event --> <script> gtag('event', 'conversion', { 'send_to': 'AW-XXXXXXXX/YYYYYYYY', 'value': {{ checkout.total_price | money_without_currency }}, 'currency': '{{ checkout.currency }}', 'transaction_id': '{{ order.order_number }}' }); </script> ``` The `transaction_id` field is critical for deduplication — without it, each page refresh might count as a new conversion. ### 4. Implement Enhanced Conversions Enhanced conversions send hashed first-party customer data (email, phone) from your checkout, improving matching accuracy. In the conversion action settings in Google Ads, turn on **Enhanced conversions** and follow the tag setup instructions. For Shopify, you can capture the customer email on the order status page: ```html <script> {% if checkout.email %} gtag('set', 'user_data', { 'email': '{{ checkout.email | sha256 }}', 'phone_number': '{{ checkout.billing_address.phone | sha256 }}' }); {% endif %} </script> ``` Insert this immediately after the global site tag. Ensure the email is lowercased and hashed with SHA-256. ### 5. Set Up Dynamic Remarketing (Optional but Recommended) For dynamic remarketing, add the Google Ads remarketing tag with custom parameters to your theme. This enables product-specific retargeting. Include the `ecomm_pagetype` and `ecomm_prodid` variables on product pages, cart, and thank-you page. ### 6. Verify and Test Use **Google Tag Assistant** (Chrome extension) to check that the global tag and conversion snippet fire correctly. Look for the green checkmark on the thank-you page after a test order. In Google Ads, go to the **Conversions** section and check the status column. It may take up to 24 hours for the tag to be verified. Use the **Google Ads preview and diagnostics tool** to simulate a click and confirm the conversion registers. ## Attribution Models and Conversion Windows: Avoiding the Trap Many Shopify merchants leave the attribution setting at default (last-click), but this can undercut top-of-funnel channels like display or video. Consider using **data-driven attribution** if your account meets eligibility — it distributes credit based on conversion probability. Also, be mindful of the conversion window. If you set it too short, you may miss delayed purchases. A combination of 30-day click and 1-day view typically works well. Include **view-through conversions** only if your campaigns are heavily display- or video-based; otherwise, they might inflate data. ## Troubleshooting: Why Data Still Doesn’t Match Even after setup, you might notice discrepancies between Google Ads and Shopify analytics. Common causes: - **Attribution differences**: Shopify reports sales based on last-click from any channel, while Google Ads only counts its own traffic. - **Ad blockers and browser privacy**: Some users block tracking scripts, resulting in under-reporting. Enhanced conversions partially mitigate this. - **Checkout on a separate domain**: If your checkout is on a domain different from your main store, **cross-domain tracking** must be configured via the `linker` parameter in gtag. - **Date/time zones**: Google Ads uses Pacific Time, whereas Shopify uses your store’s timezone. Ensure reporting periods align. ## Final Thoughts Proper conversion tracking is not a one-time setup; it requires ongoing monitoring as your store evolves. Regularly audit your tags, update enhanced conversion hashing when checkout fields change, and compare Google Ads data with Shopify reports to catch anomalies early. With the steps above, you’ll have a solid foundation for accurate measurement and better campaign performance.
Last updated: Jan 15 2026
AI Assistant
Hi! 👋 You are viewing How to Set Up Google Ads Conversion Tracking Correctly for Shopify Stores. Need any help with this topic?