How to enable google analytics on collection item views?

Hi everyone,

Our blog post pages do not get tracked as page views in Google Analytics. We have Google Analytics / Tag Manager tracking our site and it works fine for tracking the pageviews of regular pages, but doesn’t seem to send through data to GA when someone is viewing a dynamic collection item, like a blog post page.

So to explain: we have a Webflow page at /blog, then if a visitor clicks on a blog post it loads a collection item: /blog/[article name]. This is a Webflow collection item, not a page, so to Google Analytics it looks like that visitor is no longer on the site.

I’ve checked the Sources tab in Chrome when visiting the blog post, and the usual google analytics / tag manager is not loaded when viewing a blog post, but it is on every other page.

Do I just add our tracking code to the custom code section of the blog post collection? Or do I need to add an empty Webflow page to host the blog content, so the pageview is tracked?


Here is my site Read-Only: (Webflow - Metro Retro)

GA needs to be present either globally or on each page and CMS template for tracking. So how are you loading GA? I can’t tell because you shared no resources, which is required for helping out.

Hi Jeff, apologies.
Here is my read-only link.

I would start here => Preview and debug containers - Tag Manager Help

Yes there is no pageview event fired when I click on a blog post, just a link click. Strange. Tag Manager Preview also goes into a ‘disconnected’ state when I view a blog post.

EDIT - I didn’t have the Tag Manager script in the body section of the collection page settings. Doh.