View difference between Paste ID: zbrCkMuF and 1tZvAqPB
SHOW: | | - or go back to the newest paste.
1-
// Fire this dataLayer event when a successful submission of the newsletter sign-up form occurs. The event should fire only for successful submissions. The event shouldn't fire again if the user reloads or revisits the thank-you page.
1+
// Fire this dataLayer event when a successful submission of the newsletter sign-up form occurs. The event should fire only for successful submissions.
2
3
<script>
4
window.dataLayer = window.dataLayer || [];
5
window.dataLayer.push({
6-
 'event': 'newsletter_sign_up',
6+
 'event': 'newsletter_sign_up'
7-
 'formLocation': 'pop_up',  // Variable value - the location of the form on the page, e.g. footer, body, pop_up
7+
8-
 'timeOnSite': '5-10min',  // Time user spent on the site (across all of their sessions) before subscribing. Categorized into 5-minute ranges.
8+