Patrick Rice Co. Let's talk
All videos and guides

ChatGPT referral traffic: how to track it in GA4 and Shopify

Patrick Rice17 June 20254 minute video2 minute read

Apple PodcastsSpotifyPodbean

You can track ChatGPT referral traffic in Google Analytics 4 by filtering your referral traffic with one regular expression, and in Shopify by opening the attribution report under marketing.

I walk through both, click by click. The regex is in the video description, so you can copy and paste it. Shopify has also started listing ChatGPT and other AIs as their own referral sources.

0:11

How do you track AI traffic, leads and sales in GA4?

Open Google Analytics and go to Reports. Under Lifecycle, open Acquisition, then Traffic acquisition. This is where your organic traffic, Google Ads and every other source are listed.

To see only referral traffic, click add comparison at the top, unclick all users, select referral and affiliates traffic, and hit apply. Then change the session primary channel group to session source / medium. That breaks the referral traffic out by where it comes from. In my example, chatgpt.com already showed up with 179 visitors sent to the site and $246 of revenue.

That list is still messy, so the next step is to filter down to all the AIs rather than just ChatGPT. Click add filter, open the dimension dropdown and choose page referrer, which is the page that sent the traffic. Set the match type to matches regular expression and paste in the regex from the video description. Hit apply.

  • Reports, then Lifecycle, Acquisition, Traffic acquisition
  • Add comparison, unclick all users, pick referral and affiliates traffic, apply
  • Change session primary channel group to session source / medium
  • Add filter, dimension page referrer, match type matches regular expression
  • Paste the regex from the description and apply
1:45

What does the AI traffic report show?

Once the filter is applied, you see only the AI traffic coming into the website, plus the AI revenue. In my example ChatGPT was at the top, then Gemini, then Perplexity, then Claude, then another Claude entry, then Perplexity again.

The report may split one AI into a couple of rows, so you will sometimes see the same tool twice. That is how you get referral traffic and referral revenue from AI tools out of Google Analytics 4.

2:15

How do you see ChatGPT sales in Shopify?

Shopify has a very easy way to see the exact revenue coming in. In your Shopify admin, look under marketing and then attribution. Shopify has just started showing ChatGPT and other AIs there as referral sources.

In my example ChatGPT sent 219 visitors. You can also see how many were new customers versus existing customers, along with other useful data. It is a quick way to see all the different AIs sending you traffic.

What this means for your store

If you run a Shopify store, I would set up both views this week. Shopify's attribution report gives you the revenue, and GA4 gives you the AI-by-AI breakdown, so you can see which AI tools are sending real visitors. If you want to get your brand and products mentioned in ChatGPT and the other AIs, I cover that in my video on GEO, Generative Engine Optimization.

Get your free AI visibility audit

Let's talk about your brand. No pitch deck.

  1. Tell us where things stand, and we can discuss whether there's a useful next step together.
  2. Your answers go to Patrick. He will reply to you directly.
  3. Not a fit, and we'll say so.

Step 1 of 6, your confidence

How confident are you that your marketing is profitable?

Your answers go to Patrick. Or write Patrick directly, or call him at (404) 500-7042.

Goldspot's Shopify sales

Swipe to read the full screenshot

Goldspot's original Shopify sales report

Open original image at full resolution