> 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/access-gtag-instance-directly.md).

# Access gtag instance directly

The plugin provides a list of methods that help you write less code. For example, the "customMap" method

```javascript
import { customMap } from 'vue-gtag'

customMap({ key: 'value' })    
```

This internally will fire the following&#x20;

```javascript
window.gtag('config', 'GA_MEASUREMENT_ID', {
   custom_map: { key: 'value' }
})
```

The gtag.js library includes numerous events and configurations. In cases not covered, it is possible to use the "query" method that provides access to the gtag instance.

```javascript
import { query } from 'vue-gtag'

query('config', 'GA_MEASUREMENT_ID', {
   custom_map: { key: 'value' }
})  
```
