SHOW:
|
|
- or go back to the newest paste.
| 1 | - | // Fire this dataLayer event when a successful user login occurs. The event should fire only for successful logins. |
| 1 | + | // Fire this dataLayer event when a user adds a piece of content to favorites. |
| 2 | ||
| 3 | <script> | |
| 4 | window.dataLayer = window.dataLayer || []; | |
| 5 | window.dataLayer.push({
| |
| 6 | - | 'event': 'login', |
| 6 | + | 'event': 'add_to_favorites', |
| 7 | - | 'formLocation': 'masterclass', // Varible value, based on where the user logged in from. E.g. masterclass, homepage, publication, add to favorites, etc. |
| 7 | + | 'content_type': 'masterclass', // Content type, e.g. podcast, article, masterclass, publication, etc. |
| 8 | - | 'userId': '123456789' // User ID from the website's database. |
| 8 | + | 'content_name': 'The Art and Science of Sound for Your Brand' // Name of the podcast, article, masterclass, publication, etc. |
| 9 | }); | |
| 10 | </script> |