github internxt/drive-web v1.0.617

latest release: v1.0.618
4 hours ago

Description

Fixed critical Google Analytics purchase tracking issues. The previous implementation was causing GTM routing failures that prevented conversions from reaching Google Ads correctly.

Key Changes

  • Fixed GTM/Google Ads Routing: Refactored gaService.ts to separate event handling and event pushed to dataLayer for GTM triggers, and direct gtag() call with explicit send_to array to guarantee delivery to both Analytics and Google Ads endpoints

  • Refactored Purchase Event Tracking: Added dedicated logic for purchase events across services with clear separation of concerns

  • Prevented Duplicate Events: Added useRef check in CheckoutSuccessView component and data validation in gaService to prevent double execution from React StrictMode

  • Maintained useEffect Approach: Kept useEffect in CheckoutView as alternative approaches didn't work consistently

  • Updated Tests: Comprehensive test coverage for all changes

Related Issues

Related Pull Requests

Checklist

  • Changes have been tested locally.
  • Unit tests have been written or updated as necessary.
  • The code adheres to the repository's coding standards.
  • Relevant documentation has been added or updated.
  • No new warnings or errors have been introduced.
  • SonarCloud issues have been reviewed and addressed.
  • QA Passed

Testing Process

GTM Task test video

Additional Notes

Need a new Env.variable

Don't miss a new drive-web release

NewReleases is sending notifications on new releases.