MatteoGabriele / vue-gtag-next

Global Site Tag plugin for Vue 3 (gtag.js)
MIT License
44 stars 3 forks source link

Not showing up on Google Analytics #13

Open tvchurch opened 3 years ago

tvchurch commented 3 years ago

Wonder if I'm not adding this correctly. My main.js file (Account ID number has been changed):

import { createApp } from "vue";
import App from "./App.vue";
import router from "./router";
import store from "./store";
import VueGtag from "vue-gtag-next";

createApp(App)
  .use(store)
  .use(router)
  .use(VueGtag, {
    property: {
      id: "287664219",
    },
  })
  .mount("#app");

In "@/router/index.js" I have this:

const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes,
});

trackRouter(router);

Shouldn't that work?

MatteoGabriele commented 3 years ago

it looks good to me. could you create a small vue3 app to show me how you implement it? thanks