Skip to main content

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.

EventWhenExtra parameters
sq_quiz_startThe shopper starts the quiz
sq_question_answeredEach question is answeredsq_question_id, sq_question_text, sq_question_position, sq_answers
sq_quiz_completeThe results page is reachedsq_filters_matched, sq_filters_total, sq_recommended_count
view_item_listRecommendations are shownStandard ecommerce items (the recommended products)
add_to_cartRecommended products are added to the cart from the resultscurrency, value, items
begin_checkoutThe shopper clicks checkout in the quizcurrency, value, items
purchaseThe 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:

  1. Measurement ID: in GA4, go to Admin → Data streams → your web stream. Copy the ID that starts with G-.
  2. 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)​

ToggleEvents
Funnel eventssq_quiz_start, sq_quiz_complete
Commerce & revenueview_item_list, add_to_cart, begin_checkout, purchase
Per-question eventssq_question_answered (one per question)

Sync per quiz: turn GA4 off for individual quizzes. All quizzes are tracked by default.

Check that events arrive​

  1. Open GA4 → Reports → Realtime.
  2. Take your quiz on your storefront.
  3. Within about a minute you should see sq_quiz_start, sq_question_answered and the other events under Event count by Event name.
GA4 never reports a wrong API secret

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:

QuestionHow 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_cart fires when the shopper adds recommended products and opens the cart from the quiz. If they go straight to checkout, you'll see begin_checkout instead.
  • purchase needs 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​

ProblemFix
Nothing in RealtimeCheck 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 appearsThe API secret is wrong or stale. See the caution above
No add_to_cartThe shopper went straight to checkout. This is expected
No purchaseThe order wasn't linked to the quiz, or wasn't paid. See Notes
Custom parameters missing in reportsRegister them as custom dimensions. They only appear for events after registration

Was this page helpful?