I am using Google’s global site gags (gtags) on my framework7+vue application to collect data. The gtag official documentation has an easy to use example. Anyway, I prefer vue-gtag
library.
npm install vue-gtag
src/js/app.js
file or equivalent file where vue is being initialized.// Init google analytics
import VueGtag from "vue-gtag";
Vue.use(VueGtag, {
config: { id: "UA-180198765-1" }
});
where id
key in config
dictionary is your tracking id.
Official documentation here https://matteo-gabriele.gitbook.io/vue-gtag/
[vue-gtag] Ops! Something happened and gtag.js couldn't be loaded
.Ad-blocker?