Comments (10)
Well, to be honest, I decided to just conditionally load GA if not being crawled by Google PageSpeed Insights: rfgamaral/ricardoamaral.net@a161379
from ga-lite.
Yep, ga-lite imitates the older analytics.js. Perhaps in the future this project will transition towards using the new kind of API, but this is not planned yet.
Universal Analytics (gtag.js) offers a few upgrades to the previous Classic Analytics (analytics.js):
- Custom variables => custom dimensions and metrics
- Offline-enabled data sync
- Android and iOS libraries
from ga-lite.
I'm labeling this issue as "wontfix" for now, but I'll keep it open for the future
from ga-lite.
If you're not closing that label might be a bit misleading though.
Anyway, from your point of view, if one doesn't use those new features, is there no issue in using this lib of yours? All my analytics will still be tracked as if I was using the original version?
Still, is the resume installation still the recommend one? I'm sure I've seen a blog post from you with a different, shorter implementation. Not sure if it was an older or more recent implementation.
from ga-lite.
from ga-lite.
if one doesn't use those new features, is there no issue in using this lib of yours? All my analytics will still be tracked as if I was using the original version?
All analytics (other than #46) are tracked normally. I'm using this in my own projects and it works just fine. You might see some differences in the amount of absolute visitors/events when migrating, because some ad blockers do block analytics.js, but they don't necessarily block ga-lite. But Google Analytics numbers are not absolutely accurate anyways (I'm generally seeing 20-50% less page views at Google Analytics than in my server logs because of the popularity of ad blockers, regardless of if I'm using ga-lite or the official analytics).
Still, is the resume installation still the recommend one? I'm sure I've seen a blog post from you with a different, shorter implementation. Not sure if it was an older or more recent implementation.
The one in README is the most up to date. The 1.x version had a shorter snippet (which is still available from npm/jsdelivr if you liked the old syntax) and it is not supported anymore in the 2.x version. The new 2.0 version introduced many new features, including event tracking, so you might want to use it if you're doing anything else than page view tracking with your Google Analytics.
from ga-lite.
from ga-lite.
I've switched over to using the gtag format for one of my clients, as they are now running multiple tracking campaigns, so the final bits of JavaScript are something like:
gtag('config', 'UA-XXXXXXXX-1');
gtag('event', 'conversion', {'send_to': 'YYYYYYY-YYYYYY});
It isn't clear to me, if ga-lite supports this or how to go about implementing it.
from ga-lite.
@jamesjohnmcguire Seems that you're using Google Ads on your site. This piece of code is responsible for sending the conversion information for Google Ads:
gtag('event', 'conversion', {'send_to': 'YYYYYYY-YYYYYY});
(See more: https://support.google.com/google-ads/answer/7548399?hl=en)
ga-lite unfortunately only supports Google Analytics; this project does not support any other Google Tag Manager related projects like Google Ads.
from ga-lite.
from ga-lite.
Related Issues (20)
- Support for the new Google Analytics 4 tag HOT 9
- Use keepalive flag with fetch
- Capture ga() function calls and re-route them through galite() HOT 5
- Add note to README about using preconnect/preload to improve google page speed HOT 7
- ESM version for modern browsers HOT 10
- Universal Analytics (GA3) and GA4 same time HOT 2
- Illegal Invocation error due to lack of navigator.sendBeacon binding HOT 1
- Self Referral Traffic
- NPM bundle not including commands directory HOT 1
- Customizable endpoint URL and User Language HOT 2
- Instructions on using esm version to readme HOT 4
- SyntaxError Unexpected token = HOT 2
- Yarn run build not working HOT 4
- XMLHttpRequest on main thread is deprecated HOT 2
- Are Conversion Tags Possible & Phone Number Tags HOT 4
- Disableing of ga-lite through cookie HOT 4
- SSR issue introduced HOT 5
- It should be mentioned that ga-lite doesn't use cookies HOT 3
- Stop working on Chrome 85+ for somehow HOT 6
- Test coverage for SSR / node.js compatibility HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ga-lite.