Automattic / Automattic/wp-super-cache

Tracking Parameters Causes Issue for Forms

Open
#855 1 comment 0 reactions 0 assignees View on GitHub
[Plugin] Super Cache
Dominant language
PHP
Stars
436
Forks
130
Avg merge
15h 11m
Merged PRs (30d)
10

Description

When Tracking Parameters is enabled and you go to a page that has not been cached and use any of the tracking paramters(ex. /?gclid=test&fbclid=test&utm_source=source-test). The page gets cache, which I guess is fine but if you have a form on the page(gravity forms in this case) you will see that the form action is cached as:

``

So when you go to / it delivers the cached page and the form has that action with the url parameters. This throw off tracking when the form is submitted, because it is including all of those parameters in the submission.

I thought maybe I also need to enabled the "Don’t cache pages with GET parameters. (?x=y at the end of a url)" setting. but when i do that it doesn't cache the pages with url parameters(ex. /?gclid=test&fbclid=test&utm_source=source-test) as expected but it also doesn't deliver a cached version of the page.

The ideal solution would be to not cache the page when those parameters are present, but serve up the cached page when they are. So we get a cached version delivered (to get the performance boos of caching) but with a "clean"(no url parameter info cached in page) page. But the url parameters are still there for the use analytics and other tracking solutions.

But with the current implementation of Tracking Parameters the feature is basically useless when forms are envolved.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue with Tracking Parameters enabled, a cache miss, and the example gclid, fbclid, and utm_source query parameters, using a page containing a Gravity Forms form. Trace how the cached page and form action are generated; done means cached delivery remains possible while the form action is clean and tracking parameters remain available for analytics.

Written by the indexing model from the issue text.

Assessment

Tech stack
php, wordpress
Domain
performance
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.