Get the Only Ebook on GTM Data Layer Ever Publish. Learn the JavaScript Behind it.
Google Tag Manager  Data Layers
Get the 80 page ebook:
Google Tag Manager 
Data Layers
By Himanshu Sharma
Founder of 
WHAT'S INSIDE:  My Step-By-Step Blueprint (80 Pages) For Getting Started With Data Layers. Discover What You Need To Know About GTM Data Layers.
Why Do you Need This Book? 
GTM is a really powerful tool and understanding the data layer is the key to getting the most out of Google Tag Manager.

What is so different about this book is that, firstly it is only the book on data layer ever published. Second it actually teaches you the JavaScript required to create a data layer.

All other resources on data layers assume that you already know JavaScript or they simply tell you to figure it out on your own. But you really cannot create, use or even understand data layers, if you do not understand the JavaScript behind it.
Table of Contents
  • #1 Why JavaScript?
  • ​#2 Role of JavaScript in a Web Document 
  • ​#3 How to add JavaScript to a Web Document 
  • ​#4 Introduction to JavaScript statements 
  • ​#5 Order of execution of JavaScript Statements 
  • ​#6 JavaScript and White Spaces 
  • ​#7 Introduction to Comments in JavaScript 
  • ​#8 Introduction to JavaScript Variables 
  • ​#9 The Assignment Operator
  • ​#10 How to use the value of a JavaScript Variable 
  • ​#11 Rules for naming JavaScript Variables 
  • ​#12 Best practices for creating variable names in JavaScript 
  • ​#13 Introduction to JavaScript Keywords 
  • ​#14 Data Types in JavaScript 
  • ​#15 Strings in JavaScript 
  • ​#16 Introduction to Data Layer 
  • ​#17 Advantage of using a Data Layer 
  • ​#18 Data layer vs DOM scraping 
  • ​#19 Introduction to Arrays in JavaScript 
  • ​#20 How to create an Array Variable 
  • ​#21 Introduction to Objects in JavaScript 
  • ​#22 Introduction to Data Layer Variables 
  • ​#23 Initializing a Data Layer Variable 
  • ​#24 How to push information into a Data Layer 
  • ​#25 Overwriting the value of data layer variable 
  • ​#26 Dynamic data layer variables 
  • ​#27 Introduction to 'event' data layer variable 
  • ​#28 Guidelines for naming data layer variables 
  • ​#29 Renaming a data layer 
  • ​#30 Introduction to Universal data layer 
  • ​#31 gtm.js, gtm.dom and gtm.load events 
  • ​#32 How to inspect the data layer on a web page 
  • ​#33 Data Layer Variable in Google Tag Manager 
  • ​#34 Data Layers FAQ
About the Author 
Himanshu Sharma is the founder of Optimize Smart, a digital marketing consultancy based in the UK.

With over 12 years’ experience in web analytics and digital marketing, he specialises in helping businesses to better understand their analytics data, as well as fixing their website tracking issues.

Himanshu is the author of four best-selling books on conversion optimization, attribution modelling and email marketing analytics, which are available on Amazon:
Himanshu Sharma
Copyright © 2019-