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.
We will create a conatiner for our website and go inside it to add tags.
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,
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.
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.