nuxt-community / gtm-module

Google Tag Manager Module for Nuxt.js
MIT License
327 stars 71 forks source link

Utm parameters lost when coming from google ads #96

Open swaner opened 3 years ago

swaner commented 3 years ago

Disclaimer: Not sure if this error comes from this package but have spent 4 days tracking this issue down and would really like to get some advice from someone who knows this package better.

The only way I can reproduce this is by clicking a live google ad so very hard to reproduce this in code-sandbox or similar.

  1. Click a real ad from the Google page result
  2. In google analytics real-time view, I can see the session created with the correct UTM tags (source=adwords, medium=cpc)
  3. Go to a normal nuxt-link to any other page
  4. In GA real-time in the traffic sources I can see that the session converts to medium: Organic and source: Google

Expected: The source would stick to adwords and medium cpc when navigating to a new page. Outcome: The session seems to be lost when navigating using nuxt-link. If I instead do a full page reload the session is working as expected (not lost).

The same behavior seems to apply when coming from facebook with utm parameters. The reason we noticed it was that the bounce rate was almost 100% and the session duration time way too low for our site (< 20 seconds) with 1 pageview.

When using GA directly without GTM everything works with the session, so it's either related to the configuration of GTM or this package.

RobinBertilsson commented 3 years ago

I'm experiencing the same issue...

rafal-ksiazek-rmtcfm-com commented 3 years ago

Maybe this will help (it solved for us the same problem). https://www.simoahava.com/gtm-tips/fix-rogue-referral-problem-single-page-sites/

rizkysyazuli commented 3 years ago

I had the same problem. But in my case, the issue came from the hosting service. I'm using AWS Amplify. In case anyone is using the same service. The solution is to add a redirect to include all the parameters.

I set the redirect like this:

Hope it helps. There's a discussion about it here: https://github.com/aws-amplify/amplify-console/issues/97