Skip to content

Conversation

sprankhub
Copy link
Member

@sprankhub sprankhub commented Sep 19, 2024

Description (*)

Add additional tracking parameters to the Varnish configuration, so that the same page will be cached independent of those tracking parameters.

Related Pull Requests

#38299
#38302

Fixed Issues (if relevant)

  1. Fixes Varnish configuration does not exclude all marketing parameters #38298
  2. Fixes The Varnish configs do not strip Klaviyo marketing parameter #35227

Manual testing scenarios (*)

  1. Open the Magento backend
  2. Open Stores > Configuration > Advanced > System > Full Page Cache
  3. Export the Varnish configuration
  4. Make sure the new tracking parameters are included

Questions or comments

Previous PRs have not been merged and not been updated. Hence, here is another try to get this over the line.

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)

Copy link

m2-assistant bot commented Sep 19, 2024

Hi @sprankhub. Thank you for your contribution!
Here are some useful tips on 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 Code Contributions documentation.
Join Magento Community Engineering Slack and ask your questions in #github channel.

@m2-community-project m2-community-project bot added Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: pending review labels Sep 19, 2024
@sprankhub
Copy link
Member Author

If you have doubts regarding the parameters, check https://github.com/mpchadwick/tracking-query-params-registry/blob/master/_data/params.csv, where all of them are mentioned including a reference.

@hostep
Copy link
Contributor

hostep commented Sep 19, 2024

It would be good to handle this PR together with #35228 (_kx is also referenced in that csv file)

@sprankhub
Copy link
Member Author

Thanks for the feedback, @hostep. I guess it would be easiest if I include the parameter here in this PR. Or should I try to cherry-pick that other commit to keep the author information? What do you think?

@hostep
Copy link
Contributor

hostep commented Sep 23, 2024

Yeah cherry-picking is probably the best, this PR has a lot more upvotes than the other and probably will be picked up sooner than the other, so having everything fixed in one PR is probably the fastest way to get everything in the core.

Gelmo and others added 2 commits September 23, 2024 08:53
- 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.
@sprankhub
Copy link
Member Author

I now cherry-picked the changes from #35228 and also applied the change to the Varnish 7 VCL.

Copy link
Contributor

@bgorski bgorski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great contribution, thanks! I don't think any tests are required in this case, since it's only about vcl file modifications, not about the core platform logic.

@engcom-Bravo
Copy link
Contributor

@magento run all tests

@engcom-Bravo
Copy link
Contributor

Hi @sprankhub ,

Thanks for the collaboration & contribution!

✔️ QA Passed

Preconditions:

  • Install fresh Magento 2.4-develop

Steps to reproduce

  • Open the Magento backend
  • Open Stores > Configuration > Advanced > System > Full Page Cache
  • Export the Varnish configuration
  • Make sure the new tracking parameters are included

Before: ✖️ 

Screenshot 2024-10-16 at 10 11 00

After: ✔️

Screenshot 2024-10-16 at 10 25 35

Builds are failed. Hence, moving this PR to Extended Testing.

Thanks.

@engcom-Charlie engcom-Charlie self-assigned this Oct 16, 2024
@engcom-Charlie
Copy link
Contributor

@magento run all tests

@Gelmo
Copy link
Member

Gelmo commented Oct 16, 2024

Cheers

@engcom-Charlie
Copy link
Contributor

@magento run Functional Tests B2B, Functional Tests EE

@engcom-Charlie
Copy link
Contributor

@magento run Functional Tests B2B

@engcom-Charlie
Copy link
Contributor

@engcom-Charlie
Copy link
Contributor

@magento run Functional Tests B2B

@engcom-Charlie
Copy link
Contributor

Few of the functional B2B test failures are not consistent and one of them is a known issue. Hence moving this PR in Merge in Progress now.

Run 1:
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/39188/924e8c6185564914f96a7e10bd139e31/Functional/allure-report-b2b/index.html#categories

image

Run 2:
https://public-results-storage-prod.magento-testing-service.engineering/reports/magento/magento2/pull/39188/25d25e585bd56bfa9186d36dc9d7a0fa/Functional/allure-report-b2b/index.html#categories

image

Known issues:
ACP2E-3314 - StorefrontPrintListItemsFromRequisitionListTest
ACQE-6402 - StorefrontVirtualQuotePurchaseOrderTest

@magento-devops-reposync-svc magento-devops-reposync-svc merged commit bb3efa8 into magento:2.4-develop Nov 1, 2024
10 of 12 checks passed
@sprankhub sprankhub deleted the add-tracking-params branch November 4, 2024 08:19
@ihor-sviziev ihor-sviziev linked an issue Nov 15, 2024 that may be closed by this pull request
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: ready for testing Project: Community Picked PRs upvoted by the community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Varnish configuration does not exclude all marketing parameters The Varnish configs do not strip Klaviyo marketing parameter
8 participants