> ## Content Index
> Fetch the complete content index at: https://bepublish.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# Integrating Google Analytics 4 with ghost CMS
- URL: https://bepublish.com/google-analytics-4-integrate/
- Published: 2024-08-05T11:49:16.000Z
- Updated: 2026-04-11T00:17:52.000Z
- Description: How to integrate google analytics (GA4) with ghost CMS using auto-generated tracking code.
- Author: Cuong Thach
- Tags: #integrate, #no-homepage, #faq-schema, #multilingual

Google Analytics 4 ID (Measurement ID): 

```

```

Copy Tracking Code 

---

## Guide to Integrating GA4 with Ghost

Google Analytics 4 (GA4) is the latest version of Google’s free data analysis and website traffic tracking tool.

The basic steps to set up Google Analytics 4 with Ghost are as follows:

1. Sign in to your **Google Analytics account** ([create a new account](https://analytics.google.com/?ref=bepublish.com) if you don’t have one).
2. Create a new **Google Analytics property**.
3. Copy and paste the **Measurement ID** you just created into the tool above.
4. Click the "**Copy Tracking Code**" button and paste it into **Settings > Code injection > Site header**.

![Create a New Google Analytics Property](https://bepublish.com/content/images/2024/08/image.png)

Create a New Google Analytics Property

![Paste the code into Settings > Code Injection > Site Header in Ghost](https://bepublish.com/content/images/2024/08/ghost-header.webp)

Paste the code into ****Settings > Code Injection > Site Header** in Ghost

---

## How to track traffic with Google Analytics 4

After inserting tracking code into ghost you can immediately check information and traffic including yourself.

There are 2 ways to access Google Analytics 4 tracking dashboard:

1. **On Google Analytics website** . You log in directly on the browser at [https://analytics.google.com/](https://analytics.google.com/?ref=ghostfam.com) and track. You can switch to real-time tracking to check if the tracking code is inserted correctly while you are viewing the website.
2. **Use the mobile app** . Download the Google Analytics app [on Android](https://play.google.com/store/apps/details?id=com.google.android.apps.giant&hl=en&ref=ghostfam.com) and [Apple stores](https://apps.apple.com/us/app/google-analytics/id881599038?ref=ghostfam.com) . Once downloaded, log in to your account and track traffic through the app. Google Analytics is one of the few traffic tracking apps that has a mobile app.

💡

For those new to Google Analytics, you can watch the quick Google Analytics tutorial below or [sign up for Google's free Google Analytics course](https://analytics.google.com/analytics/academy/course/6?ref=ghostfam.com) here.

---

## Frequently Asked Questions

#### What about the automatic tracking code in Google Analytics data streams?

It’s essentially the same for regular website tracking, unless you need advanced or custom tracking features.

However, obtaining the tracking code from the data stream can be a bit cumbersome, and it’s easy to forget how to retrieve it if you don’t do it frequently. ghostFam provides a ready-made template for you, so you just need to enter the GA4 ID to quickly get the tracking code.

Moreover, if you are a website agency, asking clients to find the tracking code in their account is quite difficult, but it is much easier for clients to retrieve the GA4 ID as it is always available on the Google Analytics homepage.

#### Should you use GA4 through Google Tag Manager?

You should insert the GA4 tracking code directly into your website, as this will help optimize speed more than using the third-party tool Google Tag Manager.

#### Does using Google Analytics 4 affect site speed?

In theory, yes, because it requires loading an additional script from Google. However, most websites today have good page load performance, so the impact is generally negligible.