All Collections
Getting Started
Web Push Integration
How to integrate Batch's snippet (ECMAScript 6) using a Tag Manager?
How to integrate Batch's snippet (ECMAScript 6) using a Tag Manager?

Here is how to integrate Batch scripts using a Tag Manager that does not support the most recent JavaScript versions.

Lucie avatar
Written by Lucie
Updated over a week ago

Batch methods available in our documentation (for example to collect custom data) are written in the latest available version of JavaScript. However, some Tag Management Systems do not support ECMAScript 6.

Managing compatibility issues

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.

Babel

You can use our pre-configured Babel link to translate Batch tags into a JavaScript version these tools can handle.

Note: Please make sure the 7.15.8 version is checked in the bottom left corner of Babel.


This article belongs to Batch's FAQ. Need more help? Find insightful articles, documentation, case & market studies, guides, and even more in our website's Resources section on batch.com and our blog.

Did this answer your question?