Stape/Documentation

XML to JSON power-up

Updated Apr 10, 2025

Overview

Many platforms, especially older or enterprise systems, send webhook data in XML format by default. This format is not as readily compatible with the JavaScript-based environment of Google Tag Manager.

The XML to JSON power-up bridges that gap, ensuring all data arriving at your sGTM container can be handled as JSON. For marketers and analysts, this means fewer integration headaches, broader data compatibility, and a more complete picture of user or customer activities, whether online or in physical locations.

Benefits of the XML to JSON power-up

  • Seamless integration of offline or legacy systems - many CRM or POS systems may only send data in XML. Converting XML to JSON within sGTM allows you to use this data in any modern marketing and analytics platform.
  • Reduced development overhead - writing custom code or managing separate middleware to convert XML can be time-consuming and prone to errors. With the XML to JSON power-up, the conversion is automated and requires minimal setup, saving developer resources and speeding up deployment.
  • Future-proofing your data architecture - as your tech stack evolves, you may add or remove systems that produce or expect different data formats. Having a conversion layer baked into your sGTM container means you can quickly adjust to new requirements without major overhauls or custom code solutions.

How to set up the XML to JSON power-up

1. Log in to your stape.io account.

2. Select your sGTM container on the dashboard.

Select your sGTM container on the dashboard

3. Click Power-ups, then click the Use button next to the XML to JSON panel.

The Use button next to the XML to JSON panel

4. Toggle the XML to JSON switch.

Toggle the XML to JSON switch

5. Click Save changes.

Click Save changes

Testing the XML to JSON power-up

To see that the XML to JSON power-up works correctly, send an XML request to https://ss.example.com/stape/xml/ (where https://ss.example.com is the tagging server URL you use for the sGTM container), then check the format of the incoming request in the preview of your sGTM container.

Can’t find what you are looking for?