Notification

The Google Analytics: GA4 Configuration tag is now the Google tag. GA4 Configuration tags in a web container will be automatically migrated starting in September. There are no changes to your existing measurement and there is no action required from you. Learn more

Shopify: Set up your Google tag

You can measure behavioral data about your site with Google Ads and Google Analytics. Follow the steps in this article to set up a tag for your Google Ads or Google Analytics account. Learn more about Installing your tag with a website builder or CMS.

The instructions for setting up the Google tag are different for tag IDs starting with "AW-" (usually, Google Ads accounts) and tag IDs starting with "G-" (usually, Google Analytics properties). Follow the instructions below that correspond with your tag.

Before you begin

You can integrate your Shopify account with Google Ads or Google Analytics for free. To set up the integration, you’ll need:

If you have a tag starting with "AW-"

The easiest and the fastest way to set up your Google tag through Google Ads is to Set up conversion tracking with the Google & YouTube app on Shopify.

  1. From your Shopify console, click the search bar and type “Google and YouTube” and select “Google & YouTube”.
  2. You will be taken to the Shopify App Store. Press Install to continue.
  3. Review the list of permissions required then press Install at the bottom to continue.
  4. If the app is not connected to Google, press Connect and choose the Google account that owns your Ads property.
  5. Select your merchant center account and click Connect.
  6. Ensure conversion tracking is enabled. Review the Terms and conditions and check the box that you agree. Finally, click Complete setup.
  7. Your account is now sending conversion information to Google.

If you do not want to use the Google & YouTube app on Shopify, you can set up the Google tag manually. Manual setup is only recommended for advanced users, as it can be complicated, and can increase the likelihood of duplicating key events, resulting in inaccurate tracking data.

If you’d like to proceed, follow the steps in this article to set up your Google tag manually.

1. Add your Google tag manually

  1. Sign in to your Google Ads account.
  2. In the upper right corner, click the tools icon, and under "Setup," click Google tag
  3. Go to the “Configuration“ tab.
  4. In the “Your Google tag” section, click Installation instructions.
  5. On the "Installation instructions" page, select “Install manually”.
  6. Within Shopify, select the "Online Store" > Themes option from the panel on the left and then select the button with three dots on your active theme > "Edit Code" dropdown.
  7. Under "Layout", choose {/}theme.liquid.
  8. In the theme.liquid file, confirm that Google tracking tags are not present. If you have code on this page that resembles the block below, you likely already have Google products installed, so double-check before replacing these.
  9. To establish a connection between your website and Google Ads, copy and paste the Google tag code below. After the <head> element, paste the code below beginning with: <!-- Google tag (gtag.js) --> and ending with </script>.
  10. Click Save to finish. Don’t add more than one Google tag to each page of your website.

<!-- Google tag (gtag.js) -->

<script async src="https://www.googletagmanager.com/gtag/js?id=TAG_ID"></script>

<script>

 window.dataLayer = window.dataLayer || [];

 function gtag(){dataLayer.push(arguments);}

 gtag('js', new Date());

 gtag('config', 'TAG_ID');

</script>

2. View your conversion actions in Google Ads

After you've confirmed that your configuration is live, you can view conversions to review data, make administrative changes, or update your conversion goals. Review the information below to view actions and learn more about the updates you can make in Google Ads.

  1. Sign in to your Google Ads account.
  2. In the upper right-hand corner of your account, click the Tools and Settings icon. Select Measurement from the dropdown menu.
  3. Click Conversions.

Important information about conversion actions:

  • You can edit names and additional conversion actions settings in Google Ads.
  • Only the “Purchase” conversion type has the account-default conversion goals option enabled. You can choose the conversion actions you want to be included in “Conversions”.
  • The conversion window is set to 90 days.

Learn how to Understand your conversion tracking data

3. Verify and troubleshoot your conversion tracking setup

