SHOW:
|
|
- or go back to the newest paste.
| 1 | - | // Fire this dataLayer event when a successful user registration occurs. The event should fire only for successful registrations. |
| 1 | + | // Fire this dataLayer event when a successful user login occurs. The event should fire only for successful logins. |
| 2 | ||
| 3 | <script> | |
| 4 | window.dataLayer = window.dataLayer || []; | |
| 5 | window.dataLayer.push({
| |
| 6 | - | 'event': 'sign_up', |
| 6 | + | 'event': 'login', |
| 7 | - | 'userId': '123456789', // User ID from the website's database. |
| 7 | + | 'formLocation': 'masterclass', // Varible value, based on where the user logged in from. E.g. masterclass, homepage, publication, add to favorites, etc. |
| 8 | - | 'formLocation': 'masterclass', // Varible value, based on where the user registered from. E.g. masterclass, homepage, publication, add to favorites, etc. |
| 8 | + | 'userId': '123456789' // User ID from the website's database. |
| 9 | - | 'newsletterOptIn': 'true' // Variable value based on user's choice: 'true' - if user opts in to the newsletter subscription, 'false' - if user does not opt in. |
| 9 | + | |
| 10 | </script> |