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?
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
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? :)
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?
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.
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!
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
Jorge de los ReyesΒ thanks a lot
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!!
Jorge de los ReyesΒ thanks again!
Carlo RevelliΒ ππ»reply on the thread :)