Skip to main content

Google Analytics - Community

was wondering if there are any special settings we should consider regarding community + cookies, scripts, and related tracking.

While testing, I noticed that visits inside the /portal and spaces are not being tracked in Google Analytics, which came as a surprise.

I’m also not sure if this might be affecting the FCRM event tracking feature β€” I’ll share an update here once I’ve done some further research πŸ”¬.

Has anyone experienced this? Are there any specific settings we should be aware of?

Jeff Mapes

I found I could submit my https://my-site/wp-sitemap.xml

which included both wp and community sitemaps, to...

to https://search.google.com/search-console/sitemaps

now it's all being indexed by google after some time

JeffΒ once I set the portal to public I’ll check how tracking performs.

Currently, I’m testing with protected pages and GA tracks with no problem. But it’s not being the case for FC. So I guess, it could be because of the portal being on private and not having used the Tools > site map feature available

Jonathan Gwyer

Bear in mind that many plugins that you might have running on your site will not run within the portal pages - this is what FC the lean, mean, performance machine that it is.

If you are using a plugin to load your GA scripts on the site, you may need to add the code in the portal as well.

Jonathan GwyerΒ I am using Google Tag Manager. Should I had the script somewhere on the settings? :)

Jonathan Gwyer

Jorge de los ReyesΒ yep - Portal Settings, Customizations, Custom JavaScript

Jonathan GwyerΒ Awesome. Thank you Jonathan for pointing me exactly where to use it!

I checked that before, but was not sure if I should enter the GTM there or not. Fantastic :)

Quick question, I injected the two GTM codes (one is supposed to go after the head tag and one after the body tag). I just wrote one below the other.

Seems to be working, but I'm not sure if that's the proper way to do it. Is this the same way you guys did it, or are you using more sophisticated code that injects each one into its DOM part?

Jorge de los Reyes

Roberto Cornejo ReindlΒ Hi Roberto,

Good question! In our setup we only used the first GTM script (the one for the <head>).

The second one (the <noscript> fallback for the <body>) is technically optional - it’s only meant for users who have JavaScript disabled. In practice, that’s extremely rare, and in setups like Fluent Community it can even create layout issues.

So, rather than stacking both one after the other, we just injected the <head> script. That’s enough for all tags, GA4, and Consent Mode to work correctly.

If you prefer to keep both, the β€œproper” way would be to inject each snippet into its corresponding DOM section (head vs body). But functionally, you’ll be fine just with the <head> script.

Thanks Jorge de los Reyes! I appreciate you taking the time to answer. I'll do exactly that, just keep the head one.

Jorge de los Reyes

Roberto Cornejo ReindlΒ Also, do not forget to:

Add > Trigger: Change in History (available, among "Others" on the triggers menu).

Create > Tag: Page view (for Community) (just create an Event on GA4)

Otherwise, because Fluent Community is a SPA, you will only be tracking /portal πŸ˜…

And not the history. So you will be missing important info on funnels and so (just in case you missed that important detail!).

Eg. is not the same to see

  • Visited: /portal

    than

    Visited: /portal/course/nameofcourse/lesson-1

Will do, thanks!

Carlo Revelli

Hello was curious if there is a solution to use google analytics within portal or any other ways to track visits

Carlo RevelliΒ yep. It’s pretty easy. Just enter your tracking code on the customization tab on settings.

And on GA4, make sure to enable the history. Otherwise you will only be tracking /portal but not spaces, courses and so

Carlo Revelli

Jorge de los ReyesΒ thanks a lot

Carlo Revelli

Jorge de los ReyesΒ do you know if there is a way to show visitors / pages views for each post within FC?

Carlo RevelliΒ Yes, you can see this in Google Analytics 4. Individual post URLs are recorded separately, not just /portal/.

Go to Reports β†’ Engagement β†’ Pages and screens, select Page path and screen class, and filter by your community’s post URLs, such as /portal/space/your-space/post/…. You’ll see Views and Active users for each recorded post. Views include repeat visits; users is a different metric.

Because FC is a SPA, navigation needs to generate page views. In my setup, this uses β€˜Page changes based on browser history events’. If you already send those page views through GTM, don’t add a second tracking method that duplicates them.

One important distinction: this measures visits to the post’s own URL, not someone simply reading it while scrolling the feed. Feed impressions need additional tracking. And these stats are viewed in GA4; this doesn’t automatically add a view counter inside FC… (something that has been requested many times and that would be a nice feature!!

Carlo Revelli

Jorge de los ReyesΒ thanks again!

Carlo RevelliΒ πŸ‘†πŸ»reply on the thread :)