Advertisement
lopezpagan

SIZMEK: clickTag.txt

Jun 19th, 2018
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // In Google Web Designer:
  2.  
  3. // Create a tap element.
  4. // Assign Id.
  5.  
  6. // Element Id: sizmek_clickthrough
  7. // Click Action: EB.clickthrough();
  8.  
  9. //Sizmek script
  10. <script type="text/javascript" src="https://secure-ds.serving-sys.com/BurstingScript/EBLoader.js"></script>
  11.  
  12. <script>
  13. /* Sizmek Code General Banners */
  14.  
  15. // Function called by the clickTag
  16. function goScript(e) {
  17.   console.log('Clicked!');
  18.   EB.clickthrough();
  19. }
  20. // Initialization
  21. function checkInit() {
  22.   if (!EB.isInitialized()) {
  23.     EB.addEventListener(EBG.EventName.EB_INITIALIZED, onInit);
  24.   }
  25. }
  26.  
  27. //Global clickTag Listener
  28. document.getElementById('clickTag').addEventListener('click', goScript);
  29.  
  30. // Initialized code
  31. window.addEventListener('WebComponentsReady', checkInit, false);
  32.  
  33. </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement