Repository navigation
fix: point docs links to current pages and track them with UTMs - #1404
Conversation
Part of Codeinwp/docs-site#1596. Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was a problem hiding this comment.
🔵 Needs a closer look
QA check: The code checks found no defect, but nobody clicked the new docs links in a running site.
Validation details
- Files reviewed: 8/8 changed files.
tsdk_utmify( $url, $area, $location )exists in the locked themeisle-sdk 3.3.69. Every new call uses that argument order.add_query_argkeeps the existing?query=<type>on the chart-type link.- The Pro upsell filter callback prints the URL with
esc_url. - The three changed constants match the static-analysis stubs.
- These checks read source only. No code ran.
QA steps
- Open a chart in the editor, then open the Help tab. Click "Main documentation page", "Custom code snippets" and "Articles containing …". Each link opens the Visualizer docs, and the address bar shows
utm_source=wpadmin. - In the data source panel, click the Google Spreadsheet link, the JSON tutorial link, the JSON headers link and the database sample-query link. Each opens its docs page with UTM values in the address.
- On the free plan, click Documentation in the Permissions, WordPress and Database upsell boxes. Each opens its docs page.
- Go to Settings, then Manual configuration, and click "Common Snippets" on a Google chart and on a ChartJS chart. Each opens the manual configuration page.
- In a series' settings, click the second "here" link. The series roles page opens.
- On the Plugins page, click Docs under Visualizer. On the Visualizer Support page, click both Documentation links. Each opens the docs with UTM values.
- With a non-English site language, open Import from JSON. Check that the description shows a working "this" link.
Untested areas
- No browser check ran, because no site was set up.
- The SDK is not installed locally, so the
tsdk_utmifyoutput was not run. - The Pro add-on is outside the repository. Its use of the upsell URL is unverified.
🤖 Automated review · run code-review-agent_6ae9b37a3548e5.84968643.
🤖 Review agent — review posted ✅ on 93b02aae · commented · 0 findings · 10 min
Run code-review-agent_6ae9b37a3548e5.84968643 · trail
|
Tested build 93b02aa (4.0.10-dev.ce0354d) on Visualizer 4.0.8 (free). ✅ The Plugins row "Docs", the Support page links, the chart editor's Documentation group, the data source links (Google Spreadsheet, JSON, JSON headers, DB sample queries), the WordPress/Database/Permissions "Documentation" buttons and the series role link all point to ❌ ChartJS chart → Manual Configuration → "Common Snippets" now opens a 404. The server sends the right URL: But the editor shows: Cause: Possible fix: apply the replace only to the Google API link, e.g. target |
frame.js replaced the first "?" in every span.viz-gvlink to put the chart type into the Google API link. On ChartJS charts that "?" is the start of the Common Snippets UTM query string, so the link became a 404. It also copied the first span's HTML into all of them, so on Google charts the Manual Configuration box showed the Data Filter text. Now only the Google API link's href is updated. Adds e2e checks for both libraries. Part of Codeinwp/docs-site#1596. Co-Authored-By: Claude Opus 5.5 <[email protected]>
|
Fixed in a7af6d1: |
There was a problem hiding this comment.
🟡 Changes requested
The chart editor links now work and carry UTMs. Update the old docs addresses that both readme files still use.
readme.txt:22—correctnessreadme.txtandreadme.mdstill link the docs through 17 old HelpScout addresses each (line 22/collection/1560-visualizer-charts-and-graphs, lines 168-227/article/<n>-...). The PR says it points every docs link at its current page. These links still go through the redirect and carry no UTM values, so WordPress.org docs visits stay unattributed. Line 24 already tags a static link withutm_source=wordpressorg&utm_medium=readme. Replace each address in both files with its currentdocs.themeisle.com/visualizer-charts-and-graphs/...page. Add literal UTM values for the readme origin, like line 24.
Validation details
- Files reviewed: 10/10 changed files.
- The new e2e spec passes at HEAD in a local WordPress site with Chromium
cd /repo && export WP_BASE_URL=http://localhost:8080 WP_USERNAME=admin WP_PASSWORD=admin WP_ARTIFACTS_PATH=/workspace/ch…printed2 passed(run R18). - The same spec fails with the old
js/frame.js[R19] and atpr-base[R20]. It detects the change. - The rendered hrefs were captured on the Plugins page, the Support page, and the Google and ChartJS editors [R27] [R29] [R30] [R34]. Each one matches the PR table, and none is double-escaped.
- The prior run code-review-agent_6ae9b37a3548e5.84968643 checked the
tsdk_utmifysignature and the upsell escaping in source. These checks were not rerun.
Untested areas
- Only the pie chart ran through the chart type link rewrite in a browser.
- The editor after Create Chart was not captured.
- The Pro add-on use of the upsell URL is outside the repository.
🤖 Automated review · run code-review-agent_6af1b84a009682.12408533.
🤖 Review agent — review posted ✅ on a7af6d17 · changes requested · 1 finding · 14 min
Run code-review-agent_6af1b84a009682.12408533 · trail
Summary
This is part of Codeinwp/docs-site#1596 (reviewing docs links in all products). Visualizer links to the docs from the chart editor, the Plugins page and the Support page. Twelve of the links use old HelpScout addresses on docs.themeisle.com (
/article/728-manual-configuration,/category/657-visualizer, …). They reach the right page through a redirect, but the redirect drops the query string. None of the docs links send UTM parameters anyway, so docs visits from the plugin aren't attributed in analytics.This PR:
docs.themeisle.com/visualizer-charts-and-graphs/(no redirect). This includes the URL constants inindex.php(VISUALIZER_DB_QUERY_DOC_URL,VISUALIZER_MAIN_DOC,VISUALIZER_CODE_SNIPPETS_URL) and their copies in the static-analysis stubs.tsdk_utmify()andesc_url()where it's printed. The constants stay plain URLs, so each place that showsVISUALIZER_MAIN_DOCgets its own values.visualizer_pro_upsellfilter, which already escapes it.%1$s/%2$splaceholders like the other descriptions inLayout.php.Links changed
?query=<type>)The record of current vs new parameters for every product is in the docs-links report: https://claude.ai/artifact/TFrbebxm6kHNpJfb7GfzR2
Not changed, for the team to decide
VISUALIZER_DOC_COLLECTION) adds?query=<type>to the docs hub. The docs site doesn't read that parameter, so the link opens the hub without a search. It works and is now tracked. Renaming the link or pointing it elsewhere is a product decision.Will affect visual aspect of the product
NO. Only the link addresses change.
Test instructions
utm_source=wpadminin the address bar.Testing done
phpcsandphpstanreport the same findings on the changed files before and after (none new).tsdk_utmify()on every new link: each returns 200 on docs.themeisle.com with no redirect, and the UTM parameters stay in the URL.Part of Codeinwp/docs-site#1596.
🤖 Generated with Claude Code