# How to integrate Batch's snippet (ECMAScript 6) using a Tag Manager?

Batch methods available in our [documentation](/developer/sdk/web/profile-data.md) (for example to collect profile data) are written in the latest available version of JavaScript. However, some Tag Management Systems do not support ECMAScript 6.

## Managing compatibility issues <a href="#h_f7192d47e1" id="h_f7192d47e1"></a>

In some cases, Batch JavaScript tags are not supported by default by Tag managers like Google Tag Manager (GTM) and Tag Commander due to the use of arrow functions.

In order to use the preconfigured JavaScript tags in these Tag Managers, you must remove all the arrow functions it contains. This can be done easily by using a tool like [Babel](https://babeljs.io/repl/#?browsers=\&build=\&builtIns=false\&corejs=3.6\&spec=false\&loose=false\&code_lz=Q\&debug=false\&forceAllTransforms=false\&shippedProposals=false\&circleciRepo=\&evaluate=false\&fileSize=false\&timeTravel=false\&sourceType=script\&lineWrap=false\&presets=env\&prettier=false\&targets=\&version=7.15.8\&externalPlugins=\&assumptions=%7B%7D).

## Babel <a href="#h_87fe25d96b" id="h_87fe25d96b"></a>

You can use our [pre-configured Babel link](https://babeljs.io/repl/#?browsers=defaults%2C%20not%20ie%2011%2C%20not%20ie_mob%2011\&build=\&builtIns=false\&corejs=3.21\&spec=false\&loose=false\&code_lz=Q\&debug=false\&forceAllTransforms=false\&modules=false\&shippedProposals=false\&circleciRepo=\&evaluate=false\&fileSize=false\&timeTravel=false\&sourceType=module\&lineWrap=true\&presets=env%2Creact%2Cstage-2\&prettier=false\&targets=\&version=7.24.7\&externalPlugins=%40babel%2Fplugin-transform-arrow-functions%407.24.7\&assumptions=%7B%7D) to convert Batch tags into a JavaScript format compatible with Tag Management System tools.

{% hint style="warning" %}
Ensure that the plugin @babel/plugin-transform-arrow-functions is added in the bottom left corner of Babel.
{% endhint %}

<figure><img src="/files/Tk042WlMt99tQOo7kOcV" alt=""><figcaption></figcaption></figure>


---

# 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://doc.batch.com/developer/technical-guides/how-to-guides/web/how-to-integrate-batchs-snippet-ecmascript-6-using-a-tag-manager.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.
