How to Add Google Analytics to Your Hashnode Blog
Tags: analytics, hashnode
Published: 2022-01-18 20:03:25

---
title: How to Add Google Analytics to Your Hashnode Blog
published: true
date: 2022-01-18 20:00:05 UTC
tags: #analytics #hashnode
canonical_url: https://blog.seancoughlin.me/how-to-add-google-analytics-to-your-hashnode-blog
---

## Background

Every blogger wants to know how their work is being received by the community. However, understanding your readers can be like staring into the void. [Google Analytics](https://analytics.google.com) is the light that you might be looking for.

Google Analytics offers a plethora of detail about your readers. The core features entail measuring the number of site visitors, sessions, and duration spent on the site. Best of all, it's totally free :).

Google offers an [academy](https://analytics.google.com/analytics/academy/) for those interested in learning more about the features.

![Google Analytics logo](https://cdn.hashnode.com/res/hashnode/image/upload/v1642535746565/Yib34ks9Y.png)

## Tutorial

1. To add [Google Analytics](https://analytics.google.com) to your Hashnode blog, open [Google Analytics](https://analytics.google.com) and login using a Gmail account. 
2. First you will have to go through account setup. The account name can be anything you like and you can track multiple sites with one account. ![Account setup on Google Analytics](https://cdn.hashnode.com/res/hashnode/image/upload/v1642460494431/l-mdy5E9S.png)
3. Next you must setup a property. A property is equivalent to a site that you want to track. Enter the title of your website in the _property name_ field.
4. Recently Google has migrated to a newer version, [Google Analytics 4 (GA4)](https://support.google.com/analytics/answer/10089681?hl=en), that is not supported by Hashnode. Hashnode supports the older [Universal Analytics (UA)](https://support.google.com/analytics/answer/2790010?hl=en). The differences are [complex](https://support.google.com/analytics/answer/9964640?hl=en#zippy=%2Cin-this-article), but core functionality is the same. To create a Universal Analytics property click on _show advanced options_ (highlighted with an arrow below). ![Setup your website property in Analytics](https://cdn.hashnode.com/res/hashnode/image/upload/v1642460395440/bRXKAWppI.png)
5. Provide the URL of your blog. Since Hashnode only supports UA, we will only create a UA property. A GA4 property can be [created later](https://support.google.com/analytics/answer/9744165?hl=en) if necessary. ![Creating an UA](https://cdn.hashnode.com/res/hashnode/image/upload/v1642533333223/cEEu5qzrZ.png)
6. Provide some basic information about your site and what you will be using Google Analytics for. ![About your business section on Analytics](https://cdn.hashnode.com/res/hashnode/image/upload/v1642533496006/K7baysqtU.png)
7. After clicking _create_ a Universal ID will be generated. It will be a number starting with _UA_. Copy this number and open your blog's dashboard on [Hashnode](https://hashnode.com). ![UA ID created after clicking create](https://cdn.hashnode.com/res/hashnode/image/upload/v1642533687040/nbIqnBSJF.png)
8. Click on the integrations tab. Enter the Universal Analytics ID provided by Google Analytics. After entering the Universal Analytics ID click _update_ at the bottom of the page. ![Hashnode field to enter Analytics ID](https://cdn.hashnode.com/res/hashnode/image/upload/v1642460214852/v6YR9rNRg.png)
9. Now you can open Google Analytics and you will begin to see blog traffic data appearing as users visit your site.

![Screenshot of Google Analytics data](https://cdn.hashnode.com/res/hashnode/image/upload/v1642460576202/HFo5mCzQo.png)

That's it! Sit back and enjoy all the glorious new data.