Repository navigation
fix: point the docs links to the current Optimole docs pages with UTMs - #1246
Merged
Merged
Conversation
The docs links used the old docs.optimole.com/article/ URLs. They redirect to the current pages, but the redirect drops the query string, so no UTMs reached the docs. One of them (AVIF) now ends on a 404. Adds Optml_Admin::docs_url() to build the final docs URL with tsdk_utmify(), and passes the Help tab and Watermark docs URLs to the dashboard app as docs_links. Part of Codeinwp/docs-site#1596. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Collaborator
pirate-bot
previously requested changes
Nov 19, 2026
Collaborator
There was a problem hiding this comment.
🟡 Changes requested
The dashboard links are fixed, but the readme and changelog still use old /article/ docs URLs that redirect.
readme.txt:37—correctnessreadme.txtstill links to old/article/docs URLs at lines 37, 63, 300, 304, 326 and 330.README.mdrepeats them on the same lines.CHANGELOG.mdhas more at lines 214-220, 334 and 805-806. These links go through the same redirect that drops the query string, so they cannot carry attribution. They also depend on redirects that can disappear, as/article/1943-avif-conversionalready did. Replace each one with its final docs path. For example, replace/article/1020-can-i-remove-the-blurry-placeholder-from-the-lazyload-effctwith/wordpress-plugin/lazy-load-generic-placeholder.
Validation details
- Files reviewed: 6/6 changed files. Feature-to-page mapping of the repointed links (a history question) stayed unchecked.
- PHPUnit
Test_Docs_Linksat HEAD (PHP 8.3, sandbox):cd /repo; set -o pipefail; timeout 280 vendor/bin/phpunit --do-not-cache-result --filter 'Test_Docs_Links::' 2>&1 | tee …printedOK (4 tests, 67 assertions)(run R3) - Against pr-base, the two string tests fail on the old
/article/URLs. The two helper tests error because the helpers are new. - All 39 new docs URLs return HTTP 200 without a redirect:
cd /workspace/checks/R1; curl -s -o /dev/null -m 15 -w 'probe %{http_code}\n' https://docs.optimole.com/ ; python3 -c " …(run R5, exit 0) - Every consumer renders the strings as HTML, so the
&fromesc_url()decodes in the link.
Untested areas
- Feature-to-page mapping of the repointed links: compared by curl, but the run was not recorded. Old and new slugs match except the three repoints the PR describes.
- No Jest test reaches the Help tab or the Watermark button. The PHP test covers the
docs_linkspayload. - No browser check of the rendered links.
- The variant pass did not settle these places, where the fixed cause may still reach:
inc/admin.php:802-823— unverified: Replacement producers pass section paths through tsdk_utmify; its installed implementation is absent, and final-destination redirect behavior was not checked. No remaining legacy l…
🤖 Automated review · run code-review-agent_6aff4140e6b743.26440645.
🤖 Review agent — review posted ✅ on 0a4d5063 · changes requested · 1 finding · 21 min
Run code-review-agent_6aff4140e6b743.26440645 · trail
25 links in the dashboard strings used target=”_blank” with curly quotes. The browser reads that as a window named ”_blank”, so every link opened in the same reused tab. 24 of them are the docs links changed here; the other is the plan quota notice. Part of Codeinwp/docs-site#1596. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
poonam279
dismissed
pirate-bot’s stale review
November 20, 2026 07:49
This is out of scope for this PR. This work covers the docs links shown inside the plugin's admin screens, where the utm_source=wpadmin UTMs fit. The readme links show on wordpress.org, not in wp-admin, and the changelog is history, so both are left out on purpose. The same applies to the other product PRs in Codeinwp/docs-site#1596.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Every docs link in the plugin uses an old HelpScout URL on docs.optimole.com (
/article/…). They redirect to the current pages, but the redirect drops the query string, so no UTMs reach the docs. One of them, the AVIF link, now ends on a 404. This is part of Codeinwp/docs-site#1596 (reviewing docs links in all products).This PR adds
Optml_Admin::docs_url( $path, $campaign, $medium ). It builds the final URL (https://docs.optimole.com/<path>) and adds the UTMs withtsdk_utmify():utm_source=wpadmin,utm_medium=<screen>,utm_campaign=<feature>. The dashboard's JavaScript can't call it, soOptml_Admin::get_dashboard_docs_links()passes the Help tab and Watermark URLs to the app asoptimoleDashboardApp.docs_links.utm_mediumsettingssettingsconnectdashboardhelpExample:
https://docs.optimole.com/wordpress-plugin/best-format?utm_source=wpadmin&utm_medium=settings&utm_campaign=best-format&utm_content=docsoptimolecomwordpress-pluginbest-formatLinks whose target changed:
/article/1943-avif-conversion(404)/wordpress-plugin/best-format, which covers AVIF/article/1171-gif-to-video-conversion, which redirects to the embedded videos page/wordpress-plugin/settings-reference(no GIF page exists)/article/1958-lazy-loading-behaviour/wordpress-plugin/bypass-lazy-load-for-first-images("Lazy loading behavior")The AVIF and GIF strings aren't shown by the dashboard today, nor are the noscript, first-images, loading method and offload info descriptions. They're updated anyway so no
/article/URL is left.The record of current vs new parameters for every product is in the docs-links report: https://claude.ai/artifact/TFrbebxm6kHNpJfb7GfzR2
Testing
tests/test-docs-links.php(4 tests):docs_url(), a settings description, that no dashboard string uses an/article/URL and every docs link has the UTMs, and thedocs_linkspassed to the app. All 4 fail on the old code and pass with the fix.developmentin the same environment (plusTest_Lazyload::test_dam_lazyloadingthere), so none come from this change.npm run build:dashboardcompiles.include()ofassets/build/*.asset.phpfiles that don't exist until the assets are built.🤖 Generated with Claude Code