prabapro

[GTM - GA360 Solution Design] Dialog Avurudu Games 2021

Mar 18th, 2021 (edited)
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // 1. GTM Snippets
  2.  
  3. <!-- Google Tag Manager -->
  4. <script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
  5. new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
  6. j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
  7. 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
  8. })(window,document,'script','dataLayer','GTM-K8HZBPD');</script>
  9. <!-- End Google Tag Manager -->
  10.  
  11. <!-- Google Tag Manager (noscript) -->
  12. <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-K8HZBPD"
  13. height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
  14. <!-- End Google Tag Manager (noscript) -->
  15.  
  16.    
  17. // 3.1. Submit OTP    
  18. dataLayer.push({
  19.     "event": "submitOtp",
  20.     "status": "success"     //or failed
  21. });
  22.  
  23. // 3.2. Game Selection
  24. dataLayer.push({
  25.     "event": "selectGame",
  26.     "game": "kavili catcher" //name of the game
  27. });
  28.  
  29. // 3.3. Carousel Banner Clicks
  30. dataLayer.push({
  31.     "event": "carouselBannerClick",
  32.     "game": "kavili catcher",
  33.     "bannerNumber": "2",       //Position of the banner - string or number
  34.     "bannerOffer": "hbb"       //Type of the offer the banner represents
  35. });
  36.  
  37. // 3.4. Start the Game
  38. dataLayer.push({
  39.     "event": "startPlay",
  40.     "game": "kavili catcher"
  41. });
  42.  
  43. // 3.5. Game Over
  44. dataLayer.push({
  45.     "event": "gameOver",
  46.     "game": "kavili catcher",
  47.     "score": "123" //either string or number
  48. });
  49.  
  50. // 3.6. User Log Out
  51. dataLayer.push({
  52.     "event": "logout",
  53.     "status": "success" //or failed
  54. });
Add Comment
Please, Sign In to add comment