@LHobbs it could be because the script is running too later (after that event has already happened). For instance, if the google tag manager script is in the footer below the HubSpot form embed.
Hello @LHobbs , it seems you are using global events for embedded form. Have you tried binding the event directly to the embedded form like explained in this article?
Basically you would do something like this:
hbspt.forms.create({
portalId: '',
formId: '',
onFormReady: function($form) {
window.dataLayer.push({
'event': 'hubspot-form-ready',
'hs-form-guid': 'the form id' //this is also going to be available somewhere in $form
});
}
});
If my answer was helpful please mark it as a solution.
Hello @LHobbs , it seems you are using global events for embedded form. Have you tried binding the event directly to the embedded form like explained in this article?
Basically you would do something like this:
hbspt.forms.create({
portalId: '',
formId: '',
onFormReady: function($form) {
window.dataLayer.push({
'event': 'hubspot-form-ready',
'hs-form-guid': 'the form id' //this is also going to be available somewhere in $form
});
}
});
If my answer was helpful please mark it as a solution.
@LHobbs it could be because the script is running too later (after that event has already happened). For instance, if the google tag manager script is in the footer below the HubSpot form embed.