Advertisement
eugenpotlog

[cryptoverse] datalayer-init

May 5th, 2022 (edited)
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2.     // Add this when the page loads, as high as possible in the source code
  3.     window.dataLayer = window.dataLayer || [];
  4.     window.dataLayer.push({
  5.       'event': 'dataLayer-init',
  6.       'user_id': '1234', // the user id as kept in the backend. only for logged in users.
  7.       'is_customer': false, // true or false, depending if the user has bought something or not. only when info is known
  8.       'is_subscriber': true, // true or false, depending if the user is subscribed to newsletter or not. only if info is known
  9.     });  
  10. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement