When a visitor successfully submits a Branchside form, the page pushes an event to window.dataLayer. You can use this event in Google Tag Manager (GTM) to trigger your own tags, such as a GA4 event, a Meta Pixel event, or any other tool that reads the data layer.
Every embedded form sends this event, including forms that don't have server-side conversion tracking set up. Branchside writes the event to window.dataLayer, and you decide which tags react to it.
The event contains only two IDs: one for the form and one for the submission. It doesn't include field values, names, email addresses, phone numbers, page URLs, UTM values, or consent state.
The event fires every time a visitor successfully submits the Branchside form.
The event fires once for each successful submission.
It fires on the page that hosts the form, before the visitor sees the success message or gets redirected.
It fires whether or not GTM is installed. Without GTM, the values are still added to window.dataLayer, but no tags run.
The event does not fire when:
The form fails validation.
The network request fails, or Branchside returns an error.
If your form redirects to a thank-you page, don't trigger tags on that page's view. The event fires on the form page about half a second before the redirect. A page-view trigger on the thank-you page can miss the submission entirely.
Branchside pushes the event regardless of the visitor's consent choices. Your GTM Consent Mode setup controls which tags are allowed to fire.
On a successful submission, the page pushes two entries to the data layer. The first one clears any values left over from an earlier submission. The second one is the event your tags should listen for.
window.dataLayer = window.dataLayer || [];
// Housekeeping push: clears values from an earlier submission.
window.dataLayer.push({ branchside_data: null });
// The event to trigger your tags on.
window.dataLayer.push({
event: 'branchside_form_submission',
branchside_data: {
form_id: '<form UUID>',
event_id: '<submission UUID>',
},
});
| Key | What it means |
|---|---|
event |
Always branchside_form_submission. Use this exact value in a GTM Custom Event trigger. |
branchside_data.form_id |
The ID of the form that was submitted. Use it to tell apart several forms on the same site. You can find it in the form's embed code (data-formid) or in your dashboard. |
branchside_data.event_id |
A unique ID for this submission. If a platform supports deduplication, you can use this ID as the deduplication key. |
The first push isn't an event, so it can't start a Custom Event trigger. Its only job is to stop a tag from reusing the previous submission's values. Outside the event itself, branchside_data can be null. That's normal.
In GTM, open Triggers and click New.
Choose Custom Event as the trigger type.
Enter branchside_form_submission as the Event name. It has to match exactly, including the underscores.
Save the trigger. A clear name, such as "Branchside — form submission trigger", makes it easier to find later.
If several forms share a page, the event fires for all of them. To track just one, add a condition to the Custom Event trigger:
Choose Some Custom Events.
Add a condition where branchside_data.form_id equals the form ID you want to track.
If different forms need different tags or parameters, create one trigger per form.
Open Variables and click New.
Choose Data Layer Variable as the variable type.
Enter branchside_data.form_id as the Data Layer Variable Name.
Leave Data Layer Version set to the default, Version 2, and save the variable.
Repeat these steps for branchside_data.event_id.
Create or edit the tag that should receive the event, then:
Set the tag's trigger to the Branchside — form submission trigger Custom Event trigger from Step 1.
Add the Data Layer Variables wherever the tag accepts dynamic values, such as event parameters, custom properties, or an event ID field.
Save the tag and publish your container.
Click Preview in GTM and open the page that hosts your form.
Submit a test entry. On the success step, check that branchside_form_submission appears in GTM Preview and that your tag fires with it.
Open the browser's developer console and run window.dataLayer. You should see both pushes.
If you're using a test form, submit it a second time. Each submission should produce a new event_id.
Create a GA4 Event tag that fires on the branchside_form_submission trigger.
Use an event name that fits your measurement plan, such as generate_lead.
Add form_id as an event parameter with the value {{DLV - branchside_data.form_id}}.
Create a Meta Pixel tag that uses the Custom Event trigger.
Choose the Meta event you want to send, such as Lead, or enter a custom event name.
If the tag has an event ID field, set it to {{DLV - branchside_data.event_id}}.
If you need to separate forms in Meta reporting, pass form_id as a custom property.
If you want to keep the submission ID for reporting or deduplication, add event_id as an event parameter too.
The submission wasn't accepted. Check that all required fields pass validation, that the form is published, and that the visitor's browser can reach Branchside. Validation errors, network errors, and server errors don't push the event.
The page might not have a GTM container, or the container might be blocked by an ad blocker, a content security policy, or a consent tool. Confirm that GTM loads on the page, and that your trigger uses the exact event name branchside_form_submission.
The event fires before the form redirects, so a tag that waits for a page view can miss it. Use the Custom Event trigger only, and make sure the tag doesn't have an extra page-view condition.
The null value comes from the housekeeping push that runs before the event, so it's expected outside the event. If a Data Layer Variable shows null during a submission, check that it uses the full path (branchside_data.form_id or branchside_data.event_id) and that it's set to Data Layer Version 2.
Use branchside_data.form_id to tell them apart. The event name is the same for every form.
Meta Conversions API (CAPI): send form submissions to Meta from Branchside's servers.
Server-Side Google Ads Conversion Tracking: send submissions to Google Ads via direct Google Data Manager integration.
Advanced settings: configure the success message or redirect that follows a submission.
Meta Pixel event tracking with the data layer and GTM: a deeper GTM walkthrough for custom data layer events.