Google is not only the monopoly in search engine world. Many other areas on the web are also dominated by Google’s product. Website traffic analysis is one such area that Google dominates with the Google Analytics tracking. Basically you should get a tracking code from Google and insert the head section on each page your site. You can manage all the traffic data from your site in one central Analytics account once the tracking code is added successfully. Almost all bloggers and webmasters use Google Analytics on their site to track the performance of their sites. In this article let us discuss the very basic information on how to create Google Analytics tracking code for your site.
Before starting ensure to have following two things as a requirement:
- Google account
- Root access to your website or your site has provision to enter the tracking code
Create Google Analytics Tracking Code
Create New Analytics Account
Go to Google Analytics website and login using your account credentials. Once logged in navigate to the “Admin” section shown as the last option in the left sidebar.
The admin section will show all existing accounts, properties and views. Click on the dropdown box under “Account” section and then click on the “Create new account” option.
You can create up to 100 Analytics tracking accounts under one Google account.
Fill Website Details
You will see a form to fill all details related to your website or mobile app. Select “Website” tab and fill all relevant details like account name, website name, site address, category and timezone. Remember to fill your site address with “https” if you have SSL certificate installed on your site.
Once all required details are filled in the form, click on the “Get Tracking ID” button. Accept the terms of service for using Google Analytics on your site.
Viewing Tracking Code
After accepting the terms, Google will show you the tracking ID along with options to implement on your site. You can check the tracking ID anytime by navigating to “Admin > Select account from dropdown > Select Property > Tracking Info > Tracking Code” section. Remember, the property and view are automatically created for your Analytics account. You can also manually create additional properties under the same account for tracking subdomain and directories on your main site.
Google uses the account name provided as the property name and “All Website Data” as view name by default. You can modify these names under “Property Settings” and “View Settings” respectively.
Installing Google Analytics Traffic Code
Almost all content managements has an option to insert the tracking ID on the head section of your site. Basically you only need to add the ID like “UA-1108xxxxx-1” in most cases like WordPress plugins. In some cases like Weebly or Bootstrap sites, you should copy the complete “Global Site Tag” code and insert on the head section of your pages.
It should look something like below on the source code of your webpage.
<html> <head> <title>Page Title</title> Insert Analytics Tracking Code here </head> <body> Here is the content of your site. </body> </html>
Testing Tracking Code
Google Analytics offers an easy way to test whether the tracking code is properly installed on your site. Under “Tracking Code” section, you will see a button named as “Send test traffic”.
Click on the “Send test traffic” button. This will open your website address provided during account creation. If you have properly installed the Analytics tracking code on the same website, then you will see the status as 1 active user.
This is an indication that you have successfully installed Google Analytics tracking code on your site.
Points to Remember
- Ensure to add the Google Analytics tracking code on the same site address you have provided during account creation.
- Analytics accounts are not transferrable like Google AdSense where the same ad code will work on all site. You should get different tracking code for each site.
- Google Analytics works in three tier model – Account > Properties > Reporting Views.
- You can create maximum of 100 accounts, each account can have 50 properties and each property can have 25 reporting views.
- the account tracking ID will have an extension of – 1.
- Properties are generally used to create different tracking code for subdomains and subdirectories of the main site. The property tracking code will have the extensions -2, -3 and so on.
- Reporting views are used to create reports with different filtering criteria.
- If the Analytics code is not working between <head>…</head> section, insert the code right after <body> tag and test.
- Beside global site tag or gtag.js method, there are other implementation methods like Google tag manager, PHP page insertion, etc.
- Ensure to insert the tracking code in each individual page of your site.