Google Analytics 4 and tracking sales from campaigns
How to connect your own Google Analytics 4 property and Google Ads tag to your store, so you can see which website or campaign your customers came from and what they bought.
To connect your own Google Analytics 4 property to the store, paste its measurement id in the store’s settings: we install the tag ourselves, on every page of the store, with no code to paste. Your Google Analytics then shows which website, campaign or ad brought customers to the store and how much they bought.
What reaches your Google Analytics
Your GA4 property receives the store’s page views and the standard ecommerce events, from a viewed offer all the way to a paid order:
| Event | When |
|---|---|
page_view |
Every page view in the store |
view_item_list |
The customer sees a list of products (the catalogue) |
select_item |
The customer clicks a product in the list |
view_item |
The customer opens a product page |
begin_checkout |
The customer starts filling in the purchase form |
add_to_cart, add_payment_info |
The customer submits the form and moves on to payment |
purchase |
The order has been paid — with its value, currency and transaction id |
purchase is a key event (conversion) in GA4 by default, so revenue from voucher and
ticket sales shows up in the acquisition reports straight away.
The source of the visit is kept: UTM parameters (utm_source, utm_medium,
utm_campaign, utm_term, utm_content) and ad click ids (gclid, fbclid, msclkid and
similar) reach GA4. Any other parameters in the address, as well as order numbers and voucher
codes, are removed from the addresses sent to Analytics.
Connecting Google Analytics 4
1. Copy the measurement id from Google Analytics. In Google Analytics go to
Admin → Data streams and pick your web stream. The measurement id starts with G-
(e.g. G-AB12CD34EF). You can use the same property as on your company website — we
recommend it if you want to follow the customer’s path from your website to the store.
2. Open the store’s marketing settings. In the Retiva dashboard go to Settings → Stores, click Edit next to the store and open the Marketing tab.
3. Paste the id into “Measurement id” and click “Save changes”.
Marketing: Your store
Google Analytics 4
See the store's traffic and sales in your own Google Analytics property. Paste the measurement id: we install the tag ourselves, on every page of the store, with no separate script.
Measurement id
Starts with G-. Find it in Google Analytics under Admin → Data streams → your web stream.
Google Ads tag
Google tag id
Purchase conversion label
The field accepts a GA4 id (G-…) only. Do not paste a script here, or a Google Tag Manager
(GTM-…) or legacy Universal Analytics (UA-…) id — we install the tag ourselves, and the
Google Ads id has its own field below.
4. Check that data arrives. Open your store in a browser, accept analytics cookies in the cookie banner and visit a few pages. After a moment the visit should appear in Google Analytics under Reports → Realtime.
A visit to your website and a purchase in the store as one session
The store runs on a different address from your company website. Without further setup, GA4
shows a customer who came from your website as a referral (e.g. yourcompany.com / referral) — you can see the sale came from your website, but not which original source
(a search engine, Facebook, a newsletter) brought the customer to your website first.
To see the whole journey as one session, set up cross-domain measurement:
- Use the same GA4 property (the same
G-…id) on your company website and in the store. - In Google Analytics go to Admin → Data streams, pick your web stream, then Configure tag settings → Configure your domains.
- Add both domains: your company website’s domain (e.g.
yourcompany.com) and the domain your store runs on (the address customers see, e.g.your-store-address.retiva.io, or your own domain if you have connected one). - Save. From then on, links from your website to the store carry the session id automatically.
Do not add UTM parameters to links from your website to the store — with cross-domain measurement, a UTM on such a link starts a new session and overwrites the original source.
Campaign links straight to the store (UTM)
When a campaign sends customers directly to the store (a newsletter, a social media post, a text message, a QR code on a flyer), add UTM parameters to the link, for example:
https://your-store-address.retiva.io/?utm_source=newsletter&utm_medium=email&utm_campaign=christmas-2026
GA4 shows the sales from such a campaign under Reports → Acquisition → Traffic acquisition, split by source, medium and campaign. The link can point at a specific product too — the parameters work on every page of the store.
Where to see sales in Google Analytics
- Reports → Acquisition → Traffic acquisition — sessions, key events and revenue by source, medium and campaign. This answers “where did the customers who bought come from”.
- Reports → Monetisation → Ecommerce purchases — which vouchers and tickets sell best.
- Explore → Funnel exploration — how many people went from viewing a product to buying
it (
view_item→begin_checkout→add_payment_info→purchase) and where they drop off.
Google Ads campaigns
If you run Google Ads campaigns, the same Marketing tab takes your Google tag id
(AW-…) and, optionally, the purchase conversion label. Once the label is set, every paid
order is reported to Google Ads as a conversion with its value and currency, so Google Ads
can optimise your campaigns for sales.
You will find both ids in Google Ads under Tools → Data manager → Google tag. The label
is the part after the slash in the conversion target AW-123456789/AbCdEfGh — pasting the
whole thing works too.
Cookie consent
The tags follow the visitor’s choice in the store’s cookie banner (Google Consent Mode v2). Google Analytics sets its cookies only after consent to the analytics category, and Google Ads only after consent to the marketing category (the banner offers that category only when the store has a Google Ads tag).
Some customers will decline, so Google Analytics may show fewer purchases than the orders in the Retiva dashboard. The complete, exact list of sales is always under Orders.
Frequently asked questions
Can I paste a Google Tag Manager container or my own script? No. The store takes GA4 and Google Ads ids and installs the tag itself — that way the cookie banner always decides when tags may set cookies, and customer data (such as e-mail addresses or voucher codes) never reaches outside tools.
I have several stores. Can each one use a different GA4 property? Yes. The id is set separately for each store.
A purchase does not show up in GA4. Check that the customer (or you, while testing) accepted analytics cookies in the cookie banner. GA4’s standard reports update with a delay of up to 24–48 hours; only the Realtime report shows data straight away.