Skip to content

Google Tag Manager - Google Analytics - pageview tracking example #198

@daniel-de-wit

Description

@daniel-de-wit

When using the default GoogleTagManager metrics adapter and Universal Analytics for tracking page views I noticed it only tracked initial page loads. After this, all user navigation was ignored giving the wrong impression of a high bounce rate.

I switched to the GoogleAnalytics metrics adapter, which worked like a charm, all user navigation was recorded. However the SEO managers needed Google Tag Manager..

After following the information from the article "https://www.analyticsmania.com/post/single-page-web-app-with-google-tag-manager/" I finally found the solution.

This is how:

Open Google Tag Manager and go to your workspace. Then follow these steps

1) Create a variable
Navigate to Variables in the left sidebar menu. Add a new variable with the following settings.

image

2) Create a trigger
Navigate to Triggers in the left sidebar menu. Add a new trigger with the following settings:

image

3) Create / Update Universal Analytics tag
Navigate to Tags in the left sidebar menu. Create or update a trigger "Universal Analytics" with the following settings:

image

Hope this helps others in the future.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions