# 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' }
})  
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://matteo-gabriele.gitbook.io/vue-gtag/access-gtag-instance-directly.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
