MatteoGabriele / vue-gtag

Global Site Tag plugin for Vue (gtag.js)

Home Page:https://matteo-gabriele.gitbook.io/vue-gtag/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Exposing AdWords AccountId in the .JS file?

christoph-werker opened this issue · comments

Hello Together,

I just noticed that the plugin exposes the Ad-Words account in the source code. Is it possible to prevent this somehow? I use Webpack and include VueGtag as follows.

Vue.use(VueGtag, {
    config: {id: "AW-xxxxxxxxx"}
});

See:
image

I'm using the following Settings in Webpack:

mix.options({
    cssNano: {
        discardComments: {
            removeAll: true,
        },
    },
    uglify: true,
    autoprefixer: true,

})
.polyfill({
        enabled: true,
        useBuiltIns: "usage",
        targets: "> 0.25%, not dead"
    })
.js('resources/js/backend/app.js', 'public/js/app.js').vue({extractStyles: false, globalStyles: false,})

Thanks for your help.

The plugin doesn't expose anything: that's your bundle. In javascript, everything is exposed.