AI for Ecommerce Analytics: Shopify Reports, GA4 or ChatGPT First?

Coding Liquids tutorial cover featuring Sagnik Bhattacharya for AI for Ecommerce Analytics: Shopify Reports, GA4 or ChatGPT First?
Coding Liquids tutorial cover featuring Sagnik Bhattacharya for AI for Ecommerce Analytics: Shopify Reports, GA4 or ChatGPT First?

Set up Shopify's own reports first, because they are already in your store and hold the real order data. Add ChatGPT or Claude second, on an export of that data, to answer the questions the reports can't. Add GA4 third, and only when you need to know which visitors came from where.

The order matters because each tool answers a different question. Shopify tells you what sold. A spreadsheet plus an AI assistant tells you why a month went well or badly. GA4 tells you how people found the shop. Starting with GA4 is the usual mistake: you spend a weekend on tags and consent settings and still can't say which products make money.

Follow me on Instagram@sagnikteaches

The examples below use a small online clothing store with one owner, a part-time packer and about 1,800 orders a year. Every figure is illustrative, so swap in your own, but the method works at any size.

Connect on LinkedInSagnik Bhattacharya

What each tool can and cannot see

Before choosing, it helps to be clear about what sits where. The three options overlap less than they appear to.

Subscribe on YouTube@sagnikteaches
QuestionShopify reportsGA4Export plus ChatGPT or Claude
What sold, and for how much?Yes, this is the source of truthPartly, only where the tag firedYes, once you export
Which products are bought together?Some built-in reportsWeakYes, if you ask for it
Where did visitors come from?Basic channel and referrer dataYes, the strongest of the threeNo, unless you also export traffic data
Did the discount code pay for itself?Shows sales by code; profit reports work by product, not by codeNoYes, when you add unit costs
Who buys again?Customer reportsLimitedYes, with an order-level export
CostIncluded on every Shopify planFree to useFrom $0; $20 a month for a paid plan

Shopify's help centre says the main features of Shopify Analytics are available on any subscription plan, and the dashboard cards link straight to deeper reports you can customise. Google describes Google Analytics as free of charge. The AI part is the only piece with a subscription: ChatGPT Plus and Claude Pro are both listed at $20 a month, and Claude Pro drops to $17 a month on annual billing. The free tiers of both can handle a small file, with tighter usage caps.

The Complete Excel Course with AI Integration thumbnail

The Complete Excel Course with AI Integration

From formulas and pivot tables to Power Query, DAX, VBA and AI with Copilot, ChatGPT and Claude — hands-on from the first lesson.

By Sagnik Bhattacharya and Virginia Thorn, Primetime Emmy Award winner

Buy now

Step one: get value from Shopify reports before adding anything

Open Analytics in your admin and spend one session on four views before you touch an AI tool. Report names shift a little as Shopify updates the admin, so if one is missing, search the Reports list for its key words. This sets the baseline you will later check the AI against.

  1. Sales over time, set to the last twelve months, compared with the same period a year earlier. Note total sales, order count and average order value.
  2. Sales by product, sorted by net sales. Write down the top ten and the bottom ten.
  3. Sessions and conversion, by device type. Mobile versus desktop gaps are usually the first thing worth fixing.
  4. New vs returning customers, one of the customer reports.

Say the clothing store sees 1,800 orders at an average order value of $62, so about $111,600 in sales. Mobile makes up 71% of sessions but converts at roughly half the desktop rate. That single finding is worth more than a month of tag fiddling, and it came from a free report in ten minutes.

Shopify also has Sidekick, its built-in assistant, included with plans. It is handy for quick lookups inside the admin, and the tutorial on which AI assistant fits which Shopify job covers where it stops being enough. The limit that matters here is that it answers from the store's own data. It won't join your supplier costs or a promotion calendar unless that information is already in Shopify.

Step two: export, clean and ask ChatGPT or Claude

This is the part most small stores skip, and where the real gain is. Shopify can export your orders as a CSV file from the Orders page. Its help pages say an order export downloads up to 50 orders directly and emails you a file for larger exports, so for a year of orders expect an email with a download link.

