Get more organic search traffic for your Shopify store
JSON-LD for SEO is a premium app that has been designed and optimized to get you results in Google, fast.
The long-awaited Google Analytics 4 and Shopify integration is available via the Google Sales Channel App.
Keep in mind that this integration, much like Universal Analytics, connects the property to your Shopify store. You still need to determine if more setup in Google Analytics 4 is required. Please don't @ me on how to do this as it's outside of my expertise. Instead, reach out to Kate Collinson and check out her GA4 course.
In this article, I'm assuming that you already have a Google Analytics 4 property setup. If you do not, you'll want to do that first. You can use Google's instructions and Shopify's instructions to set up your Google Analytics 4 property.
I'm also assuming you don't use another service or app to connect your Google Analytics 4 property to Shopify. If you do, please contact them.
If you've already installed the Google Sales Channel app, skip to the next step.
First, you'll want to install the Google Sales Channel App. This is the only way to connect your Google Analytics 4 data with Shopify unless you edit the theme files.
When you edit your theme files, you may not be eligible for easy theme updates. That's why many apps, including JSON-LD for SEO, have moved away from editing your theme files.
I understand that many people do not like the Google Sales Channel for Merchant Center and Google Shopping Feeds. That's ok! You can use whatever product feed you want and do not have to connect Merchant Center to the app anymore.
If installing the Google Sales Channel app is new, connect the app to your Google account. This should be the same email that has access to your GA4 property.
At the time of this writing, when you first land on the app page, you'll see a blue box to set up Google Analytics 4 without using Merchant Center.
If you already have Merchant Center and would like to connect it that way, you should see a box further down that should connect Merchant Center with Google Analytics 4.
Either way, select Get Started.
Once your Google Analytics account is connected, you should see a dropdown with the available properties. Select the GA4 property and select Connect.
You should now see a message that says: "Your site data is being shared with Google Analytics." or something similar because content changes often.
Many were ahead of the game and manually added the Google Analytics 4 code snippet to your theme files. If that's you, you'll want to remove that code so you don't double-track your visitors.
This was likely added to your theme.liquid
file.
Go to Online Store -> Themes -> select the ellipsis ... -> Edit code.
In the Layout folder, go to theme.liquid
and search for your Google Analytics code to remove it.
If using the Google Sales Channel App is not workable for you, there is another option. You can manually add the GA4 code snippet to your theme files.
This method is not recommended because you are editing the theme files directly. Shopify is trying to move everyone away from editing the theme files.
Grab your Google Analytics 4 snippet. It should look something like this but don't copy this code as you need your unique ID:
<script async src="https://www.googletagmanager.com/gtag/js?id=X-XXXXXXXXXX"></script>
<script>
window.dataLayer = window.dataLayer || [];
function gtag(){dataLayer.push(arguments);}
gtag('js', new Date());
gtag('config', 'X-XXXXXXXXXX');
</script>
In Shopify, go to Online Store -> Themes -> select the ellipsis ... -> Edit code.
In the Layout folder, go to theme.liquid
and search for the closing </head>
tag. You'll want to paste the GA4 snippet just above the closing tag.
Head over the Google Analytics to make sure it's tracking.
For this article, you're just looking to make sure visits are showing up. It may take some time depending on how many visitors you have. Google says it can take up to 48 hours. If after that time you still don't see the tracking code working and you know you've had visitors, contact Google for help.
Again, if you have not set up conversion funnels and the like, you'll want to reference the links above.
Get more organic search traffic from Google without having to fight for better rankings by utilizing search enhancements called Rich Results.
Link discontinued products to their best substitute. Keep discontinued products published on your website and continue to benefit from traffic to these pages.