Connecting Google Analytics

Google Analytics helps you understand how visitors find and interact with your store. While CartOS has built-in analytics for commerce metrics, Google Analytics provides deeper insights into traffic sources, user behavior, and marketing performance. Connecting the two gives you a complete picture.

What you'll need

You'll need a Google Analytics account. If you don't have one, create one for free at analytics.google.com. Google Analytics 4 (GA4) is the current version—older Universal Analytics properties are no longer supported.

Finding your Measurement ID

Your Measurement ID is what connects your store to your Google Analytics property. To find it:

  1. Log in to Google Analytics
  2. Select your property (or create one for your store)
  3. Go to Admin (gear icon)
  4. Under Property, click Data Streams
  5. Select your web stream (or create one)
  6. Your Measurement ID appears at the top—it looks like G-XXXXXXXXXX

Copy this ID. You'll paste it into CartOS.

Connecting to CartOS

  1. In your CartOS admin, go to Settings › Integrations
  2. Find Google Analytics and click Connect
  3. Paste your Measurement ID in the field
  4. Click Save

CartOS automatically adds the Google Analytics tracking code to every page of your store. No theme editing required.

E-commerce tracking

CartOS sends e-commerce events to Google Analytics automatically, giving you detailed purchase data in your GA reports.

Events tracked

CartOS sends these standard e-commerce events:

  • view_item – When a visitor views a product page
  • view_item_list – When a visitor views a collection page
  • add_to_cart – When a visitor adds an item to cart
  • remove_from_cart – When a visitor removes an item from cart
  • begin_checkout – When a visitor starts checkout
  • add_shipping_info – When shipping info is entered
  • add_payment_info – When payment info is entered
  • purchase – When an order is completed

Each event includes relevant data like product name, price, quantity, and transaction value.

Enabling e-commerce reports in GA4

To see e-commerce data in Google Analytics:

  1. In Google Analytics, go to Admin
  2. Under Property, click Data Display › Events
  3. Verify the e-commerce events are being received (they'll appear after traffic starts flowing)
  4. Go to Reports › Monetization to see e-commerce reports

It can take 24-48 hours for data to start appearing in reports after connecting.

What you can learn

Traffic sources

See where your visitors come from—organic search, paid ads, social media, referrals, direct traffic. Understand which marketing channels drive the most visitors and the most valuable visitors.

User behavior

Track how visitors move through your site. Which pages do they enter on? Where do they drop off? How long do they stay? What do they search for?

Conversion funnel

See how visitors progress from browsing to purchase. Identify where people drop off—product pages, cart, checkout—and optimize those steps.

Marketing attribution

Understand which campaigns drive sales. If you're running Google Ads, Facebook campaigns, or email marketing, GA4 can attribute conversions to specific campaigns.

Audience insights

Learn about your visitors—demographics, interests, devices, locations. Use this to inform product decisions and targeting.

CartOS analytics vs. Google Analytics

Both have their place:

CartOS Analytics is optimized for e-commerce operations. It shows you what you need to run your business day-to-day: orders, revenue, top products, fulfillment metrics. Data is real-time and comes directly from your order data—no sampling, no tracking gaps.

Google Analytics is optimized for marketing and user behavior. It shows you how visitors find your site, how they interact with it, and how marketing efforts perform. It's essential for understanding the top of your funnel.

Use both: CartOS for sales and operations, Google Analytics for traffic and marketing.

Google Ads integration

If you run Google Ads, linking your Ads and Analytics accounts unlocks additional features:

  • See Google Ads performance data in Analytics
  • Import Analytics conversions into Google Ads
  • Create remarketing audiences based on site behavior
  • Better understand the customer journey from ad click to purchase

Link accounts in Google Analytics under Admin › Product Links › Google Ads Links.

Google Search Console

For SEO insights, also connect Google Search Console. It shows you what search queries bring visitors to your site, your rankings for different terms, and any indexing issues.

Link Search Console to Analytics in Admin › Product Links › Search Console Links to see search data alongside your Analytics reports.

Privacy and consent

Cookie consent

Google Analytics uses cookies to track visitors. Depending on where your customers are located, you may need to obtain consent before tracking.

CartOS can integrate with cookie consent solutions. Enable the consent mode option in your Google Analytics settings to respect user consent choices. When consent isn't given, GA4 uses cookieless measurement with modeled data.

Data retention

By default, GA4 retains user-level data for 2 months (extendable to 14 months). Configure this in Admin › Data Settings › Data Retention based on your analysis needs and privacy policy.

IP anonymization

GA4 doesn't log full IP addresses by default, which helps with privacy compliance. This is automatic—no configuration needed.

Custom events

Beyond the automatic e-commerce events, you can send custom events for actions specific to your store. This requires adding code to your theme.

Example use cases:

  • Track newsletter signups
  • Track wishlist additions
  • Track video plays
  • Track specific button clicks

Custom events use the gtag() function. See Google's documentation for implementation details, or hire a developer if you're not comfortable with JavaScript.

Debugging and verification

Real-time reports

The quickest way to verify tracking is working: visit your store in one browser, then check Reports › Real-time in Google Analytics. You should see yourself as an active user within seconds.

DebugView

GA4 has a DebugView that shows events in real-time with full detail. Enable debug mode with the Google Analytics Debugger browser extension, then view events in Admin › Data Display › DebugView.

Tag Assistant

Google's Tag Assistant browser extension helps verify your tracking code is installed correctly and firing as expected.

Common issues

No data appearing

If you don't see data after 48 hours:

  • Verify your Measurement ID is correct (check for typos)
  • Make sure you're looking at the right property in GA
  • Check that your ad blocker isn't blocking tracking on your test visits
  • Use real-time reports to test immediately rather than waiting for processed reports

E-commerce data missing

If you see page views but not e-commerce events:

  • Place a test order and verify the purchase event fires
  • Check that e-commerce events are enabled in your CartOS integration settings
  • Look in DebugView to see if events are being sent

Data discrepancies

CartOS and Google Analytics numbers won't match exactly. Common reasons:

  • Ad blockers prevent GA tracking for some visitors
  • GA sampling on high-traffic reports
  • Different attribution models
  • Timezone differences
  • GA doesn't track orders placed via POS or other offline channels

Use CartOS as your source of truth for sales data, and GA for traffic and behavior insights.

Advanced setup

Google Tag Manager

For more control over tracking, you can use Google Tag Manager instead of the direct integration. GTM lets you manage multiple tracking pixels, create custom triggers, and modify tracking without editing theme code.

To use GTM, enter your GTM container ID in Settings › Integrations instead of the GA4 Measurement ID. Then configure GA4 as a tag within GTM.

Multiple properties

If you need to send data to multiple GA4 properties (perhaps one for your team and one for an agency), use Google Tag Manager to configure multiple GA4 tags.

Learning Google Analytics

Google Analytics is powerful but has a learning curve. Google offers free courses at Google Skillshop covering GA4 fundamentals, reporting, and analysis. Worth the time investment if you're serious about data-driven marketing.