Clean the file before it leaves your computer

Open the CSV in Excel or Google Sheets. Delete these columns: Email, Phone, the billing and shipping names, every billing and shipping address column, the payment reference columns and the two notes fields. Keep Created at (the order date), Name (the order number), Lineitem name, Lineitem SKU, Lineitem quantity, Lineitem price, Discount Code, Discount Amount, Shipping, Taxes, Total and Refunded Amount. If you are unsure whether a column identifies a person, delete it. Chat plans differ in what they do with uploaded files. On the consumer plans you can switch off the use of your chats for model training: ChatGPT calls the setting "Improve the model for everyone" and Claude calls it "Model Improvement". Check yours before you upload anything.

The guide to cleaning messy data covers the spreadsheet side, such as fixing date formats and merging duplicate SKUs, if your export looks untidy.

A prompt that gets a usable answer

Vague prompts like "analyse my sales" give vague answers. Give the assistant the business context, the file's columns and the exact questions.

You are helping me review a small online clothing store.
The attached CSV has one row per order line for the last 12 months.
Columns: order date, order number, product, SKU, quantity, line price,
discount code, discount amount, shipping, total, refunded amount.
Order-level columns (shipping, total, refunded amount, discount) are
filled only on the first row of each order and blank on the others.

Answer these, with a table for each and the calculation shown:
1. Top 10 products by sales (line price x quantity), with units sold.
2. Net sales (total minus refunded) by month, and the percentage
   change from the previous month. Count each order once.
3. Orders that used a discount code versus orders that did not:
   count, average order value, share of orders with a refund.
4. Products that appear in refunded orders more than 12% of the time,
   with order counts.
5. The three things in this data you would check first, and why.

Do not guess. If a column is missing for a question, say so.

An illustrative reply to question 3 might read: "Orders with a code: 412 of 1,800, average order value $54.20, refund rate 9.1%. Orders without: 1,388, average order value $64.60, refund rate 5.4%." That output is useful because it is checkable. Pick any row, filter the sheet yourself, and confirm the count. If it matches, trust the rest a bit more. If it is off, you have found the problem early.

What to fix in what comes back

Three failures show up repeatedly with Shopify order exports. First, a multi-item order spans several rows: Shopify's help page explains that the extra line items sit on their own rows with many fields left blank, so counting rows overstates orders, and an assistant that treats a blank Total as zero drags average order value down. Second, Refunded Amount belongs to the whole order, so a refund on one item of a three-item order is not tied to the line it came from; read product-level return reasons from your returns log instead. Third, a variant name like "Linen shirt - Blue / M" gets treated as a separate product when you wanted one. Tell the assistant how to handle each of these in the prompt, as the prompt above does for the first, and keep the prompt for next time.

Worked example: why did March drop?

The owner of the clothing store sees March net sales down 14% on February in Shopify. The report says what happened but not why. She runs the cleaned export through the prompt above, with one more question: "Compare March with February by product and by discount use, and list the three biggest contributors to the drop."

An illustrative answer: February had a 20% code running for ten days, with 190 coded orders. March had no code and 41. Excluding coded orders, March sales were actually up 3%. Two best-selling linen shirts also sold out on the 9th, and appear in only 11 orders for the rest of the month against 64 in February.

The drop was a promotion that ended and a stock-out, not a demand problem. The decision that follows is different: reorder the two shirts earlier, and test whether a smaller code could hold the volume. If she had gone to GA4 first she would have seen traffic was flat and learned nothing about either cause.

Five further questions that earn the subscription

1. Which discount codes lose money?

Add a column of unit costs to your sheet. Ask: "For each discount code, calculate gross profit per order after cost and discount, and list codes where it is below $15." A 20% code on a $40 shirt with a $22 cost leaves $10 before shipping and fees. Codes that look popular are often the least profitable.

2. Which products always travel together?

