Closed xaander1 closed 3 years ago
Got this working by using the customResourceURL
. In this case, I mapped it to /gtag
:
// This is @nuxtjs/proxy
"/gtag": {
target: "https://www.googletagmanager.com",
pathRewrite: {
"/gtag": "/gtag/js"
},
secure: true
}
// vue-gtag config
Vue.use(
VueGtag,
{
config: { id: ctx.env.gaId },
customResourceURL: "/gtag"
},
ctx.app.router
);
How are you automatically getting the route in ctx.app.router
Never mind found it: stackoverflow access-nuxt-js-context-in-vue-plugin :100: :+1:
Thanks btw
Is it possible to change the analytics domain where vue-gtag points to in order to bypass adblock and other blockers. Here is a guide of what I mean : using nginx to bypass blockers So instead of:
https://www.google-analytics.com/analytics.js
to point to/analytics.js
Or how does vue-gtag address blockers??