Introduction

This article covers four primary conversions:

  1. Enquiry submitted.
  2. Tour/event booking confirmed.
  3. Application submitted.
  4. Scholarship/EOI submitted.

This is the second of three tracking articles. Complete How to Add Google Tag Manager first. Attribution, accepted offers and payment tracking are covered in Attribution and Conversion Tracking.

Step 1: Install GTM

Confirm the school's GTM container is installed in Settings > Custom Scripts > HTML Custom Page Head Code. The full steps are in How to Add Google Tag Manager.

To find an existing container's embed code, go to Admin > Install Google Tag Manager in GTM.

Step 2: Push events to the dataLayer

GTM triggers only fire on events pushed to the dataLayer. Add the code below to Settings > Custom Scripts > HTML Custom Page Head Code, below the GTM container. Each hook pushes one event with the student ID, which links GA4 campaign data to the student's enrolment outcome in EnrolHQ.

<script>
// Enquiry submitted
function enrolHQOnEnquirySubmitSuccess(payload) {
  var enquiries = (payload && payload.enquiries) || [];
  window.dataLayer = window.dataLayer || [];
  window.dataLayer.push({
    event: 'enquiry_submit',
    enquiry_ids: enquiries.map(function (e) { return e.id; }).join(','),
    student_profile_ids: enquiries.map(function (e) { return e.studentProfileId; }).join(',')
  });
}
 
// Tour/event booking confirmed
function enrolHQOnBookingConfirmation(payload) {
  window.dataLayer = window.dataLayer || [];
  window.dataLayer.push({
    event: 'event_booking',
    booking_id: payload && payload.bookingId,
    event_id: payload && payload.eventId,
    student_profile_ids: ((payload && payload.studentProfileIds) || []).join(',')
  });
}
 
// Application submitted
function enrolHQOnEnrolmentSubmitSuccess(payload) {
  window.dataLayer = window.dataLayer || [];
  window.dataLayer.push({
    event: 'application_submit',
    student_profile_id: payload && payload.studentProfileId
  });
}
 
// Scholarship/EOI submitted
function enrolHQOnEOISubmitSuccess(payload) {
  window.dataLayer = window.dataLayer || [];
  window.dataLayer.push({
    event: 'scholarship_submit',
    student_profile_id: payload && payload.studentProfileId
  });
}
</script>
Note: enrolHQInitAlways() is already defined by the GTM embed script. Don't define it a second time, or the second definition replaces the first.

Step 3: Create Custom Event triggers in GTM

Create one trigger for each conversion:

  1. In GTM, go to Triggers > New.
  2. Enter the trigger name from the table below.
  3. Set Trigger Type to Custom Event.
  4. Enter the Event name from the table below. Leave Use regex matching unchecked.
  5. Set This trigger fires on to All Custom Events.
  6. Click Save.
Trigger name Event name Fired from
Enquiry Submitted enquiry_submit enrolHQOnEnquirySubmitSuccess
Event Booked event_booking enrolHQOnBookingConfirmation
Application Submitted application_submit enrolHQOnEnrolmentSubmitSuccess
Scholarship/EOI Submitted (rename to match how the school uses the form) scholarship_submit enrolHQOnEOISubmitSuccess
Already set up with the old event names? Earlier versions of this article used the hook names (e.g. enrolHQOnEnquirySubmitSuccess) as trigger event names. After adding the Step 2 code, update each trigger's Event name to the new name in the table above.

Step 4: Create conversion tags

Connect each trigger to a tag for each advertising platform.

Google Ads

  1. Go to Tags > New.
  2. Name the tag, e.g. Google Ads – Enquiry Conversion.
  3. Set Tag Type to Google Ads Conversion Tracking.
  4. Enter the Conversion ID and Conversion Label.
  5. Select the matching trigger, e.g. Enquiry Submitted.
  6. Repeat for Event Booked, Application Submitted and Scholarship/EOI Submitted.

Meta Pixel

  1. Go to Tags > New and set Tag Type to Custom HTML.
  2. Paste the Meta standard event code for the conversion (see the table below).
  3. Select the matching trigger.
<script>
fbq('track', 'Lead');
</script>
Trigger Meta standard event GA4 event
Enquiry Submitted Lead generate_lead
Event Booked Schedule event_booking
Application Submitted SubmitApplication application_submit
Scholarship/EOI Submitted None (secondary conversion) scholarship_submit

Mark only enquiries, bookings and applications as conversions (key events) in GA4 and Google Ads. Secondary events dilute bidding.

Step 5: Publish and test

  1. Open GTM Preview mode.
  2. Submit each form on the live EnrolHQ site.
  3. Confirm the correct event appears in the dataLayer and the matching tags fire.
  4. Click Submit in GTM to publish the container.

Tips

  • Conversions take up to 24 hours to appear in Google Ads reports.
  • Check Meta Pixel events in Meta Events Manager.
  • If a conversion doesn't fire, check the spelling and case of the event name in both the code and the trigger.
  • Never push names, emails or phone numbers into the dataLayer.
  • Google's guide to setting up GA4 events has more detail.

Next step

Connect campaigns to enrolment outcomes, and track payments and accepted offers, in Attribution and Conversion Tracking.

Last reviewed: 1 October 2026