Note: As of July 1, 2023, Google has replaced Universal Analytics with its next-generation measurement solution, Google Analytics 4.
How to set Google Analytics ID
-
Find your Google tag ID in Google Analytics - Learn how
-
Go to Admin > Settings > SEO and Trackings
-
Enter your Google Analytics ID and save. It will start with "G-"
In countries that require cookie consent (EEA, UK, Switzerland, South Africa), Google Analytics loads only after the visitor accepts analytics cookies. See Cookie consent.
Events we send to Google Analytics
Once your Google tag ID is saved, your storefront sends these GA4 events on its own — there is nothing else to set up.
| Event | Sent when |
|---|---|
view_item | A customer opens a product |
view_item_list | A customer browses a category listing |
search | A customer searches your store |
add_to_cart | A product is added to the cart |
begin_checkout | A customer starts checkout |
purchase | An order is placed |
sign_up | A customer creates an account |
payment_status | The customer reaches a payment outcome |
purchase fires when the order is placed, whether or not it was paid online — an order over WhatsApp or cash on delivery counts the same as a card payment. It carries a transaction_id, so the same order is not counted twice if the customer refreshes. Orders you create or edit yourself in Admin are not reported.
payment_status is a custom event that reports what happened to the payment, with a status parameter of completed (the money went through) or pending (a transfer is still being confirmed). A failed payment sends nothing, since the customer can retry. It is in addition to purchase, not instead of it — use purchase for orders taken and payment_status for money received. Custom events need to be registered as a custom dimension in GA4 before status shows up in your reports.
