Google Tag Manager (GTM) Custom Events and Data Layer

Introduction

In this support article, we cover how to make use of custom events that are automatically sent into GTM via the Data Layer object when users take certain actions on your Scorecard

Before you get started, make sure you have GTM properly installed on your Scorecard. If you've not done so, please follow this guide first.


Custom Events

There are several custom events that might be pushed into your GTM as users move through your Scorecard flow

Event Name Data Layer Params Description
scoreapp_lead
  • first_name
  • last_name
  • email
  • questions
  • scorecard_key
  • scorecard_name
Triggered straight after the lead form has been completed regardless of the position of your lead form. This is likely the most useful event to optimise towards if lead generation is your key priority.
scoreapp_lead_details_updated
  • first_name
  • last_name
  • email
  • questions
  • scorecard_key
  • scorecard_name
Triggered if the lead form is resubmitted with updated details. This may occur when you include the "update details" functionality on a result page.
scoreapp_questions_started
  • scorecard_key
  • scorecard_name
Triggered straight after the first main quiz question has been answered regardless of the position of your lead form.
scoreapp_questions_finished
  • scorecard_key
  • scorecard_name
Triggered straight after the last main quiz question has been answered regardless of the position of your lead form.
scoreapp_question_answered
  • question
  • question_ref
  • scorecard_key
  • scorecard_name
Triggered after each main quiz question is answered.
scoreapp_lead_form_modal_opened
  • scorecard_key
  • scorecard_name
Triggered usually when someone clicks a button and opens the lead form modal. Will also be triggered if the lead form is set to automatically open on a result page at the end of the quiz questions

* Please note that the above event names changed as of 21st October 2024. If you're an existing customer that setup conversion events via GTM prior to the above date please find more information here.


To make use of these custom events you will need to create a Trigger within your GTM container. Choose the trigger type "Custom Event" and then enter the event name exactly as above. See example screenshot below

Data Layer

When custom events are triggered, information relevant to the event is pushed into the data layer. The variables added to the data layer are:

first_name

last_name

email

questions - an array of answers for any other custom fields that were answered on the lead form

scorecard_key - the key of the specific scorecard. You'll find this in the first part of the ScoreApp scorecard url i.e yourscorecardkey.scoreapp.com

scorecard_name - the Scorecard name set on the settings page of your Scorecard

question - the question text that the user just answered

question_ref - a UUID unique to the question that the user just answered


To make use of these data attributes you will need to add them as variables within your GTM container. Choose the variable type of "Data Layer Variable" and enter the variable name exactly as above. See example screenshot below


Embedded Scorecards

If you have embedded your Scorecard, you will need to ensure that the GTM container is also installed directly on the page that hosts the embedded Scorecard. ScoreApp will then detect that a GTM container is active on the hosting page and fire the same events as mentioned above as if those events happened directly on the hosting site. This allows you to use these conversion events whilst maintaining the main user session that is active on your hosting domain.

Still need help? Contact Us Contact Us