How to setup Google Analytics for your website
14th April 2019
What is Google Analytics
Before we setup Google Analytics, let us understand what is Google Analytics and why do you need it.
Google Analytics is a free web analytics tool provided by Google to help you analyze your website traffic. Web data are collected daily and the dashboard will have information such as
- Which pages on your website are the most popular?
- Where do your visitors come from?
- How many people visit your website?
- and so on
Once you have an understanding of these data, you can make a better decision on how to improve your website traffic. (this will be in another article)
How does Google Analytics work?
During the setup process, a set of code is generated, you or your web designer/developer will have to add the code into every page of your website. Every time a user visits your website, the code will be triggered and it will log in Google Analytics. To get more accurate data of the day, check it the next day than using real-time data.
How to setup Google Analytics
If you have a Google account like Gmail, you can easily create a Google Analytics account just by signing in. If you do not have a Google account, simply create one.
Step by step guide to creating your Google Analytic account
- Go to Google Analytics website
- Login using your Gmail account
- After which it will bring you to the Analytics setup page. Click on the “Sign up” button on the right
- Now fill up all the field
– Select Website
– Give a name for this account
– What is the name of your website
– Your website URL
– Select an industry category from the dropdown list
– Select the reporting time zone from the dropdown listScroll down to the bottom and click “Get Tracking ID”
- A pop-up terms of service agreement appear
– Select your country/region
– Check the Data Processing Terms and the Measurement Controller-Controller Data Protection TermsScroll down and click on the “I Accept” button
- Once done, it will redirect you to the admin page of your newly created account.
From there you will see a set of code, copy the code and add it into the header section of every single page of your site.
How and where do you add the code to your website?
Example your html code is as follow, copy the code provided by Google Analytics and add it before the end of the </head> tag.
<title>Title of the document</title>
<!– Global site tag (gtag.js) – Google Analytics –>
<script async src=”https://www.googletagmanager.com/gtag/js?id=UA-142542214-1″></script>
window.dataLayer = window.dataLayer || ;
gtag(‘js’, new Date());
Content of the document……
I hope you now know how to set up your first Google Analytics code to your website. In the next post, I will show you the different dimension and metrics from Google Analytics report and how to read them.