question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Google analytics id not added to pages

See original GitHub issue

Version

2.2.0

Reproduction link

https://github.com/syonip/nuxt-ga-bug

Steps to reproduce

npx create-nuxt-app nuxt-test
cd nuxt-test
npm i @nuxtjs/google-analytics

add following to nuxt.config.js:

modules: [
    ['@nuxtjs/google-analytics', {
      id: 'UA-****'
    }]
  ]

run

npm run dev

What is expected ?

I expect to see activity in GA realtime page. I expect the html page to contain the ‘UA-****’ string somewhere but it doesn’t.

What is actually happening?

I don’t see any activity in GA realtime page when browsing to localhost:3000. Generated html contains <script async="" src="https://www.google-analytics.com/analytics.js" charset="utf-8"></script> but not the required call to gtag function with my id.

<div align="right">This bug report is available on Nuxt community (#c37)</div>

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:6
  • Comments:15 (10 by maintainers)

github_iconTop GitHub Comments

3reactions
syonipcommented, Jul 23, 2019

Made a PR: #54

3reactions
ricardogobbosouzacommented, Jun 3, 2019

It may be necessary to update the documentation or enable sendHitTask in dev mode, what do you think @pi0 ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

[GA4] Troubleshoot tag setup on your website - Analytics Help
The Google tag ID is incorrect · Click Data Streams and then select the web data stream for the website. · In the...
Read more >
Google analytics id not added to pages · Issue #50 - GitHub
What is actually happening? I don't see any activity in GA realtime page when browsing to localhost:3000. Generated html contains <script async ...
Read more >
Why Your Google Analytics Isn't Working (and How to Fix It)
1. Your Google Analytics tracking code is not implemented correctly ... a) Make sure you've added your tracking code to every page of...
Read more >
Page not appearing on Google analytics - WordPress.org
Page not appearing on Google analytics · 1. Load a web page in the Chrome browser. · 2. From the browser menu, select...
Read more >
How to Add Google Analytics Tracking to a Website - Chartio
Replace the GA_TRACKING_ID with your unique tracking ID provided by Google Analytics · Paste the code snippet right after the <head> tag on...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found