EnrolHQ loads pages and submits forms without full-page reloads, so page URLs can't be used to track conversions. Instead, EnrolHQ calls a named JavaScript hook after each key action. Each hook pushes an event to the dataLayer, and GTM sends it on to GA4, Meta and Google Ads.
Introduction
This article covers four primary conversions:
- Enquiry submitted.
- Tour/event booking confirmed.
- Application submitted.
- 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:
- In GTM, go to Triggers > New.
- Enter the trigger name from the table below.
- Set Trigger Type to Custom Event.
- Enter the Event name from the table below. Leave Use regex matching unchecked.
- Set This trigger fires on to All Custom Events.
- 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 |
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
- Go to Tags > New.
- Name the tag, e.g. Google Ads – Enquiry Conversion.
- Set Tag Type to Google Ads Conversion Tracking.
- Enter the Conversion ID and Conversion Label.
- Select the matching trigger, e.g. Enquiry Submitted.
- Repeat for Event Booked, Application Submitted and Scholarship/EOI Submitted.
Meta Pixel
- Go to Tags > New and set Tag Type to Custom HTML.
- Paste the Meta standard event code for the conversion (see the table below).
- 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
- Open GTM Preview mode.
- Submit each form on the live EnrolHQ site.
- Confirm the correct event appears in the dataLayer and the matching tags fire.
- 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