-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A4A: Update page view tracker to split base path and query parameters. #95346
base: trunk
Are you sure you want to change the base?
Conversation
Jetpack Cloud live (direct link)
Automattic for Agencies live (direct link)
|
This PR modifies the release build for the following Calypso Apps: For info about this notification, see here: PCYsg-OT6-p2
To test WordPress.com changes, run |
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~187 bytes added 📈 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
It works as expected!
Thanks for the update, @jkguidaven! I'm not sure if we need to add the URL parameters as separate event properties. Unless you see a clear need for that. I don't feel that strongly against having them though, I just wouldn't want to make the events to noisy in the case that many requests using parameters start coming through. I'm curious if @simonktnga8c and any thoughts on if having those separate event properties would be useful at all at this point. |
…s and path to only include base path.
I discussed this with @jkguidaven on Slack. My recommendation is to keep setting the "ref" property for the event if there is a URL parameter but not create any other properties from other parameters (this could be a security issue). |
4742958
to
cd23cd9
Compare
@simonktnga8c @travisw Thank you for your feedback. I've implemented changes based on your comments. The PR no longer parses the query parameters and attaches them as properties due to security concerns. Additionally, we explicitly track the ref URL parameter on the Signup page, as discussed with Simon. |
This PR enhances our page view tracking by separating the base path from query parameters, ensuring accurate grouping of page views by the base path.
Closes https://github.com/Automattic/automattic-for-agencies-dev/issues/1249
Proposed Changes
A4APageViewTracker
to separate the query parameters from the base path during page view tracking.Why are these changes being made?
To prevent duplicate track event names on the same page, ensure that the submitted path excludes query parameters, treating it as a single entity.
Testing Instructions
/signup?ref=wordpress.com
page..gif
and looking for requests like the one below.Pre-merge Checklist