You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a2cdc59
Browse filesBrowse the repository at this point in the historyBrowse files
Release 2.5.15 — sanitized sync (page-context tracking and save-test prune)
Port signed public page_context tokens, selector-proxy redirect lock-down,
and deferred variant pruning from ElementTest-WP 2.5.14 while keeping Doug
Wagner authorship and this repository as the update source.
Co-authored-by: Cursor <cursoragent@cursor.com>
Copy file name to clipboardExpand all lines: CHANGELOG.md
+8Lines changed: 8 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,14 @@
2
2
3
3
`readme.txt` remains the canonical WordPress.org release history for this plugin. This file mirrors the shipped release notes in a GitHub-friendly format.
4
4
5
+
## 2.5.15
6
+
7
+
> Public tracking page-context hardening and selector-proxy redirect lock-down, plus admin save-test variant prune reorder so goal validation failures cannot delete variants. Ported from ElementTest-WP 2.5.14 (PRs #7 and #11). JS `VERSION` synced to 2.5.15.
8
+
9
+
- Fix: **Signed `page_context` tokens** for public assignment, impression, and conversion writes. PHP embeds a signed token (test ID, server-observed URL, expiry) in localized payloads; the frontend sends it on tracking calls. Public write endpoints verify the token and scope writes to the rendered page. Pageview conversions are matched against the stored goal trigger instead of posted `page_url`.
- Fix: **Variant pruning deferred** until after conversion-goal validation and persistence in `save_test()`, so a failed goal save cannot delete omitted variants.
12
+
5
13
## 2.5.14
6
14
7
15
> Plugin author set to Doug Wagner. JS `VERSION` synced to 2.5.14.
Copy file name to clipboardExpand all lines: README.md
+42Lines changed: 42 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,8 +25,50 @@ Ready-to-install zip builds are published on [GitHub Releases](https://github.co
25
25
- Performance analytics with statistical significance
26
26
- Schedule-based test start/stop
27
27
- Export reports as standalone HTML (with Chart.js visual dashboard), CSV, or JSON via admin UI or WP-CLI
28
+
- Admin-only forced-variant preview URLs for QA
29
+
- WP-CLI repair command for legacy JS/CSS variant source mangling
28
30
- Optional GA4 custom event forwarding for variant conversions (fires `elementtest_converted` to your existing `gtag` tag in parallel with the plugin's DB tracking)
29
31
32
+
## Developer and QA Workflows
33
+
34
+
### Previewing a specific variant as an admin
35
+
36
+
Logged-in admins can force the frontend assignment endpoint to return a specific variant for visual QA without waiting on random traffic allocation:
-`control` selects the control variant for every running test on the page.
44
+
- A numeric value selects the matching `wp_elementtest_variants.variant_id` for that test.
45
+
- The override is gated by `current_user_can( 'manage_options' )`; anonymous visitors and non-admin users ignore the query parameter and stay on the normal weighted assignment path.
46
+
- The request still goes through `elementtest_get_variant_assignment`, page-scope validation, the normal `elementtest_variant_<test_id>` browser cookie, and the HttpOnly assignment-proof cookie. Use a clean browser/profile when you need to test organic random assignment after forcing variants.
47
+
- Production admin preview traffic can still create impressions through the normal tracking flow. Prefer staging for repeated QA passes, or account for admin visits when reviewing report data.
48
+
49
+
### Repairing pre-2.4.2 JS/CSS variant source
50
+
51
+
Before 2.4.2, variant `changes` were sanitized with `wp_kses_post()` regardless of test type. For `js` and `css` tests this could encode operators and selectors (`>=` to `>=`, `&&` to `&&`, `.a > .b` to `.a > .b`) so variants either threw JavaScript syntax errors or CSS silently failed to match.
52
+
53
+
Use the WP-CLI repair command to inspect and optionally decode affected rows:
54
+
55
+
```bash
56
+
# Dry-run scan of all JS/CSS variants. No database writes.
57
+
wp elementtest fix-variant-changes
58
+
59
+
# Show compact diffs for JavaScript variants only.
0 commit comments