What Google Analytics Tracks
Once Google Analytics is connected, RaffleX automatically sends sales data from every completed order. This page explains where your tracking tag goes, exactly what RaffleX feeds back to Google Analyt
Connecting Google Analytics is only the first step. The real value comes from understanding what your site sends back, so you can see genuine sales data (not just visitor counts) inside your reports. This page walks through exactly what RaffleX feeds to Google Analytics, where your tracking tag needs to live, and a few settings you can turn on to get much richer insight.
Where your tracking tag lives
For Google Analytics to receive anything, your tracking tag has to be on your site. In RaffleX this goes in one place:
Log into your RaffleX Admin Site.
Click Settings in the left hand menu.
Open the Advanced tab and find the Code Injection section.
Paste your Google tag into the Header Code field.
Click Save.
The Header Code loads on every page of your site, including the checkout and the order confirmation page (the "thank you" page shown after a successful purchase). That last one matters, because it is where your most important sales data is sent.
What RaffleX sends automatically
When a customer completes an order and reaches the thank you page, RaffleX automatically sends a purchase event to Google Analytics. This is the standard Google Analytics 4 ecommerce event, so it slots straight into Google's built in sales reports.
Every purchase event includes:
The order reference, so each sale is counted once.
The order total, the actual amount the customer paid.
The currency (GBP or EUR, matching your site settings).
Each competition bought, with the product name, the number of tickets, and the price per ticket.
Because raffle tickets are digital, no delivery or tax figures are added. The value you see in Google Analytics is the real money taken.
What is not tracked automatically
It helps to know the limits so your reports do not surprise you.
Visits, traffic sources, and page views are collected automatically by your base Google Analytics tag, the moment it is installed. RaffleX does not need to do anything for these.
Purchases are sent by RaffleX, as described above.
Add to cart, product views, and checkout steps are not sent to Google by default. Out of the box, the purchase event is the only sales action RaffleX feeds to Google Analytics.
You can add add to cart tracking yourself with a small script. Every time a customer adds tickets, RaffleX announces it in the browser, so the script below listens for that and passes it to Google Analytics as the standard add_to_cart event.
If your site runs in euros, change 'GBP' to 'EUR'. The currency code must be uppercase and match your site settings.
Once this is live, add_to_cart shows up in Google Analytics alongside purchase, so you can see how many people add tickets but do not go on to buy. A couple of things to keep in mind:
It fires when tickets are added from a competition page. It does not fire for upsell items added from the cart, so your figures reflect genuine add to cart actions.
Product views and checkout steps are not available to track this way, so
purchaseandadd_to_cartare the two sales events you can feed to Google Analytics.
Want to send the same events to TikTok or Google Ads as well? See Conversion Event Tracking for ready made snippets.
The data layer (for the technically minded)
This section is optional. Skip it if you just want the reports to work.
RaffleX publishes purchase data to the browser data layer (window.dataLayer), the standard channel that Google Tag Manager and Google Analytics 4 read from. On the thank you page it pushes an event named purchase with an ecommerce object shaped like this:
transaction_id
The order reference
value
The order total as a number
currency
The currency code, for example GBP
items
An array, one entry per competition bought
items[].item_name
The competition title
items[].item_id
The competition ID
items[].quantity
The number of tickets
items[].price
The price per ticket
If a standard Google Analytics tag (gtag) is present on the page, RaffleX also fires the same purchase event through it directly. So the event reaches Google whether you installed Google Analytics on its own or through Google Tag Manager. If you use Google Tag Manager, create a Purchase trigger that listens for the purchase event and attach your Google Analytics 4 purchase tag to it.
Improve your Google Analytics tracking
Once the basics are flowing, a few Google Analytics settings turn raw data into something genuinely useful.
Mark the purchase as a key event. In Google Analytics, go to Admin, then Events, and mark
purchaseas a key event (Google's newer name for a conversion). This lets you measure which channels and campaigns actually drive sales, not just clicks.Check your Monetisation reports. In Reports, open Monetisation, then Ecommerce purchases. Once purchases are flowing you will see revenue, top competitions, and average order value pulled straight from your live sales.
Turn on Enhanced Conversions. To help Google match sales back to the right ad or campaign, RaffleX includes the customer's contact details in the purchase event. This supports the Google Analytics feature called Enhanced Conversions, which improves how accurately sales are attributed. Google scrambles (hashes) these details before use.
Add UTM tags to your marketing links. UTM tags tell Google Analytics exactly where a visitor came from, so your sales can be traced back to the right email, post, or advert. See UTM Tags.
Track more steps with Google Tag Manager. If you want add to cart or checkout events as well as purchases, wire them up through Google Tag Manager using Conversion Event Tracking.
You can also review sales inside RaffleX at any time without Google Analytics. See the built in Analytics section for revenue and order figures, and the Orders list for where each order came from.
Last updated