# How to Set Up Google Analytics 4 (GA4) in Kata

> Set up Google Analytics 4 on a Kata website: create a GA4 property, copy the Google tag and paste it into Kata Custom Codes. No plugin needed.

Source: https://webnus.net/kata/documentation/how-to-set-a-google-analytic-tool/
Last updated: 2026-10-13

You can add Google Analytics 4 (GA4) to a Kata website without an extra plugin. You create a GA4 property, copy its Google tag, and paste the tag into Kata’s Custom Codes option. The old Universal Analytics “Tracking ID” (UA-XXXX) no longer collects data, so use a GA4 Measurement ID that starts with **G-**.

## Step 1: Create a GA4 property and web data stream

1.  Go to [Google Analytics](https://analytics.google.com/) and sign in with your Google account.
2.  Open **Admin** and click **Create** > **Property**. If you don’t have an account yet, Google asks you to create one first.
3.  Enter a property name, your reporting time zone and currency, then answer the business questions.
4.  When asked to choose a platform, select **Web**, enter your website URL and a stream name, and click **Create stream**.

## Step 2: Copy your Google tag

1.  In the web stream details, click **View tag instructions** and choose **Install manually**.
2.  Copy the whole snippet. It starts with `<!-- Google tag (gtag.js) -->` and contains your Measurement ID (G-XXXXXXXXXX).

## Step 3: Paste the tag into Kata

1.  In your WordPress dashboard, go to **Kata > Options** (Customizer).
2.  Open **Custom Codes** and paste the snippet into the **Before </head> tag** field.
3.  Click **Publish**.

## Step 4: Check that data is coming in

Open your website in a new tab, then go to **Reports > Realtime** in Google Analytics. Your visit should appear within a minute or two. If it doesn’t, clear your site and CDN cache and check that the tag is not blocked by an ad blocker.

**Tip:** add the tag in one place only. If a plugin such as Site Kit already adds Google Analytics, don’t paste the snippet in Kata as well, or every visit will be counted twice. If your site needs visitor consent before tracking, set this up together with Kata’s GDPR option or your consent tool.

[Image: Kata Customizer Custom Codes panel for adding a Google Analytics code on a hotel demo]
