This document outlines the implementation of Google Tag Manager (GTM) purchase tracking for the Booksmandala frontend application. The goal was to add a JavaScript block to the /payments/success
page that fires a purchase event with dynamic order data.
The original request was to add this tracking script to the success page:
<script>
window.dataLayer = window.dataLayer || [];