Click on the icon to further … This data powers vendor solutions like Google Analytics and can be a point of departure for data-driven initiatives. The Data Layer snippet looks like this: The code (between tags) is our static Data Layer information. This data can be about the page itself, events on the page or about user interacting with the page. I already implemented the GTM container and the image tag, and created the google ads remarketing and conversion tags in it, without publishing. Once you place the GTM container’s JavaScript Snippet in your website’s source code and a visitor lands on your site, Data Layer is automatically initiated by Google Tag Manager’s snippet. Renaming the Data Layer — Under certain circumstances, you may want to alter the name of the Data Layer. Click Save changes button at the bottom of the screen. The best way to check if custom dimensions are properly passed is to use GA Debugger Chrome Extension. This virtual layer uses a JavaScript object or another piece of code to collect and send various data points when a user meets the conditions you set. Go to Tags and click New: Enter the name for the tag – GA pageview (actually, you can name it whatever you want). You can use the developer tools to understand if there is a problem with Google Tag Manager. Optimize 360. It can enhance your goals, conversions, and reporting in ways you only wish you could have before. Open Variables > Scroll down to User-defined variables and click New. From this, I was inspired to dive deeper to explain the value of Google Tag Manager for Google Analytics implementation. If the tag has not fired, check whether you have entered the proper event name in the trigger settings. I'll be resuming my intermediate GTM course very soon! Hi Julius, thanks for the awesome article! After that, you’ll need to wait a few hours for Google Analytics to gather your website’s data. With dataLayer variables, there’s an easy way to access nested values. Only then Google Tag Manager can catch it and use it as a triggering condition. That’s it! If you don’t have WP, ask a developer to add additional data points to the Data Layer. I am *not* using any GA tracking snippet (just GTM, with a Google Analytics Tag setup, with the custom variables added as indexed dimensions). Make test opt-ins and check out the goal completions in the Real Time report. In fact, it’s just a half of the code. Step3: Verify Data is Pushing to Data Layer That wraps up the basics of using Google Tag Manager for event tracking. Step 8: Publish your Google Tag Manager container Click the red “publish” button in the top right-hand corner. images, videos, length, title length) lead to the most conversions, longest time on page, etc. Purchased products, their quantity, product IDs, etc. tracking, remarketing, and CRO tags) into webpages. The key deliverable of this little project is a BigQuery view that collects data from your website. We can keep this private, you are free to send the information to julius[at] If you feel that this concept is difficult to master, you’re not alone. You have just created a Google Tag Manager Custom Event Trigger. Use Google Tag Manager Preview and Debug Console. If we see the above figure, the variable event holds the gtm.dom. Get fast, reliable market research from real people. Hey, Data Layer is pageload-based. So if a developer pushes data layer changes to the website, from the next pageload those changes will be applied to the visitors. For example, I might want to tell GTM that the user is accessing my website while vital services are not working and that the user on the current page is not logged in. Unless you employ the Data Layer Variable. Google Tag Manager Is Incognito in a Custom Dimension Using this in reports. 17 Ways To Fix It. To see some examples of what can be tracked in Google Analytics. Tag Manager 360. Additionally, we’ll pass the value of the plan (pricing plan to which a user signed up). function gtag(){dataLayer.push(arguments);} That’s it! After that, you’ll need to wait a few hours for Google Analytics to gather your website’s data. }); If unfortunately, registrationComplete is missing, contact the developer and tell him/her to properly follow your instructions. The product info it pulls is visible in the gtm debug tool. Of course, it takes a while to understand how everything works, but once you get the idea, you’ll start putting puzzle pieces together. If I make changes to tags in my container, what is the affect on users in a current session? For instance, I put the dataLayer.push on an onclick event and ran dataLayer and was able to see this come through. 3 Ways to See Data Stored in the Data Layer Method #1: The Data Layer Tab in GTM Preview Mode. Here’s an example of GTM’s container snippet. “Tags” help marketers to collect insightful data about their website audience and ultimately help webmasters and marketers to better understand and serve their audience. If we see the above figure, the variable event holds the gtm.dom. The entire concept of the event tracking in Google Tag Manager is based on the Data Layer. 200 is an indication that the response is good. And don’t limit yourself only to those two tools. I don't understand the example "using data from the Data Layer in GTM and GA". Enable Preview and Debug mode in Google Tag Manager, #4.4. Google Tag Manager uses the information (stored in the data layer) in two ways: We can achieve the first part with the help of the Data Layer Variable and the 2nd one with triggers. Click Variables and look for pricingPlan. If you can still see data reporting in Google Analytics after you’ve removed the hardcoded tracking codes, then Google Tag Manager is working. Another example – transaction or product data. In this chapter, I will focus on custom event tracking (if you want to learn more about standard event tracking in Google Tag Manager, check these articles for inspiration: click tracking, using history change trigger). Let’s imagine that I have a website and all registered users are split into two groups: I want to segment these users and all their events/pageviews in Google analytics by their pricing plan. You can ask a developer to activate the following code every time a user signs up. Unless you have installed some GTM plugin to your website). From my experience, custom dimensions usually appear within several hours but in Martin's case, it took ~24 hours. For the purpose of reporting ecommerce information to Google Analytics, the data layer tag will work hand in hand with a Google Analytics ecommerce tag. That bucket can contain little ping pong balls, every ball contains some information, e.g. Congratulations! However, if you indeed want to use some custom information, continue reading. After you complete these steps, you will start sending user’s pricing plan name with every Google Analytics hit (pageview, event, etc.). Marketing is getting more and more sophisticated. . Click the Google Tag Manager Tutorials link. The data layer, or data layering, is how Google Tag Manager communicates back and forth with your website. Enter in an account name and click continue. How could I implement this data layer script in this type of implementation dynamically? But currently on the website I have this datalayer, which is related to my google ads global site tag, that is being detected by the GTM platform, while I'm in the preview and debug mode. Surveys 360. 2. Page View) Choose your firing triggers such as All Pages, which the tag will fire the tracker on every page of your website; Gtag.js or Google Tag Manager? before the Dimensions are populated / become active? Let's talk about the nuts and bolts of GTM. UPDATE: Google Tag Manager has updated their debugger, allowing you to see both Names or Values being passed into GTM. What I did: I checked Debug Console Mode. I have a site using the GTM tracking code (and some custom dataLayer variables) but the dimensions in GA are always showing as blank/empty. Granted they are static values, but you get the idea. Manage all your tags in one place for a smarter, simpler way to oversee your marketing. Or maybe it can take the Form ID (of the form that was just submitted) and send it further to GA. Anyone/anything can put those “data balls” in the Data Layer. This is the Data Layer code that must be added above the GTM container: If you’re not comfortable with touching the website’s code, a developer should do that (and in most cases, he/she will, in fact, have to do it. To view purchase data in Google Tag Manager, you would use a data layer along with a specific order of data transmission based on the GTM Data Layer instructions. If the snippet is placed after the GTM container code, Data Layer’s data won’t be fetched by Google Tag Manager. Hi. The data layer is the source of a vast amount of customer interaction data, website-related data and campaign data, which fuels the tag management system. Here, we are going to try and read the event using a data layer variable. When a custom dimension is created, you’ll see a short code snippet. It can help you gain insight into places where users get stuck, or drop out. If you are having major issues with your JavaScript, you can check the Google Developer Documentation for GTM or reinstall the container. Tracking Virtual Pageviews with Google Tag Manager is really easy to implement, and fast to do. The tag assistant uses colors from red to green to highlight the functionality of the tag. Contact me on LinkedIn, How to Check Google Tag Manager is Working, Calculate Totals Month to Date & More in Power BI. Should I have to wait (24 hrs?) That’s from another example. If the tag has indeed fired, head over to your GA Real-time reports > Events. Technically speaking, a Google Tag Manager Data Layer is a JavaScript array that temporarily stores the information you need and then Google Tag Manager uses that data in tag/triggers/variables (later that data can be transferred to other tools, like Google Analytics). Google Tag Manager uses these concepts to handle how tags are configured and fired: Tag: A tag is code that send data to a system such as Google Analytics. Enable the Tag Assistant and refresh your browser. This console window will appear only on your computer as you preview the site, and is not visible to your … Start record click to call data in minutes with this easy guide. It holds information you want to process in an object that can be read by Google Tag Manager, where it then gets pushed to Google Analytics. We’re going to go over to our tags, select our test tag. Google Tag Manager provides a variety of templates for adding tags to the container. Let’s say that you want to send the page category as a custom dimension to Google Analytics. Migrating to Google Tag Manager definitely has its advantages and I highly recommend that you do so. In the Data Layer Variable Name field, enter the key exactly as it was written in the code, e.g. Keep this in mind. Let’s take a look at the example. By default, Google Tag Manager does not care about the pushed events that are happening in the Data Layer (I mean that no tags will be fired unless you specifically instruct GTM to do so). window.dataLayer.push({ Once a developer confirms that the above code is implemented, it’s time for you to check whether that’s true. Results: Able to see custom dimension to be populated with event trigger and page-view in GTM Preview Mode. Create a new goal and enter the following settings: With this kind of setup, whenever an event (with event category “registration complete”) is tracked by GA, it a goal completion will also be counted. In further chapters of this blog post, we’ll take a closer look at what Data Layer in Google Tag Manager, how to configure it (if you need that), how to use in your tag management, etc.). We are going to create a variable from GTM interface and see how it reflects in the Variables tab under Google Tag Manager. Trigger management would be easier that way. This way Tag Manager will recognize the parameter. Considerations for using Google Tag Manager. The Data Layer is a set of information that gets provided by your website to Google Tag Manager every time the two interact. #2.1. Hi Julius, great post on the data layer! Considerations for using Google Tag Manager. Then, we'll examine variables (aka macros). Or you would not recommend it. To use Google Tag Manager with your Shopify Plus online store, you do the following: Have access to the checkout.liquid file. For example, if someone submits a form, a developer can activate the following code: Since the code above contains the event key, this dataLayer.push can be used as a triggering condition in Google Tag Manager. If you could have a mention in the article, it would be great. Inside of GTM, and create a new Data Layer Variable. window.dataLayer = window.dataLayer || []; […] Read more. But by tagging your site and using Google Tag Manager in conjunction with Google Analytics, you’re able to collect much more data than you can otherwise. In this example, I will not go into detail on how to create a tag, I will only demonstrate how to pull the author data from the Data Layer and turn it into a variable (within Google Tag Manager). Click on Console to see if there are any JavaScript errors Once in a while, I see questions online that ask how to create a data layer. 3. Imagine, there are several authors in this blog: I want to find out which authors write the most engaging content and then segment sessions in Google Analytics. The data layer is the source of a vast amount of customer interaction data, website-related data and campaign data, which fuels the tag management system. A Google Tag Manager debug console should appear at the bottom of the screen. A developer has implemented our request and we checked that in the Preview and Debug mode (Data Layer tab), Track type: Event. What is Google Tag Manager? , 3)