adopted-ember-addons / ember-metrics

Send data to multiple analytics integrations without re-implementing new API
MIT License
367 stars 160 forks source link

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

Open daniel-de-wit opened 6 years ago

daniel-de-wit commented 6 years ago

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.

Subtletree commented 5 years ago

Worked for me, ty!