Skip to content

Add Klaviyo query parameter to the list of stripped parameters in VCLs #35228

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

Closed
wants to merge 3 commits into from

Conversation

Gelmo
Copy link
Member

@Gelmo Gelmo commented Mar 25, 2022

Description (*)

  • Related to Issue The Varnish configs do not strip Klaviyo marketing parameter #35227
  • Klaviyo's emails include the _kx query parameter.
  • Klaviyo's services and modules are becoming more popular, so this query parameter should be stripped in the default Varnish configs provided with Magento.
  • This PR adds _kx to the list of stripped parameters in the VCLs for Varnish 4, 5, and 6.

Related Pull Requests

  • None

Fixed Issues (if relevant)

  1. Fixes The Varnish configs do not strip Klaviyo marketing parameter #35227

Manual testing scenarios (*)

  • Use a VCL that is included with Magento.
  • Send a marketing email via Klaviyo.
  • Watch varnishlog.
  • Visit the site using a link that is included in a Klaviyo-generated email.
  • Visit the site using a similar link that does not include the _kx query parameter.
  • Compare the results shown by varnishlog.
  • Without this change in place, the request with the _kx parameter is served an uncached page.
  • With this change in place, the request with the _kx parameter is served a cached page.

Questions or comments

  • Our company (JetRails) has several clients that utilize Klaviyo's services for sending marketing emails. We noticed that visitors who came to the site from those emails were being served uncached pages. The adjustment in this PR has successfully resolved this issue for our clients.
  • Klaviyo's services and modules are becoming more popular, so this query parameter should be stripped in the default Varnish configs provided with Magento.
  • Please list myself and JetRails as the contributors once this has been merged.

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All new or changed code is covered with unit/integration tests (if applicable)
  • README.md files for modified modules are updated and included in the pull request if any README.md predefined sections require an update
  • All automated tests passed successfully (all builds are green)

- Related to Issue magento#35227
- Klaviyo's emails include the `_kx` query parameter.
- Klaviyo's services and modules are becoming more popular, so this query parameter should be stripped in the default Varnish configs provided with Magento.
@m2-assistant
Copy link

m2-assistant bot commented Mar 25, 2022

Hi @Gelmo. Thank you for your contribution
Here are some useful tips how you can test your changes using Magento test environment.
Add the comment under your pull request to deploy test or vanilla Magento instance:

  • @magento give me test instance - deploy test instance based on PR changes
  • @magento give me 2.4-develop instance - deploy vanilla Magento instance

❗ Automated tests can be triggered manually with an appropriate comment:

  • @magento run all tests - run or re-run all required tests against the PR changes
  • @magento run <test-build(s)> - run or re-run specific test build(s)
    For example: @magento run Unit Tests

<test-build(s)> is a comma-separated list of build names. Allowed build names are:

  1. Database Compare
  2. Functional Tests CE
  3. Functional Tests EE,
  4. Functional Tests B2B
  5. Integration Tests
  6. Magento Health Index
  7. Sample Data Tests CE
  8. Sample Data Tests EE
  9. Sample Data Tests B2B
  10. Static Tests
  11. Unit Tests
  12. WebAPI Tests
  13. Semantic Version Checker

You can find more information about the builds here

ℹ️ Run only required test builds during development. Run all test builds before sending your pull request for review.

For more details, review the Magento Contributor Guide documentation.

⚠️ According to the Magento Contribution requirements, all Pull Requests must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.

🕙 You can find the schedule on the Magento Community Calendar page.

📞 The triage of Pull Requests happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.

✏️ Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel

@Gelmo
Copy link
Member Author

Gelmo commented Mar 25, 2022

I am discussing the CLA with my employer, and I will re-create the PR as advised once the CLA has been read and signed.

@sdzhepa sdzhepa added the Priority: P3 May be fixed according to the position in the backlog. label Apr 14, 2022
@dzmitry-vasileuski
Copy link

Hello @sdzhepa!
Could you please advise how to get this pull request and ticket off the ground?
I can take it upon myself and complete all the required steps.

@dzmitry-vasileuski
Copy link

@magento run all tests

Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@dzmitry-vasileuski
Copy link

@magento run Functional Tests CE

Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@dzmitry-vasileuski
Copy link

@magento run Sample Data Tests CE, Sample Data Tests EE, Sample Data Tests B2B, Functional Tests CE

Copy link

The requested builds are added to the queue. You should be able to see them here within a few minutes. Please message the #magento-devops slack channel if they don't show in a reasonable amount of time and a representative will look into any issues.

@ihor-sviziev ihor-sviziev changed the title Issue #35227 - Add Klaviyo's query parameter to the list of stripped parameters in VCLs Add Klaviyo query parameter to the list of stripped parameters in VCLs Jan 3, 2024
@m2-community-project m2-community-project bot added the Priority: P2 A defect with this priority could have functionality issues which are not to expectations. label Jan 3, 2024
@ihor-sviziev ihor-sviziev removed the Priority: P3 May be fixed according to the position in the backlog. label Jan 3, 2024
@engcom-Delta engcom-Delta added Progress: testing in progress Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it and removed Progress: ready for testing labels Jan 4, 2024
@Priyakshic Priyakshic added the Project: Community Picked PRs upvoted by the community label Oct 15, 2024
@engcom-Dash engcom-Dash self-assigned this Oct 16, 2024
@engcom-Dash
Copy link
Contributor

@magento run all tests

@engcom-Dash
Copy link
Contributor

Hi @Gelmo ,

Thanks for the collaboration & contribution!

✔️ QA Passed
Preconditions:

Install fresh Magento 2.4-develop
Steps to reproduce

Before: ✖️

  • Each request with the _kx parameter was served as uncached.

After: ✔️

  • Each request with the _kx parameter is served from cache.

Got the green build, so moving it to merge in progress.

@hostep
Copy link
Contributor

hostep commented Oct 16, 2024

@engcom-Dash: it's probably better to continue with #39188 instead, as that one contains the fix from here + a bunch of other extra parameters. The commit from this PR got cherry picked so the author is kept in git history.
Also, the varnish7.vcl file didn't get updated in this PR, while it did get updated in the other one.

@engcom-Dash
Copy link
Contributor

Hello @Gelmo,

Thanks for your contributions.

As per #35228 (comment), we are putting this PR on hold since the changes have been cherry-picked into another PR with some additional code changes. We will update you here once the other PR is merged.

Thanks!

@ihor-sviziev
Copy link
Contributor

Hi @Gelmo,
Thank you so much for your contribution!

I see that #39188 was already merged, and it contained a cherry-picked commit from this PR (a3b85c9).

Since all changes have already been merged, I'm closing this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: PageCache Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Project: Community Picked PRs upvoted by the community Release Line: 2.4 Triage: Dev.Experience Issue related to Developer Experience and needs help with Triage to Confirm or Reject it
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The Varnish configs do not strip Klaviyo marketing parameter
10 participants