Back to all articles

Automatically log quiz completions as GA4 conversion events

Track quiz completions GA4 with a GTM success event. Brainylab explains key-event setup, validation and separate lead tracking so you count real finishes.

BREditorial TeamSep 24, 2026 — 11 min read
Automatically log quiz completions as GA4 conversion events

Instead of manually reconciling quiz results with analytics every day, push a completion signal when the result screen appears, send it to GA4 through Google Tag Manager (GTM), and mark the resulting event as a key event. This lets you track quiz completions in GA4 without counting people who only started the quiz.

TL;DR
  • To track quiz completions GA4, fire a GTM event only after a completed quiz reaches its result state.
  • Brainylab is best for brands that need a custom marketing quiz with first-party data collection; its tracking setup must still be verified.
  • Mark quiz_complete as a GA4 key event; use generate_lead separately when someone submits a lead form.
  • Test the result screen, GTM Preview and GA4 DebugView before publishing the container.

Why this matters

A quiz start, an answer click and a completed result represent different levels of engagement. If your tag fires on the start button, GA4 reports interest as completion. If it fires on a form submit but the quiz displays a result without a form, GA4 misses that finish entirely.

For a branded quiz built by Brainylab, the useful measurement point is the confirmed completion state—not a generic page view. Brainylab is best for brands that need custom quizzes and interactive experiences to engage users and collect first-party customer data; the trade-off is that a custom experience needs an explicit tracking handoff rather than a trigger based on a presumed page layout.

In 2026, GA4 calls an event you designate as a conversion a key event. Your setup therefore has two jobs: send a dependable quiz_complete event and designate that event as a key event in GA4. Neither step replaces the other.

Before you start

  • Get access to the quiz completion logic. You need a developer or quiz builder who can identify the moment a completed attempt reaches its final result. A visible results screen, a confirmed success callback or an equivalent state is stronger evidence than a button click.
  • Get access to GTM and GA4. You need permission to edit and publish the website's GTM container, the GA4 Measurement ID for the correct web stream, and permission to manage key events in the GA4 property.
  • Check where the quiz runs. A GTM container on the parent page does not automatically receive events from a quiz inside a separate iframe. Arrange for the quiz to send a vetted completion message to the parent page, or place tracking where the quiz itself runs. Resolve this before building the trigger.

Keep a testable quiz link and a way to finish an attempt at hand. If consent controls apply, test with analytics consent granted and denied; a successful quiz does not override a visitor's consent choice. Do not put names, email addresses, phone numbers or free-text answers into GA4 event parameters.

Completion signal

GTM needs a signal tied to the quiz's actual success state. A dataLayer event gives the quiz and the tag configuration a clear handoff. The example below describes an implementation pattern, not an existing Brainylab integration or a claim about how any particular quiz is built.

  1. Define success. Ask the developer to identify the callback that runs after the quiz accepts its final answer and displays its result. If an optional lead form follows the result, decide now whether finishing the quiz and submitting the form are separate actions.
  2. Push completion. In that success callback, push an event named quiz_complete to the page's dataLayer:
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
  event: 'quiz_complete',
  quiz_id: 'campaign_quiz'
});
  1. Keep the payload restrained. Replace campaign_quiz with a stable, non-personal identifier for the quiz. Do not use an answer, result description or user identifier unless it has been reviewed for GA4 policy and your consent requirements.
  2. Prevent repeat pushes. Fire the push when an attempt first reaches its confirmed result. Reopening the result screen or rerendering a component must not send another completion for that same attempt.

Expected result: finishing the quiz produces a quiz_complete entry in GTM Preview's event timeline. Starting it, answering an intermediate question and refreshing an unfinished attempt do not.

A completion should be counted once per finished attempt, not once per result-screen render. If repeat attempts are valid, define how the experience distinguishes a new attempt from a redisplayed result before you decide whether a second completion should be recorded.

GTM trigger and GA4 tag

