Google Analytics 4
Send your whole quiz funnel to Google Analytics 4: quiz starts, every answer, completions, recommendations, add to cart, checkout, and purchases with revenue attributed to the quiz. Events are sent from ShopperQuiz's servers, so ad blockers and browser privacy settings don't stop them.
Available on: Starter plan and above · Platforms: Shopify and WooCommerce (identical)
Events sent to GA4
Every event includes sq_quiz_id and sq_quiz_name.
| Event | When | Extra parameters |
|---|---|---|
sq_quiz_start | The shopper starts the quiz | |
sq_question_answered | Each question is answered | sq_question_id, sq_question_text, sq_question_position, sq_answers |
sq_quiz_complete | The results page is reached | sq_filters_matched, sq_filters_total, sq_recommended_count |
view_item_list | Recommendations are shown | Standard ecommerce items (the recommended products) |
add_to_cart | Recommended products are added to the cart from the results | currency, value, items |
begin_checkout | The shopper clicks checkout in the quiz | currency, value, items |
purchase | The order is paid (sent by our server from your store's order notification) | transaction_id, currency, value, items |
view_item_list, add_to_cart, begin_checkout and purchase use GA4's standard ecommerce format, so they appear in GA4's Monetization reports and flow to linked Google Ads accounts.
Connect GA4
You need two values from GA4:
- Measurement ID: in GA4, go to Admin → Data streams → your web stream. Copy the ID that starts with
G-. - API secret: on the same data stream page, open Measurement Protocol API secrets → Create, name it
ShopperQuiz, and copy the secret value.
Then in ShopperQuiz, go to Integrations → Google Analytics 4 → Connect, paste both values and save. ShopperQuiz checks the values before saving.
The API secret is required: every quiz event is sent through GA4's Measurement Protocol.
What gets tracked (settings)
| Toggle | Events |
|---|---|
| Funnel events | sq_quiz_start, sq_quiz_complete |
| Commerce & revenue | view_item_list, add_to_cart, begin_checkout, purchase |
| Per-question events | sq_question_answered (one per question) |
Sync per quiz: turn GA4 off for individual quizzes. All quizzes are tracked by default.
Check that events arrive
- Open GA4 → Reports → Realtime.
- Take your quiz on your storefront.
- Within about a minute you should see
sq_quiz_start,sq_question_answeredand the other events under Event count by Event name.
GA4 accepts events even when the API secret is wrong or deleted, and silently discards them. If only purchase appears, or nothing appears, create a new API secret on the same data stream as the Measurement ID, then save it in ShopperQuiz again.
Get the most out of the data
Mark the quiz as a conversion: in GA4, go to Admin → Events and turn on Mark as key event for sq_quiz_complete. purchase is a key event by default.
Make quiz parameters reportable: GA4 only shows custom parameters in reports after you register them. Go to Admin → Custom definitions → Create custom dimension (scope: Event) for sq_quiz_name, sq_question_text, sq_answers and sq_question_position.
Useful reports:
| Question | How to answer it in GA4 |
|---|---|
| How much revenue did the quiz drive? | Reports → Monetization → Ecommerce purchases, or an Exploration with the purchase event filtered by sq_quiz_name |
| Where do shoppers drop off? | Explore → Funnel exploration: sq_quiz_start → sq_question_answered (by sq_question_position) → sq_quiz_complete → add_to_cart → purchase |
| What do shoppers answer? | Explore → Free form on sq_question_answered, with rows sq_question_text and sq_answers |
| Do quiz takers buy more? | Compare segments of users with and without sq_quiz_complete |
Same shopper, same session: if your store already runs GA4, ShopperQuiz reuses the shopper's existing GA4 visitor ID, so quiz events join the rest of their visit. Otherwise ShopperQuiz uses its own visitor ID.
Notes
add_to_cartfires when the shopper adds recommended products and opens the cart from the quiz. If they go straight to checkout, you'll seebegin_checkoutinstead.purchaseneeds the order to be linked to the quiz. On Shopify, that means a product added from the quiz results. On WooCommerce, it means an order placed within an hour of going to the cart or checkout from the quiz. It fires once per quiz attempt.- Standard GA4 reports can take 24–48 hours to show new events. Realtime shows them within a minute.
Disconnect
Integrations → Google Analytics 4 → Manage → Disconnect Google Analytics stops all tracking. Data already in GA4 is kept.
Troubleshooting
| Problem | Fix |
|---|---|
| Nothing in Realtime | Check the API secret belongs to the same data stream as the Measurement ID; create a new one if unsure. Check Sync per quiz is on |
Only purchase appears | The API secret is wrong or stale. See the caution above |
No add_to_cart | The shopper went straight to checkout. This is expected |
No purchase | The order wasn't linked to the quiz, or wasn't paid. See Notes |
| Custom parameters missing in reports | Register them as custom dimensions. They only appear for events after registration |
Was this page helpful?