If you already run a store with real orders and real ad spend, you are not setting up Google Analytics to "see if people visit." You are setting it up to measure the funnel — view, cart, checkout, purchase — so you can find where money leaks out. This guide is the current GA4 version, not the retired Universal Analytics one most ranking pages still describe.
What ecommerce tracking in GA4 actually is
Google Analytics 4 (GA4) is event-based. Every action — a product view, an add-to-cart, a completed order — is an event with parameters attached, and "ecommerce tracking" just means the purchase-related events are firing correctly with revenue and product data.
The events that matter follow a fixed naming convention in Google's ecommerce measurement guide: view_item, add_to_cart, begin_checkout, add_shipping_info, add_payment_info, and purchase. Each one carries an items array — the products involved — plus value and currency on the money events.
Get the purchase event right and everything downstream works: revenue, conversion rate, and product performance. Get it wrong and every report built on it is quietly broken.
What you need before you start
You need admin access to your Google Analytics account and the ability to edit your store's tracking (the Shopify Google channel, or Google Tag Manager on a custom site). That is it.
If you sell print-on-demand through Shopify, your product costs from Printify, Printful, or Gelato are already known — you do not need months of GA4 data before you can judge whether a product is worth selling. Keep those numbers handy; you will need them later to turn GA4's revenue into actual profit.
Step 1: Create the GA4 property and get the tag
Inside Google Analytics, open Admin, create a property for your store, and add a Web data stream for your domain. GA4 hands you a Measurement ID (it starts with "G-").
That ID is what connects your store to Analytics. How you install it depends on your platform — which is the next step.
Step 2: Connect your store so the events fire
This is where setups diverge, so match the path to your stack.
On Shopify
Install the Google & YouTube channel from the Shopify App Store and link your GA4 property. Shopify then sends the standard ecommerce events — including purchase on the order-status page — without you touching code.
This is the fastest route and the one to prefer. It also handles the items array for you, so product-level reports populate correctly. Our cluster guide on ecommerce business intelligence covers how these store-level signals fit the bigger measurement picture.
On a custom or headless store
You push events into a data layer and let Google Tag Manager forward them to GA4. A data layer is just a JavaScript object your site fills with order details at each step — product IDs, prices, quantity, order value.
The rule that trips people up: GA4 expects the same parameter names on every event. The item_id and price you send on view_item must match what you send on purchase, or attribution and product reports fall apart.
Step 3: Confirm the purchase event is really firing
Do not assume it works — prove it. Open DebugView in GA4 (or Realtime), then place a real test order end to end.
Watch for the purchase event to appear with three things attached: a transaction ID, the order value, and the items array. If the value is missing or shows zero, your revenue reports will be empty no matter how many orders come in.
Check one more thing: that a single order fires purchase exactly once. Duplicate purchase events — common when a tag loads on both the thank-you page and a redirect — inflate your revenue and make every ratio lie.
Step 4: Read the reports — and know where they stop
Once data flows, the Monetization and Ecommerce purchases reports show revenue, items purchased, and your conversion rate. The per-session conversion rate is simply orders divided by sessions.
Say your store logs 16,800 sessions and 420 orders in a month. That is a 2.5% conversion rate (420 ÷ 16,800 = 0.025). For context, the average Shopify store converts between one-and-a-half and two percent, with the top fifth of stores above three-point-two percent — so 2.5% is solid, not a reason to relax.
GA4 is also where you watch the leak between steps. If 4,000 sessions add to cart but only 420 purchase, that funnel drop lines up with the long-run benchmark that roughly seven in ten carts are abandoned, an average of 70.22% across fifty studies documented by the Baymard Institute. For the exact per-session math and the denominators that quietly break it, see our walkthrough on calculating ecommerce conversion rate in Google Analytics.
One thing GA4 will not reconcile for you is tax by jurisdiction — that lives in your store admin, and our guide on finding Shopify sales and tax reports by location shows where.
A worked example: what GA4 shows vs. what you keep
Here is the gap no ecommerce-tracking tutorial mentions. GA4 reports revenue. Your bank account cares about profit.
Say your store does 420 orders a month at a $34 average order value. GA4 cheerfully reports $14,280 in revenue (420 × $34) and, if your campaigns pull a 3.5 return on ad spend, a dashboard that looks healthy.
Now walk one order the way your P&L does it:
- Revenue: $34.00
- Blank + print cost (Printify): −$14.00
- Shipping: −$5.00
- Payment processing (4% of $34): −$1.36
- Pick/pack: −$1.40
- Contribution margin before ads: $12.24
- Ad spend allocated (at 3.5 ROAS, $34 ÷ 3.5): −$9.71
- Profit per order: $2.53
GA4's screen says $14,280. What you actually keep is about $2.53 per order, or roughly $1,063 across the month — before rent, software, and salaries. A campaign GA4 flags as a winner on revenue can be a loser on profit, and nothing in Google Analytics will tell you, because it never sees your supplier cost, shipping, fees, or ad spend.
Why GA4 can't close the loop — and what does
GA4 is a measurement tool for on-site behavior. It is excellent at sessions, funnels, and revenue. It is blind to the four costs that decide whether a sale made you money, and it cannot act on anything it finds.
That blind spot is exactly where PodVector AI comes in. Victor is an AI employee who connects your Shopify store, your Meta Ads and Google Ads accounts, your Printify, Printful, and Gelato supplier costs, and your Klaviyo email together — so he sees every order, every ad dollar, and every product cost in one place and computes the true per-order profit GA4 leaves out.
Victor does not stop at telling you. He pauses the ad set that is burning money at a 3.5 ROAS but negative margin, reprices the thin-margin SKUs, and builds the Klaviyo flow that wins back the shoppers who abandoned their cart. He delivers the profit report to your Google Drive and drafts the customer-support email while he is at it. Victor is not a dashboard — he is the operator doing the work your analytics only describes.
Set up GA4 to see the funnel. Then let Victor turn that traffic into measured profit and act on it. For the full view of the metrics that matter once tracking is live, read our guide on ecommerce performance analytics.
FAQs
Do I still need to install Universal Analytics code like ecommerce.js?
No. Universal Analytics stopped processing data in 2023, and GA4 replaced it entirely. The ga('require', 'ecommerce') snippets in older tutorials no longer do anything — use GA4 events (purchase, add_to_cart, and the rest) through the Shopify Google channel or a data layer instead.
How long does setting up ecommerce tracking in Google Analytics take?
On Shopify, under an hour — most of it is installing the Google & YouTube channel and placing one test order to confirm the purchase event fires. A custom data-layer build takes longer, usually an afternoon, because you wire and test each event by hand.
Why is my GA4 revenue different from my Shopify revenue?
Common causes are a purchase event firing twice (inflating revenue), a missing or zero value parameter (deflating it), or GA4 counting by session date while Shopify counts by order date. Test in DebugView and confirm one order fires exactly one purchase with the correct value before you trust the numbers.
Does GA4 show my profit?
No. GA4 tracks revenue and on-site behavior, not your supplier cost, shipping, payment fees, or ad spend — so it cannot tell you per-order profit. You need to combine order data with those costs yourself, which is the specific gap Victor fills by computing true per-order profit across your store, ads, and suppliers.
What's the single most important event to get right?
The purchase event. It carries your revenue, feeds your conversion rate, and anchors product-level reporting — if it is missing, duplicated, or missing its value, every ecommerce report built on top of it is wrong.