Install Google Analytics On Your Hashnode Blog
Do you have a blog or a static website? If the answer is yes, whether they are for personal or business use, you need Google Analytics. In this article, we're going to look at Google Analytics from the absolute beginner's perspective. Why you need it, how to get it, and how to install it on your website.
What is Google Analytics? 🤦♂️
Google Analytics is a free web analytics tool offered by Google to help you analyze your website traffic.
Google Analytics allows you to track and understand your customer’s behavior, user experience, online content, device functionality, and more. Google Analytics allows you the information needed to help you shape your business's success strategy, discovering things you probably never knew about visitors to your site. That's why over 50 million websites around the world use Google Analytics.
Why you need Google Analytics? 🤷
If you have a website, you should be using Google Analytics. There are no exceptions here – it’s a useful and important tool for every website owner.
Here are just a few of the many questions about your website that you can answer using Google Analytics.
- How many people visit my website?
- Where do my visitors from?
- What websites send traffic to my website?
- Which pages on my website are the most popular?
- What marketing tactics drive the most traffics to my website?
There are many additional questions that Google Analytics can answer, but those are the most important for any website owners.
How does Google Analytics Work? 🤔
Google Analytics puts several lines of tracking code into the code of your website. The code records your users' various activities when they visit your website, along with the attributes of those users. Then it sends all the information on the Google Analytics server once the user exits your website.
Google Analytics collected data from your website in multiple ways, mainly by four levels:
User Level: related actions by each user
Session Level: each visit
Pageview Level: each page visit
Event Level: button clicks, video views, subscription, etc
How to install Google Analytics ⚙️
At first, you need a Google account for other services like Gmail, Google Drive, etc. If you don't have one, then you will need to create a new one.
⛔Don't let anyone like your web designer, web developer, web host, or SEO person create your website's Google Analytics account under their own Google account so that they can "manage" it for you. If you do, they part ways, they will take your Google Analytics data with them, and you will have to start all over.
Set up your account
Once you have a google account, you can go to Google Analytics and click the Sign into Google Analytics button. You will be greeted with the Google Analytics home page.
Fig: Homepage of Google Analytics
After you click the Sign-Up button, you will fill out information for your website. We're going to assume you have one website and only need one view.
In the account setup section, you will find an option to give your account name. You can give your website name.
Fig: Add account name
Beneath this, you will have the option to configure where your Google Analytics data can be shared.
Here you need to add a property name. The property represents a business's data. In the reporting section, select your time zone and currency based on the country.
Fig: Add property details
Below, you can find an option named "
Show advance options" and pressed it.
Fig: Create a universal analytics property
It will give a new option to create a universal analytics property. Here, you need to add your website URL and select the second option named "
Create a Universal Analytics property only." This option will give you only Universal Analytic ID's.
Add Business Information
In this section, you need to tell select the industry category for your website. For example, if your website shares information about jobs or education, select Jobs & Education. Tell me about your business size and what kind of information you are seeking.
Fig: Add Business Information
After adding all the information the hit the create button, and it will pop-up the term and agreement page, select term and condition based on your country, and hit the next button.
Fig: Term and condition option
You are almost done with creating Google Analytics Account. After creating an account, it will redirect you to the Tracking Code page. If it doesn't redirect automatically, click the left setting button and then select the Tracking Info option. Here you will find your Google Analytics Tracking ID.
🚫 Never share your tracking ID with anyone.
Fig: Copy Tracking ID
Your universal tracking ID starts with
UA. Here is an example Tracking ID.
Tracking ID: UA-54546992-1
Copy Your tracking ID and Go to your Blog website.
Installing your tracking code 💾
Once you are finished, you need to install it on every page of your website. Here, go to your hashnode blog, then select the Dashboard. On the dashboard, you will see an option name
INTEGRATION; select this option. You will find a page like this below.
Fig: Adding Google Analytics Tracking ID
You will see a dedicated option to enter your tracking ID. Simple paste your tracking ID and save the change. It will automatically add this tracking ID to all webpages. Also, it will start tracking your information.
Congratulation! 🎉🎊 You have successfully set up Google Analytics on your blog.
Facing Problem or other info 😲
If you face any problem or want to ask questions or suggestions, you can join the Hashnode Exclusive Discord server and chat with them.
🚩👉 If it was useful to you, please Like/Share to reach others as well. Please hit the Subscribe button at the top of the page to get an email notification on my latest posts.
I talk about web development and UI design on Twitter @kmhmubin, come to talk with me there!
The cover image is an improvisation on top of the work from Canva.