Repository navigation
[MKT-1057]fix/no purchase event triggered when new user purchase - #2183
Merged
Merged
Conversation
Deploying drive-web with
|
| Latest commit: |
a765433
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://ed0e682a.drive-web.pages.dev |
| Branch Preview URL: | https://fix-google-tracking-problem-i414.drive-web.pages.dev |
internxt-yu
marked this pull request as ready for review
September 25, 2026 12:22
internxt-yu
requested review from
a team,
CandelR,
larryrider and
xabg2
as code owners
September 25, 2026 12:22
internxt-yu
added this pull request to stack #2197
September 30, 2026 16:04
CandelR
reviewed
Oct 1, 2026
internxt-yu
force-pushed
the
fix/google-tracking-problem
branch
from
October 1, 2026 12:55
e1f2ef6 to
1f9c198
Compare
internxt-yu
force-pushed
the
fix/google-tracking-problem
branch
2 times, most recently
from
October 2, 2026 09:52
9097bf7 to
e066f0c
Compare
CandelR
approved these changes
Oct 2, 2026
internxt-yu
force-pushed
the
fix/google-tracking-problem
branch
from
October 5, 2026 07:04
e066f0c to
a765433
Compare
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Description
We noticed that lot of purchase tracking event didn't arrive to Google Analytics and Google ads. After investigation i see that in the checkout page, the build-in Signup function clears all localStorageItems including which are needed for sending the purchase tracking event, so this event is not triggered with the following warning.

The change was when in sigunup calls clear which remove allo localstorageItems, replace it with a clearExcept function that leaves the needed items for tracking, and remove them when the tracking events are sent.
And also when user already is logged in a account, if they want to change a account in purchase page, the onLogout also clears all the localstorage, so i included the change in onLogOut as well.
Related Issues
Related Pull Requests
Checklist
Testing Process
The test process was:
https://fix-google-tracking-problem-i414.drive-web.pages.dev/checkout?planId=<price_id>&couponCode=<couponCode>, replacing the price_id and couponCode with one available in the Stripe.
Using preview mode in Google Tag Manager and Debug View in Google analytics we can see the signup and purchase event arriving:


Additional Notes