Advertisement
NikolayBezay

Sodastream.de show Gass campaigns GTM teg.

Aug 20th, 2021
233
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 3.43 KB | None | 0 0
  1. <script>
  2. (function() {
  3.     function checkCampaignsAudience() {
  4.         var showGassPinkUpsellCart = false;
  5.         if (document.querySelector('#cartForm a[href*="variant=39436783616079"]') ||
  6.             document.querySelector('#cartForm a[href*="variant=39436782207055"]') ||
  7.             document.querySelector('#cartForm a[href*="variant=32906410623055"]') ||
  8.             document.querySelector('#cartForm a[href*="variant=32906410655823"]')) {
  9.             showGassPinkUpsellCart = true;
  10.         }
  11.         if (document.querySelector('#cartForm a[href*="variant=39276166119503"]')) {
  12.             showGassPinkUpsellCart = false;
  13.         }
  14.         window.localStorage.setItem('showGassPinkUpsellCart', showGassPinkUpsellCart);
  15.  
  16.         var showGassBlueUpsellCart = false;
  17.         if (document.querySelector('#cartForm a[href*="crystal-2-0?variant=32349247897679"]') ||
  18.             document.querySelector('#cartForm a[href*="crystal-2-0?variant=32349266870351"]') ||
  19.             document.querySelector('#cartForm a[href*="crystal-2-0?variant=32319202820175"]') ||
  20.             document.querySelector('#cartForm a[href*="crystal-2-0?variant=32319202885711"]') ||
  21.             document.querySelector('#cartForm a[href*="easy?variant=32349312155727"]') ||
  22.             document.querySelector('#cartForm a[href*="easy?variant=32349302947919"]') ||
  23.             document.querySelector('#cartForm a[href*="easy?variant=32319203180623"]') ||
  24.             document.querySelector('#cartForm a[href*="easy?variant=32319203147855"]') ||
  25.             document.querySelector('#cartForm a[href*="one-touch"]')) {
  26.                 showGassBlueUpsellCart = true;
  27.         }
  28.         if (document.querySelector('#cartForm a[href*="reservezylinder?variant=39276165038159"]')) {
  29.             showGassBlueUpsellCart = false;
  30.         }
  31.         window.localStorage.setItem('showGassBlueUpsellCart', showGassBlueUpsellCart);
  32.  
  33.         var showGassForAllUpsellCart = true;
  34.         if (document.querySelector('#cartForm a[href*="crystal-2-0?variant=32349247897679"]') ||
  35.             document.querySelector('#cartForm a[href*="crystal-2-0?variant=32349266870351"]') ||
  36.             document.querySelector('#cartForm a[href*="crystal-2-0?variant=32319202820175"]') ||
  37.             document.querySelector('#cartForm a[href*="crystal-2-0?variant=32319202885711"]') ||
  38.             document.querySelector('#cartForm a[href*="easy?variant=32349312155727"]') ||
  39.             document.querySelector('#cartForm a[href*="easy?variant=32349302947919"]') ||
  40.             document.querySelector('#cartForm a[href*="easy?variant=32319203180623"]') ||
  41.             document.querySelector('#cartForm a[href*="easy?variant=32319203147855"]') ||
  42.             document.querySelector('#cartForm a[href*="one-touch"]') ||
  43.             document.querySelector('#cartForm a[href*="variant=39436783616079"]') ||
  44.             document.querySelector('#cartForm a[href*="variant=39436782207055"]') ||
  45.             document.querySelector('#cartForm a[href*="variant=32906410623055"]') ||
  46.             document.querySelector('#cartForm a[href*="variant=32906410655823"]')) {
  47.                 showGassForAllUpsellCart = false;
  48.         }
  49.         window.localStorage.setItem('showGassForAllUpsellCart', showGassForAllUpsellCart);
  50.     }
  51.  
  52.     if (document.readyState === 'loading') {
  53.         document.addEventListener('DOMContentLoaded', checkCampaignsAudience);
  54.     } else {
  55.         checkCampaignsAudience();
  56.     }    
  57. })();    
  58. </script>
  59.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement