GoogleAnalytics not being added
See original GitHub issueDescription
I followed the documentation to add a new Analytics account to my vue application. But events are not being sent to Analytics.
When I use the “Tag Assistant” plugin, it says that the gtag.js is set, but the analytics is not added. I checked the devTools, and I couldn’t find the analytics library being added.
<link href="https://www.googletagmanager.com" rel="preconnect">
<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-1234567-8" charset="utf-8"></script>
My setup is on the main.js file:
import VueGtag from 'vue-gtag';
Vue.use(
VueGtag,
{
config: { id: 'UA-1234567-8' },
},
router
);
If I manually add this snippet to my index.html, it seems to work, but I thought that by using this plugin, this step should not be necessary.
window.dataLayer = window.dataLayer || [];
function gtag() {
dataLayer.push(arguments);
}
gtag('js', new Date());
gtag('config', 'UA-1234567-8');
Am I missing something? Any help would be appreciated!
Thanks in advance.
Environment
vue-gtag@1.6.3
- Operating system: Windows
- Browser and version: Google Chrome Version 83.0.4103.97 (Official Build) (64-bit)
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:8 (4 by maintainers)
Top Results From Across the Web
Why Your Google Analytics Isn't Working (and How to Fix It)
The most common Google Analytics setup issues · 1. Your Google Analytics tracking code is not implemented correctly · 2. You're not tracking...
Read more >Google Analytics Not Working: 20 Common Errors & How to ...
One of the most common mistakes new users make is when adding the Google Analytics tracking code. Not knowing where to place the...
Read more >Troubleshoot tag setup and no-data issues - Analytics Help
This troubleshooter is designed to help you resolve issues with the setup of your Analytics tag. Select the issue that most closely matches...
Read more >What to Do When Google Analytics is Not Tracking
Have you reviewed your Google Analytics tracking code? · Have you added the tracking code to every page of your site? · Do...
Read more >29 Common Google Analytics Data Errors And How To Fix Them
Solution A – Date & Time settings don't match. This is an easy error to fix but one that can screw your data...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

just saying it out there, but it could be related to this issue. I will have a look later
https://github.com/MatteoGabriele/vue-gtag/issues/144
🎉 This issue has been resolved in version 1.6.4 🎉
The release is available on:
Your semantic-release bot 📦🚀