Skip to main content
All CollectionsGetting startedWeb Push implementation
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 4 months 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 convert Batch tags into a JavaScript format compatible with Tag Management System tools.

Note: Ensure that the plugin @babel/plugin-transform-arrow-functions is added 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?