How to add Google Analytics to Notion: Possible or not?

·

·

If you have your own website, the chances that you already use Google Analytics in it are super high. Notion has spread like wildfire over the last few years and people use it for all sorts of things. Companies started using it as their Help Article database, freelancers use it to publish their entire portfolios, some team run their entire project management on Notion. For each of those use-case it might be really insightful to have detailed Analytics. Notion already has its own analytics tool, but it may not provide all the insights you need. Consider a company using Notion for its help article database; understanding which articles are most accessed can be a game-changer. Additional information like where the users are from and how much time they spend on a given Notion page can add additional value. So let’s explore how we can get those insights, by trying to add Google Analytics to a Notion page. The steps provided here are for Google Analytics but can easily be also used to directly integrate Google Tag Manager.

Benefits of Google Analytics over Notion’s Analytics

Here are some reasons you might want to use Google Analytics over Notion’s own:

  1. User location, language, …: Google Analytics tells you who’s visiting your website and a lot about them. It shows you where they’re from, their country, city, and even what language their browser is set to.
  2. See what they do: Google Analytics helps you see which pages your visitors like best. It tells you how much time they spend on each page and if they leave quickly or stay around (bounce rate).
  3. Immediate updates: Google Analytics is real time. Visitors can be tracked in real time (especially with GA4).
  4. Track Goals: Google Analytics helps you see if your website is doing its job. If you want visitors to buy something or sign up for a newsletter, Google Analytics can tell you how often that happens.

Notion Analytics: The Limitations

Notion’s own analytics tool can be handy, but it has limits:

  1. Lacks visitor details: Notion’s tool can’t tell you who your visitors are or where they’re from.
  2. No real-time updates: Notion doesn’t update instantly, so you can’t see how people react to new content right away.
  3. Can’t track goals: Notion can’t help you track whether your visitors are doing what you want them to do.
Analytics in a Notion page

As you can see in the screenshot you only get limited insights on how many views, unique views you had on your page on a day to day basis. This can be very helpful, but sometimes you just need more data.

Integrate a landing page as an embed

This is probably the most straightforward way to get Google Analytics to track your Notion page visitors. Here’s what you need to do:

Step 1: Create a landing page in your main website

I’m assuming you already have Google Analytics setup in your main website. What you’ll do now is setup a dedicated landing page that has no real content in it. That dedicated landing page is then integrated into your Notion page as an “Embed”. This way the landing page that you’ve setup will always be loaded once the Notion page is loaded. This way Google Analytics will be able to pick up the traffic on your Notion page.

In this example we will create a separate landing page in WordPress. Simply go ahead and setup a new page

Create an empty landing page

Step 2: Get the URL of your landing page

Once you’ve published the landing page, you should be able to get the URL of that landing page. In our example we published it under:

https://notionlinker.com/notion-analytics

Copy this URL to your clipboard.

Step 3: Add the URL as an embed in your Notion page

Add embed to your Notion page

Simply open your Notion page and select to add a new element. In the dropdown scroll down till you find “Embed”. Select it and enter the URL of the landing page that you’ve just created.

You will then see your website embedded in your Notion page. You can make the window as little as possible, so that it doesn’t become annoying to your readers.

Notionlytics.com: Worth a try?

Notionlytics.com is a separate tool that connects to Notion and gives you more detailed analytics than Notions analytics. One thing you might not like, you have to give them access to your Notion account and also to your Google Analytics account.

Notionlytics requires you to give them access to your Google data

After you’ve authorized the application to access your Google and Notion data you can simply add their tracking to your Notion page. This is how it looks like when people visit your site.

Notionlytics example page of visitor tracking

How does it work? They add a widget at the end of your Notion page that allows them to track all your traffic. Under the hood they integrate a HTML/JS snippet that forwards the traffic to their website.

Unfortunately I was not able to push the data into Google Analytics. Maybe the integration didn’t work properly.

Some Questions you might have:

1. Can I track goals or clicks within a Notion page using Google Analytics?

Unfortunately, no. Notion does not allow for the injection of JavaScript directly into its pages. This restriction prevents Google Analytics from tracking goals or clicks within the Notion page. While you can understand visitor details and behavior patterns, tracking specific user interactions on the page is not possible.

2. Can I add a session recording tool like Hotjar to my Notion page?

Similar to the answer above, you cannot add tools like Hotjar to your Notion page. Notion does not support the JavaScript injection necessary for such tools to work. This means you cannot record sessions or perform heat mapping directly on your Notion page.

3. Can I add Google Tag Manager with my Notion page instead of Google Analytics?

Yes, the step-by-step guide provided above should work for Google Tag Manager, simply integrate a page that uses Google Tag Manager as an embed.

3. Does this integration method work with Google Analytics 4 (GA4)?

Yes, it does. You can set up Google Analytics 4 in your landing page. GA4 offers more advanced data insights and improved tracking capabilities, making it a worthwhile upgrade for many users. However, remember that the limitation of not being able to track specific clicks or goals on the page due to Notion’s JavaScript restrictions still applies.