Skip to content

Commit

Permalink
Updated 1 file via CloudCannon.
Browse files Browse the repository at this point in the history
  • Loading branch information
ecupaio authored and CloudCannon committed Mar 5, 2024
1 parent 47e0b27 commit 897767e
Showing 1 changed file with 16 additions and 2 deletions.
18 changes: 16 additions & 2 deletions _posts/2024-02-07-tracking-form-submissions-on-unbounce.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@ footer-cta:
text: ''
published: false
---
<script> window.ub.hooks.afterFormSubmit.push(function() \{ const pageName = window.ub.page.name; window.dataLayer?.push(\{ "event": "generate\_lead", *//GA4 recommended event: https://developers.google.com/analytics/devguides/collection/ga4/reference/events?sjid=15058574496981631888-NA&client\_type=gtag#generate\_lead* "value": 0, *//required parameter for generate\_lead* "currency": "USD", *//required parameter for generate\_lead* "form\_name": pageName *//optional parameter used to identify form by page it's embedded on.* \}); \}); </script>
```
<script>
window.ub.hooks.afterFormSubmit.push(function() {
const pageName = window.ub.page.name;
window.dataLayer?.push(
{
"event": "generate_lead", //GA4 recommended event: https://developers.google.com/analytics/devguides/collection/ga4/reference/events?sjid=15058574496981631888-NA&client_type=gtag#generate_lead
"value": 0, //required parameter for generate_lead
"currency": "USD", //required parameter for generate_lead
"form_name": pageName //optional parameter used to identify form by page it's embedded on.
}
);
});
</script>
```

https://documentation.unbounce.com/hc/en-us/articles/203814014-How-Do-I-Integrate-Google-Tag-Manager-With-Unbounce-for-Classic-Builder-Pages&nbsp;
https://documentation.unbounce.com/hc/en-us/articles/203814014-How-Do-I-Integrate-Google-Tag-Manager-With-Unbounce-for-Classic-Builder-Pages&nbsp;

0 comments on commit 897767e

Please sign in to comment.