diff --git a/vendor/magento/module-google-gtag/view/frontend/web/js/google-analytics.js b/vendor/magento/module-google-gtag/view/frontend/web/js/google-analytics.js
index f49b6f5dbb920..a3be2a772073c 100644
--- a/vendor/magento/module-google-gtag/view/frontend/web/js/google-analytics.js
+++ b/vendor/magento/module-google-gtag/view/frontend/web/js/google-analytics.js
@@ -62,6 +62,7 @@ define([
                     purchaseObject['items'] = config.ordersTrackingData.products;
                     gtag('event', 'purchase', purchaseObject);
                 }
+                window.gtag = gtag;
             }
         }
     }

