How To Set Up Google Analytics And Tag Manager On Shopify

To set up Google Analytics on Shopify, install the Google & YouTube app from the Shopify App Store. The app adds the Google tag to every page, including checkout and post-checkout, and connects directly to your GA4 property. Tag Manager cannot be set up through the app, and Google warns that running it inside a Shopify custom pixel is not a supported implementation, so many features may not work.

Shopify is deprecating legacy tagging methods like checkout.liquid and additional scripts. Google recommends the Google & YouTube app because it is built to stay compatible with Shopify's evolving checkout. This guide walks you through the setup, what the app tracks out of the box, how to handle Tag Manager, and how to test purchases.

The Google And YouTube App Route

The Google & YouTube app is Google's recommended method for adding Google tags to Shopify. It installs the Google tag on every page, including the checkout and post-checkout pages, and keeps your measurement working as Shopify deprecates legacy tagging methods like checkout.liquid and additional scripts. If you have existing Google tags from a previous setup that are affected by the updates to the Thank-you and Order status pages, the app's migration tool detects them and helps you move them over.

Install the app from the Shopify App Store. Open it and sign in with a Google account that has direct administrator access to your Google Analytics account (the account that contains your GA4 property), Google Ads account, or Merchant Center account. The app then prompts you to connect one account of each type. If you do not have access because an agency manages your accounts, coordinate with them to complete the migration. You can still migrate tags without connecting an account if needed, though a direct connection is what lets the app show additional details about your tag.

Click path: Shopify admin then Google & YouTube app then OverviewShopify adminGoogle & YouTube appOverview
The Google & YouTube app Overview page, where a banner offers to migrate affected Google tags.

Once connected, the app handles your sitewide Google tagging. If the app finds tags affected by the Thank-you and Order status page updates, a banner on its Overview page offers to migrate them: click Get started. The app also lets you set up Google tags and conversion events directly. In-code customizations from a previous tag installation, such as privacy settings or feature settings, are not replicated automatically. Review your tag configuration after migration to catch any missing settings.

Shopify Plus merchants have until August 28, 2025 to migrate; non-Plus stores have until August 26, 2026. After these dates, Shopify will restrict stores that have not upgraded their post-checkout pages, which can severely reduce your campaign effectiveness. Migrating early allows Google's AI to learn and optimize your bidding. For help verifying your tag, use Google Tag Assistant. If you need to find your measurement ID, see Where To Find Your GA4 Measurement ID.

The app also supports product sync for Merchant Center and can automatically claim your website domain. If you use multiple domains, check that the claimed domain matches your product URLs to avoid product approval issues. You can adjust this in Merchant Center under Business info > Edit online store. Learn more about migrating your Google tags.

What It Tracks Out Of The Box