Ask for the ten most common pairs of products in the same order, with counts. A specialist food importer might find that a particular olive oil and a vinegar sell together in 22% of orders, which is a bundle or a "frequently bought together" opportunity. A garage selling parts online might see wiper blades paired with a cleaning kit.

3. How many customers come back, and when?

This needs a customer identifier. Replace emails with a plain number in the sheet before upload, so the assistant can group orders without seeing who the customer is. Ask for the share of customers with a second order within 90 days. If it is 12%, an email sequence at day 45 has a measurable target.

4. Which products have a return problem?

A furniture maker might see a table with a 17% return rate and discover that most refund notes mention the finish colour in photos. The fix is a photo or description change, not a supplier change. The assistant finds the product, and you read the notes yourself.

5. Is the weekly pattern worth planning around?

Ask for orders by day of the week and hour. A car repair garage selling accessories online may find Sunday evening is the busiest window. That's when you schedule the email, not Tuesday morning.

Step three: when GA4 earns its place

GA4 is the right next step when one of these is true: you spend money on ads and need to see which campaigns bring visitors who buy, you rely on organic search or social posts and want to know which pages bring traffic, or you are about to change the site and need a before-and-after.

It is the wrong first step because it needs a tag on every page, correct purchase events, and consent handling for visitors who decline measurement. If you have customers in the EU, a consent banner is usually part of this. Because of those gaps, GA4's order and revenue figures are normally lower than Shopify's. The comparison to run once is: pick a recent month, set Shopify's order count next to GA4's purchase count, and note the percentage gap. If GA4 shows 85% of Shopify's orders, you can use it for trends and channel shares with that caveat. If it shows 40%, fix the tag before relying on it.

Once GA4 is working, you can export its traffic-source table and give it to the AI alongside your sales export. Ask which sources bring buyers rather than only visitors. The tutorial on tracking orders referred by ChatGPT shows one practical use of that traffic view.

Reading a GA4 table with the same assistant

When GA4 is ready, export the traffic-acquisition table for the same period as your sales file and keep the default columns: source and medium, sessions, engaged sessions, purchases and revenue. Then ask something narrow rather than "what does this mean":

Here is GA4 traffic by source/medium for the last 90 days.
List each source with sessions, purchases and purchases per 100 sessions.
Flag sources with more than 200 sessions and fewer than 1 purchase per 100.
Do not recommend ad spend changes; just tell me which sources look
like visitors who browse but do not buy.

An illustrative reply: a newsletter source with 640 sessions and 4.1 purchases per 100, an organic search source with 3,900 sessions and 1.2 per 100, and a social source with 1,150 sessions and 0.3 per 100. The social line is the one to investigate, since it is the largest low-converting block. It may be a landing-page mismatch, or simply the wrong audience. Either way you now have a specific question for the next two weeks instead of a general feeling that social "isn't working".

Which first, by type of store

Your situationStart withWhy
Under 500 orders a year, no paid adsShopify reports onlyThere's too little data for an AI to add much; read the dashboard weekly.
500 to 5,000 orders, discounts and seasonal peaksShopify reports, then export plus AIEnough rows for patterns; the questions are about margin and repeat buyers.
Paying for ads or posting often on socialShopify reports, then GA4You need to see which channel brings buyers, not just visits.
Several channels (own shop, marketplace, wholesale)Export from each, combine in a sheet, then AINo single tool sees all channels; the sheet is the joining point.
Specialist importer with long reorder cyclesExport plus AI, focused on stock and marginTraffic matters less than what to buy next.

Where the numbers go wrong

A few mistakes cost owners real money, so check for them before acting on anything.

  • Mixing gross and net. If the assistant ranks products by gross sales, a high-return item looks like a winner. Always ask for net of refunds.
  • Time stamps. The order date in the export carries a time, and a spreadsheet or assistant that reads it carelessly can move late-evening orders into the next day, shifting month-end totals by a few orders. Compare one month's order count with Shopify's report before trusting monthly figures.
  • Cut-off months. A partial current month looks like a collapse. Exclude it or label it.
  • Small samples. A product with six orders and one refund has a 17% refund rate, which means very little. Ask the assistant to flag any rate based on fewer than 30 orders.
  • Confident wrong sums. Assistants can add up long columns incorrectly. The three-number spot check below exists for this reason.

