Add the Google Analytics 4 tag
Add the Google Analytics 4 tag to your site with RankKit SEO by pasting your Measurement ID, and keep editors and admins out of your traffic reports.
On this page
GA4 only reports on visits it can see, so every page needs the Google Analytics tag (gtag.js). If no other plugin or your theme adds it yet, RankKit SEO can: paste your Measurement ID and the tag loads on every front-end page.
This is separate from connecting Google. The tag collects data; the connection reads it back into RankKit SEO → Analytics. Most sites need both.
Find your Measurement ID
- Open Google Analytics and go to Admin.
- Under Data collection and modification, open Data streams and click your web stream.
- Copy the Measurement ID. It starts with
G-, for exampleG-ABC123XYZ9.
No property yet? In Admin, click Create → Property, follow the steps and add a Web data stream for your site's URL.
Add the tag in RankKit SEO
- Go to RankKit SEO → Settings → Webmaster tools.
- In the Google Analytics tag card, paste the ID into GA4 Measurement ID.
- Leave Do not track logged-in editors and admins on (the default) so your own visits don't skew the numbers.
- Click Save changes.
| Setting | Default | What it does |
|---|---|---|
| GA4 Measurement ID | Empty | The G- ID of your web stream. Empty means RankKit SEO adds no tag. |
| Do not track logged-in editors and admins | On | Skips the tag for logged-in users who can edit posts (contributors, authors, editors and administrators). |
RankKit SEO only outputs the tag for a valid G- ID. The script loads asynchronously from Google, so it doesn't block your page from rendering.
Check that it works
- Open your site in a private browser window (so you're logged out).
- In Google Analytics, open Reports → Realtime. Your visit should appear within a minute or two.
You can also view the page source and look for googletagmanager.com/gtag/js?id=G-….
Important Don't add the tag twice. If your theme, Site Kit, a cookie consent tool or another plugin already adds GA4, leave GA4 Measurement ID empty in RankKit SEO. Two tags count every page view twice.
Consent and privacy
RankKit SEO loads the tag for every visitor except the excluded logged-in users. It doesn't include a cookie banner or consent mode. If your site must ask for consent before analytics runs, add GA4 through your consent management tool instead and leave the RankKit SEO field empty. The RankKit SEO → Analytics reports work the same either way.
FAQ
Do I need the tag if I only want Search Console reports?
No. Search Console data comes from Google Search, not from a tag on your site. The tag is only needed for GA4 numbers such as sessions and visits from AI assistants.
Can I use a Universal Analytics (UA-) or Google Tag Manager (GTM-) ID?
No. The field accepts GA4 Measurement IDs that start with G-. To use Google Tag Manager, add it with another plugin or your theme and leave this field empty.
Why don't I see my own visits in GA4?
Do not track logged-in editors and admins is on, so the tag isn't loaded while you're logged in. Test in a private window or turn the setting off temporarily.
Was this page helpful?
Related guides
Connect Google Search Console and GA4
Connect Search Console and GA4 to RankKit SEO with your own Google Cloud OAuth client or a service account, then choose your properties.
Search and traffic reports
Read the Search Console and GA4 reports in RankKit SEO → Analytics, from clicks and top queries to organic sessions and visits from AI assistants.
Verify your site with Google, Bing and others
Add verification codes for Google Search Console, Bing Webmaster Tools, Yandex, Pinterest and Baidu in RankKit SEO to prove you own your site.
Still need help?
Email us with your WordPress and RankKit SEO versions and what you tried. Pro customers get priority replies.