Tag Assistant allows you to verify and troubleshoot Google Tag Manager installations for Google Ads. Review the steps below to verify your conversion tracking implementation. You can only troubleshoot “Unverified” or “Tag inactive” conversions with Tag Assistant. Learn more about Tracking Statuses.

  1. Sign in to your Google Ads account.
  2. In the upper right corner, click the Tools and Settings icon and under "Measurement", click Conversions.
  3. In the “Summary” table, review the “Status” column for “Unverified” or “Tag inactive” statuses.
  4. Click Troubleshoot in the “Actions” column.
  5. Click Get Started to open the Tag Assistant in a new window.
  6. Enter the URL of the web page that you want to troubleshoot.
    • It’s best to use a landing page or home page instead of the conversion page URL directly. When you visit the landing page, you can navigate to the conversion page.
  7. Click Connect to open your web page in a new browser tab.
    • The “Summary” table and Tag Assistant window remains open for use later on. Don’t close these tabs. If the conversion is “Form Submission tracking”, do a test Form Submission on the Tag Assistant connected site. Switch the tab to Preview window and verify if the tags fire at the correct location.
  8. Refresh your Google Ads account “Conversions” page. Tracking status are changed to “No Recent Conversions” in less than one minute.
  9. When the tag firing status is verified on the preview window, return to the webpage where the conversion action was tested and click Finish.

After you verify your implementation through Google Tag Assistant (and your Ad campaigns run successfully), wait at least 24 hours before you revisit the “Conversion action” section in Google Ads.

Understand tracking statuses

While you can only troubleshoot “Unverified” or “Tag inactive” conversions with Tag Assistant, Google Ads displays multiple status options. Learn more about Troubleshooting your conversion tracking status.

If you have a tag starting with "G-"

The easiest and fastest way to set up tracking through Google Analytics is to use the Google & YouTube app. Note that this integration is native to Shopify. To set up your Google Analytics tracking through Shopify, follow the steps below.

  1. Sign in to your Shopify account.
  2. On the left panel menu, open the Online store dropdown menu, then choose Preferences from the list.
  3. Navigate to the “Google Analytics account” section. Click Set up Google.
    1. If the Google & YouTube app isn’t installed, review the list of permissions required, then press Install at the bottom to continue.
    2. If the app isn’t connected to Google, click Connect, then choose the Google account that owns your Analytics property.
  4. Choose your Google tag ID from the drop down list, and click Connect your Google Analytics 4 property.
Note: If you plan on using Google Analytics to track free listings and ads conversions, check How to avoid duplicating tracking events to ensure that you do not duplicate conversion tracking.

Add your Google tag manually

If you do not want to use the Google & YouTube app on Shopify, you can set up Google Analytics tracking manually. Manual set up is only recommended for advanced users as it can be complicated, and can increase the likelihood of error, resulting in inaccurate tracking data.

If you prefer to set up tracking through Google Analytics manually, follow the steps below.

  1. In Google Analytics, go to the Admin screen.
  2. In Data Streams, click on a stream to see details.
    Your screen should show you the Google Analytics settings and the Google tag settings.
  3. In the “Your Google tag” section at the bottom of the page, click Installation instructions.
  4. On the "Installation instructions" page, select “Install manually”.
  5. In Shopify, select the "Online Store" > Themes option from the panel on the left and then select the button with three dots on your active theme > "Edit Code" dropdown.
  6. Under "Layout", choose {/}theme.liquid.
  7. In the theme.liquid file, confirm that Google tracking tags are not present. If you have code on this page that resembles the block below, you likely already have Google products installed, so double-check before replacing the existing code block.
  8. To establish a connection between your website and Google Ads, copy and paste the Google tag code below. After the <head> element, paste the code below beginning with: <!-- Google tag (gtag.js) --> and ending with </script>. Click Save to finish.

<!-- Google tag (gtag.js) -->

<script async src="https://www.googletagmanager.com/gtag/js?id=TAG_ID"></script>

<script>

 window.dataLayer = window.dataLayer || [];

 function gtag(){dataLayer.push(arguments);}

 gtag('js', new Date());

 gtag('config', 'TAG_ID');

</script>

Was this helpful?

How can we improve it?
Search
Clear search
Close search
Google apps
Main menu