Hi all, I am working on a new website with Frontity -> remarketingo.com (is still under construction), and I came across a problem.
I have successfully installed GTM package and added Google Analytics tag inside GTM.
When I send test traffic or visiting from another device, I can see in Real Time tab all that traffic.
The problem comes when I navigate through the website, Google Analytics “sees” me on the same page where I landed, but it doesn’t track any other page that I visit.
Are you changing the head tags for each page with the <Head> component? (more info)
If the <title> tag is the same for all pages I think GA will register each separate page as though it were the same page. (disclaimer: I’m no expert on GA )
I just took a look at the site you linked to, and yes, the title is changing for each page (though the home page and blog page have the same title).
According to this page "actions.analytics.pageview is automatically launched every time link changes" and “This action is is not meant to be called directly”.
@alin It looks like some configuration may be necessary, according to this page “If @frontity/google-tag-manager-analytics is configured and enabled for pageviews in state.analytics.pageviews , every time a link changes (or every time action.router.set(link) is launched) a tracking for that page will be sent to Google Tag Manager.”
It could probably be related to the way Google Analytics is configured in your GTM container.
Instead of triggering pageviews using the events provided by GTM, you would have to use a custom event called pageview, which is added to the Data Layer by the @frontity/google-tag-manager-analytics package. The format of this event is explained here: Google Tag Manager package
@mburridge, I’m afraid our documentation doesn’t explain this very well. Should I open an issue?