301 and 302 redirects do not retain the UTM parameters.

Created on 2 April 2021, over 3 years ago
Updated 21 December 2023, 12 months ago

Problem/Motivation

Steps to reproduce

Proposed resolution

Add X-Acquia-Stripped-Query by default rather checking status code 301 and 302.

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇮🇳India milindk

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇳India Damodharan K Bangalore

    @milindk, I am trying to retrieve the utm parameters on 302 redirects. Patches did not work for me as well and my x-acquia-stripped-query header values were empty. The page cache was already prevented. Cache-Control: must-revalidate, no-cache, private. Any recommendations would be helpful.

  • 🇺🇸United States luke.leber Pennsylvania

    I believe that the decision to check for 301 or 302 is intentional here. The problem that this module is trying to solve is effectively one of data loss. When a redirect happens with certain marketing parameters, it's not present in the Location header of the redirect. On 2xx responses, no data is lost, so this module really doesn't have anything to do.

    It sounds like the use case described by this issue might be different than the one that the module intends to solve -- that the cache varies on *all* requests that contain parameters that might have been stripped. I could see this being a useful feature for use cases where sites provide different experience segments based on which campaign a user enters the site on.

    Overall, I think this might be more of a feature request than a bug report, honestly. I wouldn't close it as a wontfix, because there could be value in having this as a feature. Can it be re-triaged as a feature request instead?

    $.02 :-)

  • 🇮🇳India smitghelani Surat, Gujarat

    Same patch as #3, but for me it was not working with latest version 8.x-1.0. So, Adding refactored patch here.

Production build 0.71.5 2024