Debug

It is possible to use third party tools, like browser extensions, to really see what gtag is doing under the hood, but if you need a quick way to see what the plugin is firing, you can use the built-in logger.

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

const app = createApp(App);

app.use(VueGtag, {
  property: { id: "GA_MEASUREMENT_ID" },
  useDebugger: true
});

app.mount("#app"); 

From now on, all your events will be printed in your console as they happen. Remember that the order might not be the same as the actual dataLayer, but it doesn't mean that the events fired are wrong.

If you want to be 100% sure of everything that is happening in your application, I strongly recommend downloading more official tools.

Last updated