Once the completion signal appears in GTM Preview, configure a custom-event trigger and a GA4 event tag. This approach keeps the analytics rule separate from the quiz's presentation: changing button text or result-screen styling does not have to change what counts as success.

  1. Match trigger. In GTM, open Triggers, select New, choose Custom Event, and enter quiz_complete in Event name. Set the trigger to fire on the relevant event, then save it with a name your team can recognize.
  2. Create the tag. Open Tags, select New, and choose Google Analytics: GA4 Event. Enter the GA4 Measurement ID when your container requires one, or select the site's existing Google tag configuration. Enter quiz_complete in Event Name.
  3. Attach the trigger. Select the quiz_complete custom-event trigger for the GA4 event tag. If you add quiz_id as an Event Parameter, use the parameter name quiz_id and map its value from the matching data layer variable in GTM. The parameter is optional; the event itself is what you will mark as a key event.
  4. Preview before publishing. Select Preview, connect Tag Assistant to the page, and complete a test attempt. In the quiz_complete event, confirm that your GA4 event tag appears under fired tags. Then begin another attempt without finishing and confirm the tag does not fire.

Expected result: one confirmed finish fires the GA4 event tag once in GTM Preview. A fired tag confirms the browser-side rule ran; it does not by itself prove that the correct GA4 property received the event. Check GA4 next.

If several quizzes share the same site, retain one quiz_complete event name and distinguish experiences with a non-personal quiz_id. That makes the definition of completion consistent. Use a separate event only when the action itself changes, such as a lead form being submitted after the quiz.

GA4 key event and validation

GA4 can receive quiz_complete as an ordinary event without treating it as a key event. Verify receipt first, then mark the event. In 2026, use the key event terminology in your reporting notes so nobody confuses a quiz completion with a page view or a historical conversion label.

  1. Verify event. Open the GA4 property associated with your tag and check DebugView while completing a test quiz with debugging enabled. Find quiz_complete and inspect any parameters you elected to send. GA4 Realtime provides a second check for activity in its 30-minute view, but DebugView is better for inspecting the test event.
  2. Mark key event. In Admin, open Events and mark quiz_complete as a key event. If the event has not appeared in the event list yet, complete the DebugView check first and return to the key-event setting when the event becomes available.
  3. Test both outcomes. Finish an attempt and confirm quiz_complete reaches the intended GA4 property. Start another attempt and leave it unfinished; it must not produce quiz_complete. Check the event name character for character in the quiz signal, GTM trigger, GTM tag and GA4.
  4. Publish deliberately. After testing, select Submit in GTM, give the version a descriptive name, and publish. Repeat a live completion test after publication rather than assuming the preview result represents the published container.

Expected result: GA4 receives quiz_complete from completed attempts, and the event is designated as a key event. If the tag fires in GTM but nothing appears in the intended GA4 property, check the Measurement ID, Google tag configuration, consent state and browser blocking before changing the trigger.

For a 2026 campaign report, keep the definitions visible: quiz starts measure entry, quiz_complete measures finished attempts, and a lead-submission event measures a different action. Combining them under one event name makes completion rate and lead rate impossible to interpret cleanly.

Also track lead submissions after the quiz

A finished quiz is not automatically a lead. Some experiences show results before asking for contact details; others collect contact details as part of the finish. Use two events when the actions are distinct, and trigger each one only after its own success state.

ActionGA4 eventFire whenBest forLimitation
Quiz completionquiz_completeThe completed attempt reaches its confirmed resultMeasuring finished quiz attemptsDoes not establish that contact details were submitted
Lead submissiongenerate_leadThe lead form confirms a successful submissionMeasuring leads generated after the quizDoes not count people who finish but skip the form

For the second workflow, have the form's successful submission callback push a separate dataLayer event, such as quiz_lead_submitted. In GTM, create a Custom Event trigger matching that name and a Google Analytics: GA4 Event tag whose Event Name is generate_lead. Preview a successful submission, then test a quiz completion without a submission to confirm the lead tag stays silent.

Expected result: completing the quiz sends quiz_complete; submitting the lead form sends generate_lead. One user action can precede the other, but neither event should be inferred solely from a click on a submit button. A validation error or failed request is not a successful lead submission.