The three-number check and a weekly routine

After every analysis, verify three figures against Shopify: total net sales for the period, the order count, and the number for whichever product or code the answer leans on. If all three match, go ahead. If one differs by more than a rounding error, ask the assistant to show its working and find the row where it diverged. It takes about five minutes, and it catches the errors that matter before you act on them.

Here is the check filled in for the March question, with illustrative figures. Shopify's sales report shows net sales of $8,140 from 131 orders for March. The assistant's monthly table says $8,140 and 131. For the two linen shirts it reports 11 orders after the 9th, and filtering the sheet by product name and date gives 11. All three match, so the stock-out conclusion stands. Had the assistant said 146 orders, the likely cause would be counting line-item rows instead of orders, the first failure described earlier, and the fix is one sentence in the prompt.

A routine that fits a small store, in order:

  1. Monday: open the Shopify dashboard, note sales, orders and conversion against the previous week (5 minutes).
  2. Monday: export last week's orders, delete personal columns, run the saved prompt (15 minutes).
  3. Monday: run the three-number check and write two lines of notes: what changed and what you will do about it (10 minutes).
  4. First Monday of the month: bring in GA4's traffic-source table and the unit-cost column for the margin questions (20 minutes).

Keep the notes in the same file every week. After three months you can paste them into the assistant and ask what has been recurring, which is where it starts to feel like having an analyst.

What it costs, and what to skip

Shopify analytics and GA4 add nothing to your bill. The AI layer costs $0 on a free tier if your files are small and you accept usage limits, or $20 a month for ChatGPT Plus or Claude Pro (Claude Pro is $17 a month on an annual plan). Pick one to begin with. If you want a view on which suits spreadsheets better, the comparison of the main assistants side by side is a fair starting point, but trying the same file in each costs nothing and settles it for your data.

Skip these until the basics work: paid dashboard apps that duplicate Shopify's reports, a data warehouse, and any tool that wants direct login access to your store before you have shown it can answer the five questions above. A paid plan only needs to save you an hour or two a month to cover its cost. Time the weekly routine for a month, against how long the same questions took you by hand, to see whether it does.

If you'd rather work out which questions matter for your own store before building the routine, that is the kind of thing a short AI implementation consultation is for. Either way, the order stays the same: Shopify reports, then the export, then GA4.

Questions small store owners ask before they start

Is it safe to upload Shopify order exports to ChatGPT or Claude?

Only after removing personal columns. Delete names, emails, phone numbers and street addresses, and keep order ID, date, product, quantity, discount, shipping and totals. Check the privacy settings on your plan, and keep a copy of the cleaned file so you can see exactly what left your computer.

Why does GA4 show different revenue from Shopify?

They count different things. Shopify records every paid order. GA4 only records visits where its tag fired and the visitor allowed measurement, so it usually shows fewer orders and sometimes different totals for refunds, shipping and tax. Treat Shopify as the money record and GA4 as a guide to where visitors came from.

Can the AI replace a proper analytics person?

For a small store it can do the weekly questions: best sellers, discount effect, repeat buyers, return rates. It cannot know your margins, stock position or promotions unless you tell it, and it can miscalculate. Use it to draft the analysis, then spot-check three numbers against Shopify yourself.

How much of my time does the weekly routine take?

About 30 to 45 minutes once the saved prompts and export steps are set up. The first setup takes an afternoon: choosing columns, writing the prompt, running one old month through it and comparing the result with Shopify so you know the numbers match.

Further reads

Sources: Shopify Help Center (Shopify analytics, exporting orders, customer reports, profit reports), Shopify pricing page, Google Analytics product page, ChatGPT and Claude pricing pages, OpenAI and Anthropic privacy help pages, checked November 2026.

Want your weekly store numbers read for you?

On a 1:1 call we'll look at the exports you already have, pick the five questions worth asking each week, and set up a routine you can run without me.

Book a 1:1 call with me