By implementing this integration, you can trigger additional actions such as analytics events, conversion tracking, and custom marketing workflows whenever a user registers for an event via the Sequel iframe.
Step-by-Step Setup
Step 1: Push the Registration Event to GTM
Add the following JavaScript snippet to your website on the same page as the Sequel embed. We recommend adding this in the body
of the page. This snippet listens for registration events from the Sequel iframe and pushes them into GTM's Data Layer:
window.addEventListener("message", function (e) {
if (e.data.event === "user-registered") {
const email = e.data.data.email;
const eventId = e.data.data.eventId;
window.dataLayer = window.dataLayer || [];
window.dataLayer.push({
'event': 'SequelUserRegistration',
'email': email,
'eventId': eventId
});
}
});
Step 2: Set Up a Custom Event Trigger in GTM
In your GTM workspace:
Navigate to Triggers and select New.
Click Trigger Configuration and choose Custom Event.
Enter
SequelUserRegistration
as the event name.
Example configuration:
Trigger Type: Custom Event
Event Name:
SequelUserRegistration
Trigger fires on: All Custom Events
Save this trigger.
Step 3: (Optional) Create Data Layer Variables
To access registration details like user email or event ID within GTM, set up Data Layer variables:
Go to Variables β New.
Select Data Layer Variable.
Enter the variable names (e.g.,
email
,eventId
).
Repeat this for each data field you want to utilize in your tags.
Step 4: Use the Trigger to Fire Tags
Now, you can create or edit tags that fire when users register:
Navigate to Tags β New.
Configure your tag (e.g., Google Analytics event, Facebook pixel, conversion tracking scripts, etc.).
Under Triggering, select the custom event trigger (
SequelUserRegistration
).
Step 5: Preview, Test, and Publish
Click Preview in GTM to enter testing mode.
Perform a registration event via your Sequel iframe.
Verify that GTM detects the
SequelUserRegistration
event and triggers your tags correctly.Once verified, click Submit and publish your changes.
Use Cases
Using this integration, you can:
Track event registrations as conversions in Google Analytics (GA4).
Trigger marketing pixels such as Facebook or LinkedIn for retargeting.
Execute custom scripts or analytics tools to enhance audience insights and optimize campaigns.
Testing Your Integration
To confirm everything is set correctly, open your browser console and verify the Data Layer push event:
dataLayer.push({
event: "SequelUserRegistration",
email: "user@example.com",
eventId: "your-event-id"
});
Ensure GTM's Preview mode captures this event accurately.
You're all set! Your Sequel registration events will now seamlessly trigger any custom logic you need in Google Tag Manager.