How to track YouTube video plays on your website using GTM?

How to track YouTube video plays on your website using GTM?

YouTube is one of the most popular video sharing platforms widely used as embedments in websites. In October 2017, Google Tag Manager introduced built-in video metric tracking for YouTube videos making the marketers’ job much simpler. In this blog, we will take you through all the steps required to track YouTube video plays on your website using GTM. Let’s get started! Step 1: Creation of YouTube Video Trigger  The first step is to select a trigger type. In Google Tag Manager, go to Triggers > New > Trigger Configuration and choose ‘YouTube Video’ as shown below. In Trigger Configuration, you can check the boxes as per your tracking requirement. We recommend you to track Start, Complete and Progress. But for the purpose of this blog, we will cover tracking the number of visitors who started or finished watching the videos. Here, we check the boxes ‘Start’ and ‘Complete’. Keep the advanced setting Add JavaScript API support to all Youtube videos on by default.  You have an option to fire this trigger either on all videos or videos with some specific conditions that you can define after selecting the ‘Some Videos’ option shown in the image above. Step 2. Enable built-in video variables In Google Tag Manager, go to Variables > Configure and enable all video-related variables as shown below. Step 3: Adding the Google Analytics Tag Now, we will send this valuable data over to Google Analytics. In GTM, go to Tags > New > Google Analytics: Universal Analytics and fill in the following settings. You can enter names or variables suitable to your requirements in the Category, Action, Label and Value fields. We recommend using Event Action as {{Video Status}} so that you know the status of video, in this case, ‘start’ and ‘complete’.  Keep the Non-Interaction hit as ‘false’ which means that you want this to be counted as an interaction event in Google Analytics. Learn more about Non -Interaction events here. Select your UA Tracking ID from the Google Analytics Settings field.  Assign this to the YouTube Video event trigger that we created in the beginning. Step 4: Testing The last but certainly not the least part is to test the entire setup before going live. We will enter the ‘Preview and Debug mode’ and start interacting with the video after having refreshed the page with the embedded YouTube video player. If you want to learn how to use ‘Preview and Debug mode’ for testing, click here. Once you have started the video, make sure that your GA Video Tag is firing as shown in the debug console window at the bottom of your browser. All YouTube video events appear in the left portion of the debug console window. When you click on the event, you can see all the video variables that you configured in the beginning. (Refer to the image below) You can check the real time reporting of this event in Google Analytics. Go to Google Analytics > Reports> Real Time> Events. You should see all the relevant variables that you entered while creating the tag. (Refer to the images below) If there are no issues, go ahead and publish the tag! You are now officially tracking the Youtube videos embedded on your site. Happy Tracking!

How to Test Google Tag Manager [Preview Mode]

How To Test Google Tag Manager

It is very important to test Google Tag Manager before you publish the tags and triggers to your website to ensure that they are fired correctly. The purpose of the article is to provide you directions to check that correct tags are fired at the right time, hence fulfilling the purpose they were installed for. If case you have not installed google tag manager to your website, learn how to do that for your wix website. Steps to test Google Tag Manager: Google tag manager offers usage of ‘Preview mode’ and ‘Debug console window’ to check which tags are fired and/or not fired on which particular page. To enter ‘Preview & Debug,’ click the ‘Preview’ button appearing in the upper right corner of the GTM dashboard. An orange banner notifying that you are now in “Preview” mode will appear. Next, navigate to the site where tags are installed in GTM and you will see a debug console window at the bottom of your browser. If you already have your site opened in another tab, refresh the page and a debug console window as shown in the image below will appear. The debug console shows detailed information about your tags, including how tags fired and what data is being processed. As you can see in the image above, all tags are getting fired on the page of your website you are viewing. Don’t worry, this is not visible to your site visitors! The console window appears only on the same browser that is used to enable Preview Mode. You have an option to share this preview with your teammates with a custom generated URL. For details on how to share preview with others, click here. Now, if you click any tag that appears below ‘Tags Fired On This Page’, let’s say ‘Google Analytics’ in this case, you will see a page (refer to the image below) showing green ticks besides the tag, firing triggers and filters. If you click any tag that appears below ‘Tags Not Fired On This Page’, you will see a page (refer to the image below) showing red crosses besides the tag, firing triggers and filters. Well, that is how you test Google Tag Manager using Preview mode and Debug Console window. Go ahead and do it for your website now!

Learn how to add Google Tag Manager to a Wix Website

Google Tag Manager to a Wix Website

To add Google Tag Manager to a Wix website is a very simple procedure. Before we start it’s important to know that this feature is only available for paid plans of Wix. So if you want to leverage the tracking tools available within Google tag manager, you need to upgrade your Wix plan to a premium version.  Add Google Tag Manager to a Wix Website by doing the following steps: Step 1: Go to the official website of google tag manager: https://tagmanager.google.com Step 2: Create an account if you haven’t done it yet. Then after signing in to your Google Tag Manager account, copy the container ID from the accounts page.  Or copy the ID from your Google Tag Manager dashboard after selecting your account. Step 3: Now go to your Wix website dashboard and select ‘Marketing tools’ tab. Under Marketing tools, click the tab named ‘Marketing Integrations’ and select ‘Google Tag Manager’. Step 4: Go to google tag manager and click ‘Connect Google Tag Manager’ at the top right.  Step 5: Enter your Google Tag Manager container ID that you copied earlier and click ‘Save’.  Congratulations, you have successfully added Google Tag Manager to a Wix website. This is how simple adding GTM to a wix website really is. Within this, you have an option to add various tags and triggers offered by Google Tag Manager for your website and leverage them to achieve your goal.  Learn how to add Google Analytics to a WordPress website here.