GA4 for Shopify Founders: Connecting the Stores
Step-by-step GA4 setup for Shopify stores. Wire up events that matter, track revenue, and stop flying blind. Ship organic visibility fast.
Why GA4 Setup Matters for Shopify Founders
You shipped. Your store is live. Traffic is coming from somewhere—probably organic search, social, or word-of-mouth. But you have no idea what's actually working.
GA4 isn't optional anymore. It's your visibility layer. Without it, you're guessing. With it, you see which traffic converts, which products move, and which content drives revenue.
For Shopify founders specifically, GA4 setup is easier than you think—but the default configuration leaves money on the table. Most founders wire up pageviews and call it done. That's a mistake.
This guide walks you through GA4 setup for Shopify in the right order: property creation, native integration, event tracking, and the specific events that matter for ecommerce. By the end, you'll have tracking that reveals user intent, content quality, and conversion paths.
You need this data to rank. You need this data to sell. Let's ship it.
Prerequisites: What You Need Before Starting
Before you touch GA4, gather these items:
Google Account: You need a Google account (Gmail works). If you're using a business email, create a Google account with it first. This account will own your GA4 property.
Shopify Store Access: You need admin access to your Shopify store. You'll need to navigate to Settings > Apps and Channels to install the Google Analytics integration.
Google Merchant Center Account (optional but recommended): If you sell physical products, a Merchant Center account lets you sync product data into GA4 for better ecommerce tracking.
Measurement ID or Tracking Code: GA4 will generate this automatically during setup. You'll paste it into Shopify or use Shopify's native integration.
Time: This takes 15–30 minutes if you follow the steps in order. Don't rush it.
Browser: Use Chrome or Firefox. Safari sometimes hides GA4 interface elements.
If you're already using Google Search Console or Google Tag Manager, great—you'll link those later. For now, focus on the core GA4 property.
Step 1: Create a Google Analytics 4 Property
Start here. Don't skip this.
Go to Google Analytics and sign in with your Google account.
Click Create (or + Create if you already have a Google Analytics account).
Select Google Analytics 4 as your property type. GA4 is the only version that matters now; Universal Analytics is dead.
Fill in the property details:
- Property Name: Use your store name. Example: "MyStore GA4" or "MyStore Production". Be specific so you don't confuse it with test properties later.
- Reporting Time Zone: Set this to your timezone or your primary customer timezone. This affects when daily reports reset.
- Currency: Set this to your store's currency (USD, EUR, GBP, etc.). GA4 uses this for revenue reporting.
Click Create Property.
Google will ask you to set up a data stream. This is where you connect GA4 to your Shopify store.
Select Web as your data stream type.
Fill in the data stream details:
- Website URL: Enter your Shopify store domain exactly as it appears in your browser. Example:
https://mystore.comorhttps://mystore.myshopify.com(if you haven't set up a custom domain yet). - Stream Name: Use something like "Shopify Store" or "Production Store". You can create multiple streams later for staging or testing.
Click Create Stream.
Google will generate a Measurement ID that looks like G-XXXXXXXXXX. Copy this. You'll need it in the next step.
You now have a GA4 property. Don't close this tab—you'll come back to it.
Step 2: Connect GA4 to Shopify (Native Integration)
Shopify has a native GA4 integration built into the platform. Use it. It's simpler than manually pasting tracking codes.
Log into your Shopify admin.
Go to Settings (bottom left) > Apps and Channels.
Search for Google Analytics. You'll see the official Shopify app.
Click Add App.
Shopify will ask for permission to access your store data. Click Install App.
You'll be redirected to the Google Analytics app in your Shopify admin.
Click Connect Google Analytics.
You'll be asked to sign in with your Google account (the same one you used to create the GA4 property).
Shopify will show you a list of Google Analytics properties you own. Select the GA4 property you just created.
Click Connect.
Shopify will ask which data you want to track:
- Standard Events: Enable this. This tracks pageviews, add-to-cart, purchase events, and more automatically.
- Enhanced Ecommerce: Enable this. This tracks product views, cart interactions, and revenue with granular detail.
- User ID Tracking: Optional. This tracks logged-in customers across devices. Enable it if you want to see customer journeys across sessions.
Click Save.
Done. GA4 is now connected to your Shopify store. Shopify is automatically sending pageviews, purchase events, and product data to GA4.
Wait 24–48 hours for data to populate. GA4 needs time to collect and process events.
Step 3: Verify Tracking Is Working
Don't assume it's working. Verify it.
Go back to your GA4 property (in Google Analytics).
Click Real-Time (in the left sidebar under Reports).
Open your Shopify store in a new tab. Browse a few products. Add something to your cart. Go to checkout (don't complete the purchase).
Watch the Real-Time report. You should see events firing:
- Page View: Every page load.
- View Item: When you view a product.
- Add to Cart: When you add something to your cart.
- Begin Checkout: When you start checkout.
If you see events firing, tracking is working. If you see nothing after 2–3 minutes, something is broken. Check the troubleshooting section below.
Once you confirm events are firing, move to the next step.
Step 4: Wire Up the Events That Matter for Ecommerce
Shopify's native integration handles the basics. But you need custom events to understand user behavior.
The events you should track:
1. Purchase (already set up by Shopify) Shopify tracks this automatically. This is your revenue event. Don't touch it.
2. Add to Wishlist If your store has a wishlist feature, track when users save items. This tells you which products drive intent without immediate purchase.
3. View Product Comparison If you have a product comparison feature, track when users compare items. This signals high purchase intent.
4. Search Query Track what users search for in your store. This reveals product gaps and content opportunities.
5. Filter Applied Track when users filter products by category, price, or other attributes. This shows which filters drive engagement.
To set up custom events, you'll use Google Tag Manager (GTM) or Shopify's custom pixel feature.
Using Shopify's Custom Pixel (Easier)
Go to Settings > Apps and Channels > Pixel (or Custom Pixel depending on your Shopify plan).
Click Create Pixel.
Name it something like "GA4 Custom Events".
You'll get a code editor. Here's a basic template for tracking a wishlist add:
Pixels.track('custom_event', {
event_name: 'add_to_wishlist',
product_id: Shopify.cart.items[0].id,
product_name: Shopify.cart.items[0].title,
price: Shopify.cart.items[0].price
});
This is JavaScript. If you're not comfortable writing it, use Google Tag Manager instead (see the guide on Setting Up Google Tag Manager Without Breaking Your Site for step-by-step instructions).
Using Google Tag Manager (More Flexible)
If custom pixels feel limiting, use GTM. It gives you more control over event tracking and lets you fire events based on user behavior (clicks, form submissions, scroll depth, etc.).
Create a GTM container and install it on your Shopify store. Then create triggers and tags for each custom event you want to track.
For example, to track a "Search" event:
- Create a trigger that fires when a user submits the store search form.
- Create a GA4 event tag that sends
search_termas the event parameter. - Publish the container.
This takes 30 minutes if you've never used GTM. It's worth it.
Read more in our guide on GA4 Events for SEO: What to Track Beyond Pageviews for specific event setup snippets.
Step 5: Configure Data Retention
GA4 has a critical default setting that deletes your data automatically.
GA4 only keeps event-level data for 2 months by default. After 2 months, your historical data is gone.
If you want to keep data for longer (14 months is the max), you need to flip one toggle.
Go to Admin (bottom left) > Data Settings > Data Retention.
Under Event Data Retention, select 14 months.
Click Save.
Done. Your data is now kept for 14 months instead of 2.
This matters for SEO. You need historical data to see seasonal trends, understand long-tail content performance, and build year-over-year comparisons.
Read our full guide on GA4 Data Retention Settings: The One Toggle Founders Forget for why this matters and how to interpret your data once it's retained.
Step 6: Link Google Search Console to GA4
Google Search Console shows you search queries, impressions, and click-through rates. GA4 shows you user behavior after they click.
Link them together, and you see the full organic funnel: search query → click → page view → engagement → conversion.
Go to Admin > Property Settings > Search Console Links.
Click Link.
Select your Search Console property from the dropdown. (If you haven't set up Search Console yet, do that first using our guide on How to Set Up Google Search Console in 10 Minutes.)
Click Confirm.
GA4 is now linked to Search Console. You'll see search query data directly in your GA4 reports within 24 hours.
For a deeper dive on this integration, read Linking GA4 with Google Search Console: The 2-Minute Setup.
Step 7: Set Up Conversion Tracking
Conversions are the actions that matter to your business. For ecommerce, the main conversion is a purchase. But you might also track:
- Newsletter signups
- Account creations
- Product reviews
- High-value page views (product pages, pricing pages, etc.)
Shopify automatically tracks purchases as a conversion. But if you want to track custom conversions, you need to mark them in GA4.
Go to Admin > Conversions.
Click Create Conversion.
Select Purchase from the list. This is already being tracked by Shopify, but marking it as a conversion ensures GA4 reports on it prominently.
Click Create and Continue.
For custom conversions (like newsletter signups), create a new conversion and select the event you created in Step 4.
Example: If you created a newsletter_signup event, create a conversion called "Newsletter Signup" and link it to that event.
Click Save.
GA4 will now report on these conversions in your main dashboard and in conversion-focused reports.
Step 8: Create Custom Dimensions for SEO Tracking
Custom dimensions let you segment data by attributes that matter to you.
For SEO, useful custom dimensions include:
- Content Type: Blog post, product page, landing page, etc.
- Product Category: For ecommerce stores.
- Traffic Source Detail: Organic vs. paid vs. direct.
- Page Template: Homepage, category page, product page, etc.
To create a custom dimension:
Go to Admin > Custom Definitions > Custom Dimensions.
Click Create Custom Dimension.
Fill in:
- Dimension Name: Example: "Content Type"
- Description: "Categorizes pages by content type (blog, product, landing, etc.)"
- Scope: Select "Event" or "User" depending on what you're tracking.
- Event Parameter: The parameter name you'll send from your tracking code. Example:
content_type.
Click Save.
Now, whenever you send an event with the content_type parameter, GA4 will automatically segment that data.
Example: If you send content_type: 'blog_post' with a pageview event, GA4 will label that pageview as a blog post and let you filter by it in reports.
This takes 10 minutes to set up but saves you hours of manual analysis later.
Step 9: Build Your Core Reporting Dashboard
GA4's default dashboard is noisy. Build one that shows what matters.
Go to Reports > Dashboard.
Click Customize Dashboard.
Remove the default cards. Add these instead:
Card 1: Organic Traffic Trend
- Metric: Users
- Segment: Organic traffic
- Time period: Last 30 days
This shows whether organic search is growing or shrinking.
Card 2: Conversion Rate
- Metric: Conversion rate
- Segment: All traffic
- Time period: Last 30 days
This shows the percentage of visitors who convert.
Card 3: Top Organic Landing Pages
- Metric: Users
- Dimension: Landing Page
- Segment: Organic traffic
- Limit: Top 10
This shows which pages drive the most organic traffic.
Card 4: Revenue by Traffic Source
- Metric: Revenue
- Dimension: Default Channel Group
- Time period: Last 30 days
This shows which traffic sources actually drive revenue.
Card 5: Product Performance
- Metric: Revenue, Quantity
- Dimension: Item Name
- Time period: Last 30 days
- Limit: Top 10
This shows your best-selling products.
Save this dashboard. Bookmark it. Check it weekly.
For more on dashboard building, read The 5 GA4 Reports Every Busy Founder Should Bookmark.
Step 10: Verify Everything with Tag Assistant
Before you consider this done, verify your tracking setup end-to-end.
Google's Tag Assistant extension catches silent tracking errors that would otherwise cost you data.
Install the Google Tag Assistant Chrome extension.
Open your Shopify store in a new tab.
Click the Tag Assistant icon (top right of your browser).
Tag Assistant will scan your page and report:
- ✅ GA4 tags installed correctly
- ✅ Events firing properly
- ⚠️ Warnings (things that might break tracking)
- ❌ Errors (things that are definitely broken)
Fix any errors immediately. Warnings can wait.
For a full walkthrough, read Verifying Your Tracking Setup with the Tag Assistant.
Troubleshooting: Why Your GA4 Isn't Showing Data
Problem: Real-Time report shows no events after 10 minutes.
Solution:
- Clear your browser cache and cookies.
- Open your store in an incognito window.
- Refresh the page.
- Check Real-Time again.
If still nothing, your tracking code isn't installed. Go back to Step 2 and verify the Shopify-GA4 connection is active.
Problem: GA4 property created, but Shopify won't connect to it.
Solution:
- Make sure you're using the same Google account for both GA4 and Shopify.
- Log out of Google and log back in.
- Try creating a new GA4 property and connecting that instead.
Problem: Events are firing in Real-Time, but they're not showing in reports after 24 hours.
Solution:
- Check that you've set up conversions for the events you want to report on.
- Make sure your custom dimensions are correctly configured.
- Wait another 24 hours. GA4 can be slow to process data.
Problem: Shopify is tracking purchases, but GA4 shows zero revenue.
Solution:
- Go to Admin > Data Streams > Select your stream > Ecommerce Conversion ID.
- Make sure an ecommerce conversion is linked.
- Check that your currency setting matches your store's currency.
If none of these work, use our Verifying Your Tracking Setup with the Tag Assistant guide to debug further.
Pro Tips for Shopify Founders
Tip 1: Track Your Own Traffic Separately
When you're testing your store, GA4 counts your visits as real traffic. This pollutes your data.
Create a filter to exclude your IP address from GA4 reports.
Go to Admin > Data Streams > Select your stream > More Tagging Settings > Internal Traffic Filter.
Add your IP address. GA4 will now exclude your traffic from all reports.
Tip 2: Set Up Alerts for Traffic Drops
If your organic traffic suddenly drops 50%, you want to know immediately—not when you check analytics next month.
Go to Admin > Alerts > Create Alert.
Set up an alert for "Organic traffic drops by 25% compared to the previous week."
GA4 will email you if this happens.
Tip 3: Use GA4 Audiences for Retargeting
GA4 lets you create audiences based on user behavior (e.g., users who viewed products but didn't buy).
You can then retarget these audiences with ads on Google, Facebook, or other platforms.
Go to Admin > Audiences > Create Audience.
Build an audience like "Viewed Product But Didn't Purchase" and export it to Google Ads.
Tip 4: Connect GA4 to Looker Studio for Automated Reporting
GA4 reports are powerful but time-consuming to build.
Looker Studio (Google's free data visualization tool) lets you create one-page dashboards that auto-update daily.
Read Connecting Google Search Console to Looker Studio for Founders for a step-by-step guide.
Tip 5: Don't Ignore GA4 Anomaly Detection
GA4 automatically detects unusual spikes or drops in your data and alerts you.
Check the Anomalies section in your GA4 dashboard weekly. Sometimes these alerts catch bot traffic, tracking errors, or viral content before you notice.
Beyond GA4: Connecting the Full Stack
GA4 is the foundation. But to truly understand your organic visibility, you need to connect it to other tools.
Connect GA4 to Google Search Console (already covered above). This shows search queries and impressions.
Connect GA4 to Bing Webmaster Tools for edge cases. Bing powers Copilot and ChatGPT crawl signals. Read Bing Webmaster Tools Setup: The 10% Traffic Most Founders Miss to capture that traffic.
Monitor Core Web Vitals in GA4. Slow pages rank worse. Use the Web Vitals Extension: Real-Time Performance for Busy Founders to catch performance issues before they hurt your rankings.
Set up AI Engine Optimization (AEO) tracking to see when your products appear in ChatGPT, Perplexity, and Claude recommendations. Read AEO Basics for E-Commerce: Show Up When AI Recommends Products to understand how to optimize for AI visibility.
All of this data feeds into one truth: organic visibility drives revenue. GA4 is how you measure it.
Why This Matters for SEO
You can't rank what you don't measure.
GA4 shows you:
- Which search queries bring traffic to your store
- Which pages convert visitors into customers
- Which products drive the most revenue
- Which content keeps users engaged
- Whether your organic traffic is growing or shrinking
Without this data, you're guessing. You're writing blog posts without knowing if anyone reads them. You're optimizing pages without knowing if they convert.
With GA4 properly set up, you see the full picture. You can identify content gaps (searches that bring traffic but have no landing page), optimize underperforming pages, and double down on what works.
For Shopify founders specifically, GA4 is non-negotiable. You're competing with thousands of other stores. The ones that win are the ones that know their data.
Set this up today. Check it tomorrow. Act on it next week.
Key Takeaways
1. Create a GA4 property first. Don't use Universal Analytics. GA4 is the only version that matters.
2. Use Shopify's native GA4 integration. It's simpler than manual tracking and automatically wires up purchase events.
3. Wire up custom events for your business. Pageviews and purchases are the baseline. Track wishlist adds, product comparisons, and search queries to understand user intent.
4. Flip the data retention toggle to 14 months. GA4's default 2-month retention deletes your historical data. You need 14 months of history to see trends.
5. Link GA4 to Google Search Console. This shows you the full organic funnel: search query → click → page view → conversion.
6. Build a simple dashboard. Focus on organic traffic, conversion rate, top landing pages, and revenue by source. Ignore everything else.
7. Verify tracking with Tag Assistant. Don't assume it's working. Verify it.
8. Check your data weekly. GA4 is only useful if you act on it. Set a recurring calendar reminder to review your reports.
You've shipped. Now make sure the world can find you. GA4 is how you measure whether they do.
Next Steps
Once GA4 is live and collecting data:
Audit your keyword gaps. Use the search query data from Google Search Console (now visible in GA4) to find high-volume searches with no landing page. These are content opportunities.
Optimize your top landing pages. Identify the pages that drive the most organic traffic but have low conversion rates. Improve them.
Build content around high-intent searches. Look at search queries that bring traffic but have low click-through rates. These are queries where your page isn't ranking well or isn't compelling in search results. Fix your title and meta description.
Track your AEO visibility. Use the insights from AEO Basics for E-Commerce: Show Up When AI Recommends Products to optimize your product pages for AI recommendations.
Monitor your competitors. Use Shopify Google Analytics Setup as a baseline, then go deeper. See which competitors rank for your target keywords and why.
GA4 is the foundation. Everything else builds on it.
Start today. Ship organic visibility fast.
Get the next one on Sunday.
One short email a week. What is working in SEO right now. Unsubscribe in one click.
Subscribe on Substack →