Fix application_store_snapshot
event not showing up in Tracks
#10575
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.
Part of #10574
Why
Even though we implemented the Tracks event
application_store_snapshot
in #10484, we didn't see any events in Tracks after a day of release.After a deeper look, I found a silent validation error on the event properties because the property name can only contain alpha characters and underscores while the payment gateway properties have
-
:Custom properties dictionary keys must contain alpha characters and underscores only.
Validation errors like this aren’t logged to the console at all, and were missed during development/review. I'm also looking into the validation error logging issue in Automattic/Automattic-Tracks-iOS#262.
How
The event properties are fixed by replacing
-
with_
in payment gateway event properties in the snapshot event.Testing instructions
🔵 Tracked application_store_snapshot
AND it should also get sent in the Tracks POST request after a bit. You can check the Tracks POST request body in the Menu tab > Settings > Launch Wormholy Debug, and search fortracks/record
POST requests and findapplication_store_snapshot
in the request bodyRELEASE-NOTES.txt
if necessary.