magento2
magento2 copied to clipboard
The Varnish configs do not strip Klaviyo marketing parameter
Preconditions (*)
- Any Magento version that includes a suggested Varnish VCL config.
- Using Varnish along with a VCL that is included with Magento.
- Usage of Klaviyo's marketing email services/modules.
Steps to reproduce (*)
- 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.
Expected result (*)
- The
_kx
parameter should be stripped, ensuring that visitors using links with the_kx
parameter are served the cached version of the requested page.
Actual result (*)
- Varnish does not strip the parameter, and since the value is unique per visitor, those requests will not match any hashes in Varnish's cache.
- This also results in additional PHP load due to the request needing to be processed by Magento.
Please provide Severity assessment for the Issue as Reporter. This information will help during Confirmation and Issue triage processes.
- [ ] Severity: S0 - Affects critical data or functionality and leaves users without workaround.
- [ ] Severity: S1 - Affects critical data or functionality and forces users to employ a workaround.
- [X] Severity: S2 - Affects non-critical data or functionality and forces users to employ a workaround.
- [ ] Severity: S3 - Affects non-critical data or functionality and does not force users to employ a workaround.
- [ ] Severity: S4 - Affects aesthetics, professional look and feel, “quality” or “usability”.
Hi @Gelmo. Thank you for your report. To speed up processing of this issue, make sure that you provided the following information:
- Summary of the issue
- Information on your environment
- Steps to reproduce
- Expected and actual results
Make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release
For more details, review the Magento Contributor Assistant documentation.
Add a comment to assign the issue: @magento I am working on this
To learn more about issue processing workflow, refer to the Code Contributions.
- Join Magento Community Engineering Slack and ask your questions in #github channel.
:warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting.
:clock10: You can find the schedule on the Magento Community Calendar page.
:telephone_receiver: The triage of issues 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.
:pencil2: Feel free to post questions/proposals/feedback related to the Community Contributions Triage process to the corresponding Slack Channel
@magento I am working on this
Hi @Gelmo! :wave:
Thank you for collaboration. Only members of Community Contributors Team are allowed to be assigned to the issue. Please use @magento add to contributors team
command to join Contributors team.
@magento add to contributors team
Hi @Gelmo! :wave: Thank you for joining. Please accept team invitation :point_right: here :point_left: and add your comment one more time.
@magento I am working on this
Hi @engcom-Dash. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
-
- Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
Details
If the issue has a valid description, the labelIssue: Format is valid
will be added to the issue automatically. Please, edit issue description if needed, until labelIssue: Format is valid
appears.
- Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).
-
- Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add
Issue: Clear Description
label to the issue by yourself.
- Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add
-
- Add
Component: XXXXX
label(s) to the ticket, indicating the components it may be related to.
- Add
-
- Verify that the issue is reproducible on
2.4-develop
branchDetails
- Add the comment@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure.
- If the issue is reproducible on2.4-develop
branch, please, add the labelReproduced on 2.4.x
.
- If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!
- Verify that the issue is reproducible on
- Join Magento Community Engineering Slack and ask your questions in #github channel.
Hi @Gelmo ,
We are trying to reproduce the issue in 2.4-develop instance but we are not able to reproduce. Steps We followed: 1.Install mAgento 2.Done Varnish Setup Configuration 3.Install Klaviyos Module 4.Integrate with magento from klaviyos 5.we are not able to integrate the module
Screenshots:
Still we are working in this module to reproduce the issue...we will reproduce the issue ASAP.
Let us know if we missing anything!!! Thanks!!!
@engcom-Dash Hello! How to move this issue from the ground? Can it be assigned to me to complete the rest of the required steps?
@magento I'm working on this
Hi @vasileuskidzmitry! :wave:
Thank you for collaboration. Only members of Community Contributors Team are allowed to be assigned to the issue. Please use @magento add to contributors team
command to join Contributors team.
@magento add to contributors team
Hi @vasileuskidzmitry! :wave: Thank you for joining. Please accept team invitation :point_right: here :point_left: and add your comment one more time.
@magento I'm working on this
I'm unable to edit the original comments to update steps so I will add them here.
Steps to reproduce (*)
- Use a VCL that is included with Magento.
- Read this article as confirmation that
_kx
parameter belongs to Klaviyo marketing campaigns - https://help.klaviyo.com/hc/en-us/articles/115005076767. - Switch Magento/Adobe Commerce to
developer
mode so theX-Magento-Cache-Debug
header is included in the response. - Visit any page (for instance the Home one) twice. Check that
X-Magento-Cache-Debug
containsHIT
value to confirm that the page is cached by Varnish. - Now add
_kx
parameter with some random unique value (Ex. https://yourdomain/?_kx=1) to the URL and visit it.
Expected Result
- When you visit the URL form point 5, you see
HIT
value in theX-Magento-Cache-Debug
, because_kx
is a marketing parameter that should be omitted. - Every time you change
_kx
to some new value, you seeHIT
anyway.
Actual Result
- You see
MISS
in that header. - Every time you change
_kx
to some new value, you seeMISS
anyway. A new cache entity is created in Varnish on every such request.
cc @engcom-Dash
Added new PR
cc @engcom-Bravo
I updated priority to p2, to make it similar to https://github.com/magento/magento2/pull/38302#event-11314093429
@ihor-sviziev Here is one another marketing system https://www.northbeam.io/ that uses its own marketing parameters (starting with "nb_"). Should I create a separate issue/PR for this or it could be done here or in #38302 ?
@vasileuskidzmitry I don't mind about any of these options.