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.