NikolayBezay

Lapidot GTM code

May 26th, 2022 (edited)
518
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <script>
  2. (function() {
  3.     var zoomAnaliticsData = window.sessionStorage.getItem('zoomAnaliticsData');
  4.     zoomAnaliticsData = JSON.parse(zoomAnaliticsData);
  5.     if (zoomAnaliticsData && zoomAnaliticsData.length > 0) {
  6.        var userBirthDate = new Date(zoomAnaliticsData[0].BirthDate);
  7.         var currentDate = new Date();
  8.         if (currentDate.getMonth() === userBirthDate.getMonth()) {
  9.             window.sessionStorage.setItem('showUserBirthdayCampaign', true);
  10.         } else {
  11.             window.sessionStorage.setItem('showUserBirthdayCampaign', false);
  12.         }
  13.     }
  14. })();
  15. </script>
  16.  
RAW Paste Data Copied