amphtml icon indicating copy to clipboard operation
amphtml copied to clipboard

Strip cache specific query params from URLs for use by analytics

Open ericfs opened this issue 9 years ago • 6 comments

The URLs for the AMP Cache may have extra query parameters like amp_js_v that is not part of the original URL and are not needed for analytics.

Related internal issue: b/63635218

cc @dvoytenko

ericfs avatar Jul 25 '17 16:07 ericfs

Internal issue resolved. Closing this.

rudygalfi avatar Nov 13 '17 22:11 rudygalfi

@ericfs It seems like usqp param for the AMP Cache is still showing up - see #12137. Was the scope of work in this issue intended to remove it from appearing in AMP analytics variables like AMPDOC_URL?

rudygalfi avatar Nov 21 '17 17:11 rudygalfi

I'm not super familiar with the details of AMP analytics, but I think removing it from those variables makes sense. usqp is a parameter that is added by the viewer to communicate to the cache so it should not be propagated to any publisher facing analytics.

ericfs avatar Nov 21 '17 17:11 ericfs

I agree with the principle that viewer-specific variables should not get propagated through. Is usqp the only case (and we just didn't catch it / handle it) or are there others?

rudygalfi avatar Nov 21 '17 17:11 rudygalfi

Yeah it should be stripped same as amp_js param. One of the goals of the usqp is in fact to group multiple cache parameters in one, so that it's actually easier to handle.

Another one would be amp_lite I think.

flaviori avatar Nov 21 '17 17:11 flaviori

Yes, amp_js_v and amp_lite should be the only other ones. amp_js_v should already be stripped, not sure bout amp_lite.

ericfs avatar Nov 21 '17 17:11 ericfs