> For the complete documentation index, see [llms.txt](https://matteo-gabriele.gitbook.io/vue-gtag/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://matteo-gabriele.gitbook.io/vue-gtag/v2.0.0/global-namespace.md).

# Global namespace

With gtag.js it's possible to customize the name of your global gtag instance to avoid conflicting with already installed library instances in your application.

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

createApp(App).use(VueGtag, {
  config: { id: "GA_MEASUREMENT_ID" },
  globalObjectName: 'foo'
}).mount("#app");
```

From now on the plugin will start using the instance name specified in the options, but you will still be able to use `this.$gtag` inside your Vue project without any changes.
