XenForo’s job in analytics is one field: a Google Analytics 4 Measurement ID. Search Console is not a XenForo screen. You add a property at Google, you submit the sitemap XenForo already builds, and you link the two Google products so queries sit next to sessions. That is the integration. It is not a custom-events taxonomy and it is not an on-page SEO rebuild.
This is not the SEO article. That one already flipped Use full friendly URLs, Include content title in URLs, the XML sitemap option group, and IndexNow. Assume those work. This article owns Setup → Options → Statistics and metrics, a GA4 web stream, a Search Console property, and Google Admin → Product links → Search Console Links.
Community 2.3 threads are the source for the ACP wording: paste a Measurement ID in the G-XXXX form into Statistics and metrics. Official XenForo manuals indexed for this site do not print a full “Google Analytics” chapter with that label. The community path is what 2.3 boards actually use. Do not invent a second core field for a Universal Analytics UA- ID. UA is gone.
Two products, two questions
| Product | Question it answers | Where you configure it |
|---|---|---|
| Google Analytics 4 | What did people do after they arrived? | XenForo: Setup → Options → Statistics and metrics. Google: a GA4 property + web data stream |
| Google Search Console | How did they find you in Google Search? | Google only. Submit the XenForo sitemap. Optional: IndexNow already on from the SEO article |
| The link between them | Which queries became which landing pages and sessions? | Google Analytics Admin → Product links → Search Console Links |
If you only paste the Measurement ID, you will see sessions, views, and whatever Enhanced measurement Google fires on a normal page load. You will not see search queries. Queries live in Search Console until you link the products.
If you only add Search Console, you will see impressions and clicks and indexing errors. You will not see whether those clicks bounced off a 4-second guest thread. That join is the link, not a XenForo add-on.
Official Google: Search Console keeps 16 months of data. Linked reports in GA4 inherit that ceiling. Search Console data shows up in Analytics about 48 hours after Search Console collected it. Do not debug “missing queries” at hour six.
1. Create the GA4 property and copy the Measurement ID
This is Google-side. Official Analytics Help: a Measurement ID identifies a web data stream. Format: G- plus letters and numbers (G-PSW1MY7HB4 is Google’s own example shape). It is not the numeric property ID and it is not a Tag Manager container GTM-.
Worked steps, current GA4 Admin:
- Open Google Analytics with an account that should own the board.
- Admin → Create → Property (or use an existing property if this board is the only site in it). One board, one property. Do not dump a store, a blog, and the forum into one property unless you like filtering forever.
- Create a Web data stream. URL = the same https origin as XenForo Board URL. Stream name = the board name you would recognise at 23:00.
- Open the stream. Copy Measurement ID. It starts with
G-.
That is the only string XenForo needs. You do not paste the full gtag snippet. You do not paste a Tag Manager container unless you have already decided to bypass XenForo’s field — and this article will not recommend that as the default. Core 2.3 is the Measurement ID.
Keep the Google account that owns the property in the staff password manager. A Measurement ID is not secret the way an API secret is, but losing Admin access to the property is how boards go dark in analytics after a founder leaves.
2. Paste it into XenForo
Path, community 2.3: Setup → Options → Statistics and metrics.
Paste the Measurement ID. Save. Load a public thread in a private window (or a browser with analytics debug). In GA4, Admin → Data streams → your stream → View tag instructions / Test (Google’s UI moves; the idea is the realtime view). Reports → Realtime should show a view from that window within a minute if the tag fired and you are not blocking it.
What you should not do here:
- Do not paste a
UA-ID. 2.3 expects GA4. - Do not paste the property number (
123456789) withoutG-. - Do not paste a GTM container ID into the Measurement ID box.
- Do not add a second copy of gtag in
PAGE_CONTAINER“to be sure.” You will double-count.
Official XenForo docs, in the pages used for this article, do not publish a custom-events map for “thread created,” “reply posted,” or “conversation started.” Do not invent one as core. GA4 Enhanced measurement (scrolls, outbound clicks, site search — if Google’s stream has those toggles on) may fire on a XenForo page the way it fires on any site. That is Google’s stream configuration, not a XenForo taxonomy. If you later need a login or sign_up key event, that is a Tag Manager or add-on project with a named owner. It is not a prerequisite for this integration.
XenForo already has its own Statistics log in the ACP (registrations, replies, uploads). Official logs chapter: those are on-site counts, not Google. Use them when GA4 is wrong or when you do not want a third-party tag on a staff-only question.
Enhanced measurement is Google’s stream, not a XenForo events map. In the GA4 web stream you can toggle things Google names — scrolls, outbound clicks, site search, file downloads, form interactions — depending on the current Admin UI. Those toggles fire on whatever HTML XenForo already emits. They are not official XenForo events called thread_view or reply_posted. Do not build a staff dashboard that assumes a reply is a GA4 key event unless you later add a named tag. This article stops at “the page loaded and Google counted a view.”
Site search is the one Enhanced toggle that looks forum-native. XenForo search URLs are not documented in the official manuals cited here as a GA4 query parameter. If Google’s toggle does not pick up /search/ results, leave it. Do not rewrite XenForo search to ?q= so a marketing blog’s GA4 recipe works.
3. Add the Search Console property
Search Console is Google-side. There is no XenForo field labelled “Search Console.”
- Open Google Search Console.
- Add a property. Prefer a URL-prefix property that matches Board URL exactly (
https://forum.example.com) while you are verifying the first time. A Domain property (DNS TXT) covers every protocol and subdomain; use it when you also havewww,http, or a media host on the same registered domain and you understand the extra verification. - Verify ownership. Common methods: DNS TXT, an HTML file on the web root, or a meta tag. Official Google: you must be a verified owner to submit a sitemap in the Sitemaps report and to link the property to GA4. If you only have “Full” user access, you can look; you cannot submit.
- Confirm the property URL scheme matches the live board. Google’s Sitemaps report is per property. A sitemap submitted on
http://will not appear onhttps://.wwwand apex are different prefix properties.
Verification file in the XenForo root is fine. Do not put it under internal_data/. Nginx configs that mark src/ and internal_data/ as internal (see the SEO article) will 404 a file you hid there.
4. Submit the XenForo sitemap
XenForo already builds the sitemap. Official: Setup → Options → XML sitemap generation controls content types, automatic Google submit, and Extra sitemap URLs. The SEO article is the runbook for that screen. Here you only need the public URL of the generated sitemap.
Google’s official Sitemaps report steps:
- You need owner permissions on the property.
- Confirm the sitemap is on the site and fetchable. Official: run a live URL inspection and check Page fetch = Successful.
- Open the Sitemaps report. Paste the sitemap URL into Add a new sitemap. Submit.
- Status should move toward Success. Google may take time to crawl the listed URLs. Official: submitting is “telling Google where to find the file,” not uploading the XML to Google.
If XenForo emits a sitemap index (a sitemap of sitemaps), submit the index URL. Do not submit every child unless you are debugging one split file.
Official Google caveats that bite forums:
- The Sitemaps report lists only sitemaps submitted via this report or the API. A sitemap XenForo auto-submitted, or one listed only in
robots.txt, may still be used by Google and still be invisible in this report. Submit it here if you want the status row. - The report is per property. Wrong host or scheme = empty list.
- A sitemap blocked by
robots.txtwill Couldn’t fetch. Do notDisallowthe sitemap path. - Login-walled URLs inside the sitemap become inspection noise. Private staff nodes are a permissions problem.
Automatically submit to Google on XenForo’s sitemap options is still worth having. It is a ping. Search Console submission is the dashboard. Keep both on production. Keep both off on staging.
IndexNow remains Setup → Options → Search engine optimization (SEO) → IndexNow. Official XenForo: one toggle. It tells participating engines that a URL changed. It does not replace this sitemap row. Turn it on after friendly URLs work; leave it off on clones.
5. Link Search Console to GA4
Official Analytics Help: Connect Search Console to Google Analytics.
Prerequisites Google names:
- The GA4 property and the Search Console property must cover the same set of pages
- You need the Editor role on the GA4 property
- You must be a verified owner of the Search Console property (you can finish verification during the link)
Official create-link steps:
- In GA4 Admin, under Product links, open Search Console Links.
- In the link table, click Link.
- Choose accounts → pick the Search Console property → Confirm.
- Next.
- Select the web data stream for the board.
- Next, review, submit.
Official limits:
- One web data stream ↔ one Search Console property
- One GA4 property can have only one data stream linked to Search Console
- You cannot edit a link. Delete it and create a new one
Official reports the link unlocks:
| Report | What it shows |
|---|---|
| Google Organic Search Queries | Queries and Search Console metrics. Drill by Search Console dimensions, not arbitrary GA4 dimensions |
| Google Organic Search Traffic | Landing pages with Search Console and Analytics metrics. Country and Device dimensions |
Official caveats you will hit on day two:
- The Search Console collection is unpublished by default. Reports → Library, find it, publish it. Until you do, the left nav looks empty and people reinstall the tag.
- Compatible Analytics dimensions in those reports: Landing page, Device, Country. Not “user group,” not “thread prefix.”
- No time-series charts in the current Search Console reports (Google’s documented limitation).
- Changing the linked stream rewrites history for those reports to the new stream.
You can also start the link from Search Console. Same objects. This article uses the Analytics Admin path because Google’s help article does.
Who holds the keys. Official Google: Editor on GA4, verified owner on Search Console. Practically, that identity should be a shared staff account or a Google Workspace user the board controls, plus a second owner so a founder’s personal Gmail cannot ransom the property. Do not verify Search Console with a contractor’s account and then lose the HTML file. DNS TXT at the registrar is the verification that survives a rebuilt VPS.
When a staff member leaves, remove them from the GA4 property and from the Search Console users list the same week you revoke their XenForo Administrative group. The permissions article is the XenForo half of that offboarding. This is the Google half.
Inspect one thread before you trust the property
Official Google tool: URL Inspection in Search Console. Use it on three URLs the first afternoon, not after a month of empty Performance charts.
- The homepage (
/— whatever Index page route points at). - One public thread with a friendly URL.
- The sitemap URL itself.
For each: paste, inspect, then Live test if the stored result looks stale. Official fields you actually need: URL is on Google (or why not), Crawl allowed, Page fetch. The sitemap live test must be Successful or the Sitemaps report will sit on Couldn’t fetch.
Common forum reasons a thread is not on Google:
- The node is private or guests cannot View node. Search Console is not broken. Permissions are.
- Friendly URLs are on and the rewrite is off. Fetch is 404. Fix the SEO rewrite.
robots.txtdisallows/threads/because someone copied a WordPress recipe. Remove that rule. Official XenForo SEO pages do not ship an ACP robots editor; the file is on disk.- The thread is new and the sitemap has not been recrawled. Official Google: submitting a sitemap queues URLs; it does not guarantee every URL is indexed. IndexNow (already on from the SEO article) is the doorbell, not a contract.
Do not hit Request indexing on 400 threads. Official Google: there is a daily limit; for many URLs, submit the sitemap. One inspection on a representative thread tells you whether the pattern works.
What you will see — and what you will not
After a week of clean traffic:
- GA4 Realtime and Engagement → Pages and screens show thread URLs and the homepage route.
- Search Console Performance shows queries, impressions, clicks, CTR, average position.
- Search Console Page indexing shows why a thread was skipped (redirect, soft 404, crawled — not indexed, blocked by robots).
- Linked GA4 Search Console reports join query → landing page → engagement, with the delays and dimension limits above.
You will not get, from core XenForo:
- A breakdown by user group or trophy rank
- An official
post_reply/start_thread/upgrade_purchaseevent map - A Search Console push from the ACP
- Consent-mode wiring beyond whatever your privacy stack already does
If a vendor deck promises those as “native 2.3 analytics,” it is an add-on or it is Tag Manager. Name it. Do not write it into this runbook as stock.
Privacy, cookies, and the help pages you already ship
You just put a Google tag on every public page. That is a privacy event, not only a marketing event.
Official XenForo help pages installed by default include cookies, Terms and rules, and Privacy policy. Official help-pages chapter (docs.xenforo.com/manual/communication/help): those pages exist so you can tell visitors what you do. The Terms and rules section of the manual is where XenForo documents forcing acceptance of Terms and Privacy. Edit the Privacy help page so it actually names Google Analytics and Search Console if those tools process personal data for you. Do not leave the stock lorem.
Official logs chapter: when users complete the cookie consent challenge, XenForo writes a Cookie consent log. That is the core record. It is not a full Consent Management Platform. Do not invent a CMP add-on as required to finish this article. If your jurisdiction or counsel says you need a named CMP, that is a legal project with a named add-on or host feature. Core XenForo gives you the help pages, the force-acceptance tools in Terms and rules, and the consent log.
Practical minimum before you paste G-:
- Privacy help page mentions the Google tag and Search Console as a processor if that is true for your board.
- Cookie help page is not the unused default.
- You know whether guests who reject non-essential cookies still fire the Measurement ID. Core XenForo + a pasted ID will typically fire for everyone unless an add-on or CMP gates it. If that is unacceptable, do not paste the ID until the gate exists. This article will not invent that gate.
Staff hygiene: the Google account that owns GA4 and GSC should be a shared staff identity or a domain account, not a personal Gmail that vanishes. Editor/owner should be at least two people.
Own-goals
Measurement ID in the wrong box. If your ACP still shows a leftover from an old add-on labelled “UA number,” that is not Statistics and metrics. Use the 2.3 option. Community threads from the UA era are why people still paste UA-.
gtag in the template and in the option. Double hits. Realtime looks healthy. Every report is a lie.
GTM plus the XenForo field, both loading GA4. Same lie. Pick one loader. Default: XenForo field, no GTM, until you have an event plan that actually needs GTM.
Prefix property on http:// after you forced HTTPS. Empty Performance report, sitemap in the wrong property. Fix the property, do not “resubmit harder.”
Sitemap submitted, friendly URLs still off. Search Console will index /index.php?threads/… and you will migrate URLs later for free. Do the SEO rewrite first.
Linking a stream for the store to the forum’s Search Console property. Official: one stream, one GSC property, same pages. Google will let you click the wrong stream. The reports will be nonsense.
Debugging queries in GA4 Realtime. Queries are Search Console, 48 hours later, 16-month window. Realtime is “did the tag fire.”
Publishing staging in the same property. Filter later is how you pollute every comparison. Separate GA4 property, or do not install the ID on staging. Separate GSC property, or block staging from being crawled.
Ignoring Library. The Search Console collection stays unpublished. You assume the link failed. It did not.
A worked afternoon
- Confirm friendly URLs and the sitemap URL load for a guest.
- Create the GA4 property + web stream. Copy
G-…. - Setup → Options → Statistics and metrics → paste → save.
- Private window: hit the homepage and one thread. Confirm GA4 Realtime.
- Add the Search Console URL-prefix property. Verify as owner.
- Sitemaps report → paste the XenForo sitemap URL → Submit. Confirm live inspection can fetch it.
- Production only: sitemap auto-submit on, IndexNow on.
- GA4 Admin → Product links → Search Console Links → Link. Pick the property, pick the web stream, submit.
- Reports → Library → publish the Search Console collection.
- Edit Privacy and cookie help pages so they describe the tag you just added.
- Wait 48 hours before you judge queries. Use that time to watch Page indexing, not the vanity CTR.
What to review after two weeks
Not a dashboard addiction. Four questions:
- Did Google fetch the sitemap? Sitemaps report = Success, discovered pages in the same order of magnitude as public threads.
- Are the right URLs indexed? Page indexing should not be dominated by
/account/,/login, or a private node. - Which landing pages get the clicks? If the homepage eats everything, your thread titles are weak or the sitemap is not being crawled. That is content and SEO, not a second analytics tag.
- Does GA4 session volume roughly agree with XenForo’s own Statistics? They will never match (bots, consent, cache). A 10× mismatch means the tag is missing on the guest cache or firing twice.
Guest page cache can serve HTML that was built without a unique visitor in mind. The GA4 tag is still in the HTML; it runs in the browser. If Realtime dies only for guests after you enable page cache, you have a cache or CDN problem stripping scripts — the same class of bug as Cloudflare “optimizing” 2.3 JavaScript. Fix the CDN. Do not paste a second snippet.
Logged-in versus guest. The Measurement ID fires for members too, unless a CMP gates it. Staff with ad-blockers and a Disallow on /admin.php will undercount ACP use — that is fine; you do not need Google to see the admin panel. What you do need is guest thread views. Always test Realtime in a private window, not while logged in as Administrative with three privacy extensions.
ACP Statistics versus GA4. Official XenForo Statistics count registrations, replies, uploads on the server. GA4 counts browsers that ran the tag. They will diverge on:
- Bots that hit PHP but never run JavaScript
- Guests who reject cookies, if you later gate the tag
- Cached HTML that still includes the tag (GA4 still counts) versus a CDN that stripped it (GA4 goes quiet)
- Time zones: XenForo’s board time versus the GA4 property time zone you picked at create
A 10× mismatch is a broken tag. A 20% mismatch is the nature of the two instruments. Do not “correct” XenForo Statistics to match GA4. They answer different questions.
Checklist
- Board URL origin = GA4 stream URL = Search Console prefix (scheme + host)
- Measurement ID is
G-…, pasted only in Setup → Options → Statistics and metrics - No second gtag / GTM duplicate
- GA4 Realtime sees a guest thread view
- Search Console property verified as owner
- Sitemap URL fetches logged out; submitted in the Sitemaps report
- XenForo sitemap auto-submit on (production)
- IndexNow on (production) — configured in the SEO options, not here
- GA4 Product links → Search Console Links completed on the correct web stream
- Search Console report collection published from Library
- Privacy + cookie help pages updated
- Cookie consent log exists if you use the stock challenge
- No invented core events map
- Staging is not in this property
Takeaways
- Core 2.3 analytics is a GA4 Measurement ID in Setup → Options → Statistics and metrics.
- Search Console is Google-side: property, verification, sitemap URL, then patience.
- Link them in Admin → Product links → Search Console Links. Editor on GA4, verified owner on GSC, same pages.
- Publish the Search Console collection from Reports → Library or you will think the link failed.
- Official Google: 48-hour delay, 16-month Search Console window, one stream per GSC property.
- Official XenForo does not ship a thread-level events taxonomy. Do not invent one as a setup requirement.
- Help pages for Privacy and cookies are the stock disclosure. A CMP is a legal decision, not a hidden ACP screen.
- On-page SEO (friendly URLs, sitemap contents, IndexNow) stays in the SEO article.
Paste G-. Submit the sitemap. Link the products. Read queries next week, not tonight.

