1 2 Beginners Guide to Google Tag Manager Written by Himanshu Sharma, Founder o

1 2 Beginners Guide to Google Tag Manager Written by Himanshu Sharma, Founder of OptimizeSmart.com © Copyright 2019 Optimize Smart.com. All rights reserved. No part of this publication can be reproduced or transmitted in any form or by any means, mechanical or electronic including photocopying and recording or by any information storage and retrieval system, without permission in writing from the author (except by a reviewer, who may quote brief passages and/or show brief video clips in a review). Disclaimer: Great efforts have been made to ensure the accuracy, timeliness and completeness of the contents (written text, graphics) provided in this book. However, neither the author nor OptimizeSmart.com make any guarantee /warranty of accuracy, timeliness and completeness of the information provided in this book or any website this book link out to. No warranty/guarantee may be created or extended by sales representative or written sales materials. Similarly, neither author nor OptimizeSmart.com make any guarantee/warranty that the websites linked to this book are free from viruses, adware or other malicious programs. Websites listed in this book may have changed or disappeared between when this book was written and when it is read. Neither the author nor OptimizeSmart.com will be liable for any losses or damages (including but not limited to: commercial, special, incidental, consequential damages) arising from the use of the contents in this book. This book is for information purpose only. The advice and strategies contained herein may not be suitable for every situation. If professional assistance is required, the services of a competent consultant/agency should be sought. The fact that an organization or website is referred to in this book, as a citation and/or potential source of further information does not mean that the author or OptimizeSmart.com endorses the information the organization or website may provide and/or recommendations it may make. 3 About the author Himanshu Sharma is a digital marketing consultant and founder of OptimizeSmart.com. He specializes in attribution modelling, fixing website tracking issues and helping businesses to better understand their analytics data. He has over 12 years’ experience in web analytics and digital marketing. He was nominated for the Digital Analytics Association’s Award for Excellence. The Digital Analytics Association is a world-renowned, not-for-profit association which helps organizations overcome the challenges of data acquisition and application. Himanshu is also the author of three best-selling books on analytics and conversion optimization:  Maths and Stats for Web Analytics and Conversion Optimization  Master the Essentials of Email Marketing Analytics  Attribution Modelling in Google Analytics and Beyond  Attribution Modelling in Google Ads and Facebook In addition to these books, he has published more than half a dozen ebooks on Google Analytics and Google Tag Manager, which are available on optimizesmart.com. Himanshu run one of the world most popular blogs on Google Analytics. He also provides web analytics training and has currently got more than 800 students. 4 Introduction to Google Tag Manager Google Tag Manager (also known as GTM) is a free tag management solution provided by Google. Through this 'online tool', you can deploy and manage various marketing and analytics tags on a website or mobile app. Introduction to Tags A tag is a bunch of JavaScript code which is used to collect measurement and marketing data from your website/mobile app and then send that data to 3rd party services. The third party service could be: Google Analytics, Google Adwords, Twitter, Facebook, Comscore etc. Following is an example of Google Analytics Tag (also known as Google Analytics Tracking code): <!-- Google Analytics --> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function() { (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore( a,m) 5 })(window,document,'script','//www.google- analytics.com/analytics.js','ga'); ga('create', 'UA-XXXX-Y', 'auto'); ga('send', 'pageview'); </script> <!-- End Google Analytics --> Following is an example of Google Adwords Conversion Tracking Tag (also known as Google Adwords Conversion Tracking code): <!-- Google Code for Test Conversion Page --> <script type="text/javascript"> /* <![CDATA[ */ var google_conversion_id = 928804124; var google_conversion_language = "en"; var google_conversion_format = "3"; var google_conversion_color = "ffffff"; var google_conversion_label = "wceHCILzjGQQ7drxugM"; var google_conversion_value = 100.00; var google_conversion_currency = "GBP"; var google_remarketing_only = false; /* ]]> */ </script> <script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js"> </script> <noscript> <div style="display:inline;"> <img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/928804124/?value=100.00&a mp;currency_code=GBP&label=wceHCILzjGQQ7drxugM&guid=ON&script=0 "/> </div> </noscript> Following is an example of Facebook Tag (also known as Facebook Pixel Code): 6 <!-- Facebook Pixel Code --> <script> !function(f,b,e,v,n,t,s){if(f.fbq)return;n=f.fbq=function(){n.callMethod? n.callMethod.apply(n,arguments):n.queue.push(arguments)};if(!f._fbq)f._fbq= n; n.push=n;n.loaded=!0;n.version='2.0';n.queue=[];t=b.createElement(e);t.asyn c=!0; t.src=v;s=b.getElementsByTagName(e)[0];s.parentNode.insertBefore(t,s)}(wind ow, document,'script','//connect.facebook.net/en_US/fbevents.js'); fbq('init', '879030082151151'); fbq('track', "PageView");</script> <noscript><img height="1" width="1" style="display:none" src="https://www.facebook.com/tr?id=879030082151151&ev=PageView&noscript=1" /></noscript> <!-- End Facebook Pixel Code --> Other examples of tags are: ● Kissmetrics tracking code ● Phone call tracking code etc. So you see, that tag is just a snippet of code. You can add this snippet of code (or tag) directly to your website, by copying-pasting it, in your website template files (like header.php) or you can add the tag indirectly on your website, via Google Tag Manager (GTM). Advantage of adding the tags via Google Tag Manager What is the advantage of adding the tags to your website via GTM, when you can simply, directly place them on the website? The advantage is, when you use GTM to add tags on a website, you get more control over: 7 1. When the tag should fire. 2. When the tag should not fire. 3. Where the tag should fire. 4. Where the tag should not fire and 5. What the tag should do, when it get fired (executed) In addition to this, via GTM, you can very easily: add, remove, enable or disable any tag on your website. You can very easily change the functionality of almost any tag. If you are not using Google Tag Manager, then you need to, manually add or remove the tags from one or many website template files, and you won’t be able to enable or disable these tags. To disable a tag, you have to remove it from the template files. To enable the tag, you have to add the tag back in your template files. This is a lot of work (code changes) esp. if your website is big and use several tags. Similarly, if you want to change the functionality of a tag, you have to first manually find the template file(s) where the tag is installed and then edit the tag code. If you are using same tag in several different template files, you may miss to update the tag in some of the template files which can result in data discrepancies. So when you do not use Google Tag Manager to deploy and manage tags, then your web developer/ IT has to work extra hard to maintain various tags on your website. This increases your website maintenance cost. So by not using Google Tag Manager, you end up spending more time and money on tag deployment and management. That is why you should use Google Tag Manager. And above all, GTM is free to use. There is no monthly or yearly fees. So there is really, no excuse, for not using GTM. Key Benefits of using Google Tag Manager 8 Following are the key benefits of using Google Tag Manager: #1 GTM removes the need for editing the website code over and over again just for adding, removing or editing tags. Instead, one code is placed on every page on the website, which is the GTM container code. This container code literally acts as a container, as it can store and deploy several marketing and analytics tags. Through GTM user interface, you can: add, edit, enable, disable or remove any tag, with just few button clicks. No need to hard code the website over and over again just for deploying and maintaining various tags. #2 Through GTM you can test and deploy tags very fast without hardcoding the tags each and every time on your website. If you want to adapt rapidly and cost efficiently in response to changes in marketing conditions, search engine and social media landscape and competitive landscape then you need to move fast. You can’t afford to spend weeks or even months, just to add bunch of tags on your website, because your IT team is too busy updating the product catalogues. A common problem for most online businesses owners/marketers is, over dependence on web developers for any task related to website code which makes them very slow, when it comes to adopting anything agile or lean (agile analytics, agile marketing, lean startup etc). With GTM installed on the website, tags can be: added, edited, tested or removed in a matter of minutes. That means you can move quickly. For example, if you want to add survey on your website, say for just one day, just add and publish the survey tag to the website via GTM. Once the day is over, disable the tag. That's it. No heavy coding, no booking the time with IT, no direct changes to the website code. 9 #3 GTM makes advanced tracking possible – The biggest advantage of using GTM is that, it makes advanced analytics tracking possible for your website. GTM provides many in-built tags and variables uploads/Litterature/ guide-to-gtm.pdf

  • 25
  • 0
  • 0
Afficher les détails des licences
Licence et utilisation
Gratuit pour un usage personnel Attribution requise
Partager