Before we start, let me tell you what are tags and why these are so important for any kind of online business or E-commerce websites. Tags are some kind of javascript snippets or custom html tags which gather information about website users. The information gathered through these tags can be used to analysis users behaviours like their pattern of browsing the website. These user data or information are used by marketers for remarketing. You can show adds in different google platforms to your website viewers who have visited your site but not purchased.
How these tags work?
Tags are fired using triggers in response to some events. Events are certain website actions like page loading, clicking a button, making final payment or subscribing newsletters etc. Triggers are kind of variable which decides which tags to fire in response to the events. Triggers are basically made up of three components variables, operators and values. Operators compares variables with the values, if match occurs tags are fired.
Now, we start to install Google tag manager and after it we will add Google universal analytics tag to the website so that we can see what traffic going into our websites.
To manage tags for a website we need to create a container in the tag manager account. Container holds all tags, triggers, variables etc for any websites together at one place. We need to create container on a per domain basis. That is separate websites are kept on separate container.
Step 1:
We will create a conatiner for our website and go inside it to add tags.
Step 2:
When you go inside the container for the first time, you will see some javascript snippets like shown below. You need to add these snippets to each and every of page of the website which you want to track for website views. You will find two snippets, add the first snippet to head section of the page and second snippet to the start of the body section.Step 3:
Now, click on New tag and start adding tags.Step 4:
A new window will appear as shown below. In the Tag configuration section, click edit and select Google Analytics: Universal Analytics as shown below. Here, you will see multiple tags but we select the first one because we want to track daily site visitors only.Step 5:
Next you will find Google analytics settings field. In the dropdown menu we select New variable. A variable configuration window will appear, which is shown below. Copy your Google Analytics Tracking ID from Google analytics and paste here. Select a variable name and save.Step 6:
Now, go to Triggering section, click edit, a new window will appear which is shown below. Select All pages view.Step 7:
Now, choose a tag name and save it as shown below.In the workspace, you can see the chnages done by you.
Step 8:
In order to enter into tag manager preview mode, you must have installed Google Tag assistant extension in the browser. After you installed the extension, Click on the Preview and it will take you the debug mode for the url that you will enter. You will find the preview button in upper right corner of the container window. A new tag assistant window will open, all the activity that you do on the webiste page can be previewed here in the Tag assistant window.Step 9:
Select a url which you want to be in debug mode.Step 10:
After entering the url, click start, a connection will be established between your website page and tag assistant. And all the debug information from the connected window will appear in the tag assistant wiondow.Step 11:
If you get the connected message as shown above, you have done it successfully. Now monitor the tag assistant window for debug information as shown below. You can see there are three page view hits.Step 12:
After everything works fine, publish the container. Now you will be able to see all the traffics that go into your website in Google Analytics.