When you connect the Google & YouTube app to your GA4 property, the Google tag loads on all store pages, including the checkout and post-checkout pages. Because the tag runs in the normal page environment (not inside Shopify's custom pixel sandbox), GA4's automatically collected events and enhanced measurement work as intended. This means you get first_visit, session_start, user_engagement, and page_view events without extra configuration.

For ecommerce, Google says the app supports standard event and tag configuration; check the app itself for the exact event list. If you use order-level discounts, note that at the end of April 2025 Shopify corrected how subtotalPrice is reported on the new Thank-you page. Previously it did not subtract order-level discounts, inflating reported purchase values. Now it reflects the discounted subtotal, so if your conversion measurement uses subtotalPrice, reported purchase values from around April 22, 2025 may be lower but more accurate.

Enhanced measurement events, such as scroll tracking, outbound link clicks, site search, and YouTube video engagement, are controlled by your GA4 property settings. You can turn them on or off in Admin > Data streams > your stream > Enhanced measurement.

If you need events beyond the standard set, you can configure additional conversion events inside the Google & YouTube app for Google Ads, or use GA4's custom event creation in the interface. However, code-based customizations that modify the tag directly are not supported through the app. For advanced tracking, you may need to supplement with a separate method, but keep in mind the limitations of custom pixels if you go that route. Google lists consent mode URL passthrough and cross-domain measurement among the features that may not work from a custom pixel, and notes that consent treatment inside a custom pixel may differ from a normal Google tag setup.

Short on time? Analytics Art can check this in your property for you.

Adding Tag Manager With Customer Events

Google Tag Manager cannot be set up through the Google & YouTube app, because of Shopify platform restrictions. Merchants who want a container on the store often load it through Shopify's custom pixel feature (managed under Customer events). Google does not support running Tag Manager inside a custom pixel, and says many core features and tags will not work as expected.

Custom pixels load inside a sandboxed environment with limited access to standard web technologies and to information about your site and how users interact with it. Google lists these Tag Manager features as ones that may not work there:

FeatureStatus
Preview modeMay not work
Many trigger typesMay not work
Many built-in variablesMay not work
Many user-defined variablesMay not work
Custom or third-party tags that modify the DOM (consent banners, chatbot widgets, A/B experiments, user surveys and others)May not work
Tag coverage summaryMay not work
Click path: Shopify admin then Settings then Customer eventsShopify adminSettingsCustomer events
Customer events list in Shopify settings.

Because of these limitations, Google strongly recommends moving your Google tags out of Tag Manager and into the Google & YouTube app. For third-party tags that require GTM, check if the provider offers a native Shopify app. If you must keep GTM on your store, test each tag thoroughly and be prepared for ongoing maintenance as Shopify updates its checkout. Google support cannot help troubleshoot issues caused by custom pixel implementations. Read more about the limitations of custom pixels.

If you previously added GTM through checkout.liquid or additional scripts, those methods are deprecated and will stop working after the checkout upgrade deadlines. Remove the old GTM code and replace it with the app for Google tags. For non-Google tags, consult the vendor's Shopify integration.

Avoiding Double Counting

If you migrate to the Google & YouTube app without removing your old Google tags, you will send duplicate events to GA4. This inflates metrics like page views, conversions, and user counts, making your reports unreliable. Double counting is especially common if you previously used the legacy Shopify Google Analytics integration, a custom pixel, or a hardcoded gtag.js snippet.

Start with the legacy Google Analytics integration on Shopify's Online Store > Preferences page, which Shopify has deprecated. If you did not move that tag to the Google & YouTube app by February 2, 2025, Shopify converted it to a custom pixel to prevent breakage. Once the app handles your Google tags, look through your custom pixels (under Customer events) for any that still load Google tags, and remove them.

Next, inspect your theme files. If you hardcoded the Google tag or a Tag Manager container into your theme code, remove that code. The same goes for any hardcoded tags in checkout.liquid or additional scripts, though those methods are now deprecated and may already be inactive.

The Google & YouTube app detects tags affected by the Thank-you and Order status page updates and helps you migrate them; Google's advice is to remove the duplicates afterwards. After cleaning up, use GA4 DebugView or Tag Assistant to confirm that only one instance of each event fires. Pay special attention to the purchase event on the Thank You page, as duplicate purchase events can seriously skew revenue data.

If you work with an agency, ask them to audit your Shopify store for leftover tags. Even a single extra snippet can cause double counting, so a thorough review is worth the time. If you had the legacy Google Analytics integration and did not migrate by February 2, 2025, Shopify converted it to a custom pixel automatically. That pixel may still be sending data, so remove it once the app is in place.

Testing Purchases

After setting up the Google & YouTube app, verify that the purchase event fires correctly on your Thank You page. The most reliable way is with Google Tag Assistant. Install the Tag Assistant Companion browser extension, then go to tagassistant.google.com and click Add domain, enter your store URL and click Connect. Then complete a test purchase in the window that opens.

In Tag Assistant, you should see a purchase event with parameters like value, currency, transaction_id, and an items array. Compare value with the amount you expect for that order. If you offer order-level discounts, remember the April 2025 subtotalPrice correction described above: the value now reflects the discounted subtotal.

You can also use GA4 DebugView to see events in real time. In your GA4 property, go to Admin > Data display > DebugView and look for the purchase event while you complete a test order. DebugView shows all events and their parameters, which helps spot missing or incorrect data.

If you are using Tag Manager inside a custom pixel, Tag Assistant may not work, since Google lists it among the features that may not function from a custom pixel. This is another reason to move Google tags to the app. For third-party tags that remain in GTM, test them manually by checking network requests in your browser's developer tools.

After testing, monitor your GA4 reports for a few days to confirm that purchase counts align with your Shopify orders. Small discrepancies are normal, but large gaps indicate a setup issue that needs attention.

Frequently Asked Questions

Does Shopify Support Google Analytics 4?

Yes, through the Google & YouTube app. The app installs the Google tag and connects directly to your GA4 property, supporting automatically collected events, enhanced measurement, and ecommerce tracking. The legacy Shopify Google Analytics integration on the Online Store > Preferences page has been deprecated.

How Do I Remove Google Tag Manager From Shopify?

If you added GTM via a custom pixel, go to Settings > Customer events and delete the pixel. If you hardcoded the GTM snippet in theme.liquid or checkout.liquid, remove that code. For Google tags, migrate them to the Google & YouTube app instead. After removal, verify with Tag Assistant that no GTM container loads.

What Is the Google & YouTube App on Shopify?

It is a Google-developed app in the Shopify App Store that integrates Google Analytics, Google Ads, YouTube, and Merchant Center with your Shopify store. It installs the Google tag sitewide, supports conversion tracking, and is Google's recommended method, built for compatibility with Shopify's evolving checkout.

What Happens If I Use a Custom Pixel for Google Tags?

Your data collection will be limited. The pixel runs in a sandboxed iframe, so features like enhanced measurement, cross-domain tracking, and consent mode may break. Tag Manager preview mode and many triggers will not work. Google support cannot help troubleshoot issues from a custom pixel implementation.

When Is the Deadline to Migrate to the New Shopify Checkout?

Shopify Plus merchants must migrate by August 28, 2025. Non-Plus merchants have until August 26, 2026. After these dates, stores that have not upgraded their post-checkout pages will face critical limitations that affect campaign performance and customer reach.

Can I Use Google Tag Manager With Shopify?

You can add GTM via Shopify's Customer Events, but Google warns that this is not a supported implementation. Many core features, including preview mode, DOM-based triggers, and third-party tags that modify the page, may not work. For Google tags, use the Google & YouTube app instead.

How Do I Test Purchase Tracking in GA4 on Shopify?

Use Google Tag Assistant to record a test purchase. Install the Tag Assistant Companion extension, start a debug session on your store's domain, and complete an order. Verify the purchase event and its parameters, including value and transaction_id. You can also check GA4 DebugView for real-time event data.