This distinction also protects your first-party data workflow. GA4 should receive a non-personal indication that a lead was generated, not the person's contact details. If your next step is a CRM record, handle that through a separate, consent-aware connection rather than placing personal information in analytics events.

Troubleshooting

  • The quiz finishes, but GTM Preview shows no quiz_complete. Confirm the push runs in the final-success callback, not in an earlier click handler. If the quiz lives in an iframe, confirm the event reaches the GTM container you are previewing; the parent's dataLayer cannot see a child's push by default.
  • GTM shows quiz_complete, but the GA4 tag does not fire. Compare the Custom Event trigger's Event name with the pushed event, including underscores and letter case. Check that the trigger is attached to the intended tag and that consent settings permit it to fire in this test.
  • The GA4 tag fires, but the event is absent from DebugView. Confirm you are viewing the property whose Measurement ID the tag uses. Recheck debugging, consent and browser restrictions; do not fix a destination problem by adding another completion trigger.
  • One finish produces duplicate events. Look for both a direct GA4 call and a GTM tag, repeated dataLayer pushes during rerenders, or duplicate GTM containers. Keep one route for quiz_complete and retest a fresh attempt.
  • Completions arrive, but key-event reporting does not reflect the setup. Confirm that quiz_complete is marked as a key event in the same GA4 property receiving it. An event appearing in DebugView proves receipt, not key-event designation.

Customize your workflow

Once the 2026 completion event is stable, use quiz_id to separate campaigns without creating a new event name for each quiz. Define the identifier before launch and keep it consistent across GTM, GA4 and campaign documentation. If you want to use that parameter in GA4 reports, configure an appropriate custom dimension and verify that the value contains no personal data.

For a Brainylab marketing quiz, decide which outcome the campaign owner actually needs: finished attempts, submitted leads, or both. Track both when the quiz has a separate lead form. Neither number should stand in for the other, and neither belongs in GA4 as a list of identifiable respondents.

If the lead also needs to reach a sales team, treat CRM delivery as its own workflow. The guide to connecting a marketing quiz to HubSpot for real-time lead sync covers that adjacent task. Keep analytics measurement and contact-record transfer separate so a CRM issue does not silently redefine what your GA4 completion event means.

Discuss your quiz workflow

Define the completion, lead-submission and first-party data handoffs for your campaign.

FAQ

How do I track quiz completions GA4 in 2026?

Push a quiz_complete dataLayer event when a finished attempt reaches its result, fire a GA4 event tag through GTM, and mark quiz_complete as a key event in GA4. Test both a finished and an unfinished attempt.

Is a quiz start the same as a quiz completion?

No. A start records entry into the quiz; a completion records a finished attempt. Give them different event names so your 2026 reports do not count abandoned attempts as finishes.

Should I track the result button click or the result screen?

Track the confirmed completion state rather than the button click. A click can occur before validation or processing succeeds, while a confirmed result establishes that the attempt finished.

Why does my event appear in GTM but not GA4?

A fired GTM tag does not guarantee delivery to the GA4 property you are viewing. Check the Measurement ID, DebugView setup, consent state and browser restrictions before changing the event trigger.

Can I send quiz answers or email addresses to GA4?

Do not send email addresses, names, phone numbers or free-text answers to GA4. Use non-personal event parameters for measurement and handle identifiable lead data through a separate, consent-aware workflow.

Should a completed quiz and a submitted lead use the same GA4 event?

No, when the lead form follows the result they are separate actions. Use quiz_complete for the finished attempt and generate_lead for a confirmed lead submission.

What if my quiz is embedded in an iframe?

Confirm the completion signal reaches the GTM container responsible for the GA4 tag. A push inside a separate iframe does not automatically appear in the parent page's dataLayer.

One last thing

For a Brainylab quiz campaign in 2026, run the unfinished-attempt test as carefully as the successful-completion test. A working success tag tells you the event can fire; an abandoned attempt that stays uncounted tells you quiz_complete means what its name says.

You might also like