Repository navigation
Declare every GoDAM browser item correctly to the WP Consent API - #2394
Conversation
- Each item in get_storage_items() now names its category and type, the way GoDAM for Woo does. - godamLayerInteractions is declared as SESSIONSTORAGE: utils/storage.js keeps the layer buffer per tab. It was declared as LOCALSTORAGE, so consent banners listed it wrongly. - The test checks the type of each item.
- The Fluent Forms, Ninja Forms and Everest Forms recorder links (godam-*-recorder-data), the recorder's upload state (uppyState:*) and LifterLMS video progress (godam_llms_video_progress_*) were kept in local storage but never declared. They are now listed as functional. - The suggested privacy policy text stays about analytics: it lists only the statistics items, since it says those wait for consent.
- map-tracking.js keeps godam-map-session-<jobId> in session storage to group one view's milestones. It was never declared; it is now listed as marketing, since it only runs with a connected Marketo or HubSpot account. - This only declares it. Gating the script on Track visitors and consent is left for a follow-up.
🔍 WordPress Plugin Check Report
📊 Report
|
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
mismatched_plugin_name | Plugin name "GoDAM - Video Hosting for LMS & Online Courses" is different from the name declared in plugin header "GoDAM". |
0 |
readme_parser_warnings_trimmed_section_description | The "Description" section is too long and was truncated. A maximum of 2500 characters is supported. |
📁 inc/classes/class-media-library-ajax.php (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
1643 |
WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound | Hook names invoked by a theme/plugin should start with the theme/plugin prefix. Found: "max_srcset_image_width". |
📁 assets/build/pages/video-editor.min.js (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
2 |
react_removed_api | This file calls "ReactDOM.findDOMNode", which was removed in React 19 and stops working once WordPress upgrades React. Use a ref on the element instead. |
📁 assets/build/css/main.css (1 warning)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
EnqueuedStylesScope | This style is being loaded in all contexts. |
📁 assets/src/libs/analytics.min.js (5 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
EnqueuedScriptsScope | This script is being loaded in all frontend contexts. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880 (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/2026/11/19/hello-world/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/sample-page/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/demo-attachment-post/ (with handle analytics-library) is loaded in the footer. Consider a defer or async script loading strategy instead. |
📁 assets/build/js/main.min.js (5 warnings)
| 📍 Line | 🔖 Check | 💬 Message |
|---|---|---|
0 |
EnqueuedScriptsScope | This script is being loaded in all frontend contexts. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880 (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/2026/11/19/hello-world/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/sample-page/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
0 |
NonBlockingScripts.NoStrategy | This script on http://localhost:8880/demo-attachment-post/ (with handle rtgodam-script) is loaded in the footer. Consider a defer or async script loading strategy instead. |
🤖 Generated by WordPress Plugin Check Action • Learn more about Plugin Check
It goes straight into the 2.11.0 release, after the version bump.
Code review — consent declarationsHigh-effort pass over the diff ( 1.
|
- With the WP Consent API active, collectVisitorIds() returns nothing until wp_has_consent( 'marketing' ) is true, so no view is sent and no godam-map-session-* is written for a visitor who hasn't accepted marketing. It's read on every milestone, so accepting mid-view still carries the rest of the view. - Without the WP Consent API nothing changes. - This matches the item's declaration as marketing (review point 1).
- The suggested text listed only the analytics items, so a site sending video views to Marketo or HubSpot published an incomplete disclosure. - It now has a paragraph, marked for sites connected to Marketo or HubSpot, that says what is sent, names godam-map-session-<video> and says it waits for marketing consent (review point 3).
The test keyed the calls by name, so a name registered twice would still pass. It now checks the number of calls too (review point 4).
Uppy's Golden Retriever keeps the recording itself in the uppy-blobs IndexedDB database for 10 minutes, next to the uppyState:* key. It is now declared as functional, with type INDEXEDDB (review point 5).
The recorder items had no personal data label, so consent banners said they held none. The form recorder links, the Uppy state and the IndexedDB store now say they hold the visitor's unsent recording (review point 6).
Develop-bound PRs don't regenerate languages/godam.pot: it conflicts with other branches, and the POT check only runs on PRs into main. This reverts 6cabe04 (review point 2).
|
Thanks @KMchaudhary, all six addressed, one commit each:
|
What and why
Three small 2.11.0 QA fixes, for release ticket rtCamp/godam-plugin-wp#112, from QA's pre-release review (items 3, 4 and 5), plus the points from code review. All are about what GoDAM tells the WP Consent API it keeps in the visitor's browser, which consent banners show in their cookie tables.
Wrong storage type (item 3). Every item was declared as
LOCALSTORAGE, butgodamLayerInteractionslives in session storage (utils/storage.js). Each item now names its owntypeandcategory, the way GoDAM for Woo 2.5.1 already does.Undeclared functional items (item 5). The Fluent Forms, Ninja Forms and Everest Forms recorder links (
godam-*-recorder-data), the recorder's Uppy state (uppyState:*) and its IndexedDB store (uppy-blobs), and LifterLMS video progress (godam_llms_video_progress_*) were never declared. They are now listed asfunctional, and the recorder items say they hold the visitor's unsent recording.Marketo/HubSpot session (item 4).
godam-map-session-<jobId>is declared asmarketing, andmap-tracking.jsnow honours that: with the WP Consent API active, no view is sent and no session is written until the visitor accepts marketing. The suggested privacy text gets a paragraph for sites connected to Marketo or HubSpot.Where to look
Per-item type and category (
inc/classes/class-visitor-consent.php,get_storage_items()andregister_cookie_info())Check: the three analytics items keep
statistics; onlygodamLayerInteractionschanges type, toSESSIONSTORAGE.Open question for review: the WP Consent API documents
$typeas one ofHTTP,LOCALSTORAGEorAPI, and stores any other value as given. This PR usesSESSIONSTORAGE(as GoDAM for Woo 2.5.1 does) andINDEXEDDB, so banners show where each item really lives. If we'd rather stay inside the documented values, both becomeLOCALSTORAGEand the expiry text carries the difference.Marketing consent gate (
assets/src/js/godam-player/map-tracking.js,marketingConsentWithheld()andcollectVisitorIds())Check: with no ids,
report()neither mints the session ID nor sends. It's read on every milestone, so accepting marketing mid-view carries the rest of the view. Without the WP Consent API nothing changes.Privacy policy text (
get_privacy_policy_content())Check: the item list still holds only the three analytics items, since it says they wait for statistics consent. A new paragraph, marked "Only if GoDAM is connected to Marketo or HubSpot", covers the Marketo/HubSpot flow.
Everything else is mechanical: the new items' descriptions and the updated tests. The POT isn't regenerated here; it's done on the PR into main.
UI evidence
No visible change in GoDAM. With the WP Consent API and a supporting banner, the banner's cookie table lists 10 GoDAM items with their real category and type. I couldn't take screenshots because the local site wasn't running when this PR was raised.
How to test
wp_get_cookie_info()(or the banner's cookie list): 10 GoDAM items, with the categories and types inget_storage_items().godam/v1/map-eventsand nogodam-map-session-*is in session storage. Accept marketing and keep watching: milestones are sent.VisitorConsentTestpasses (13 tests, 65 assertions), the godam-player JS tests pass (562), and PHPCS is clean.Risk
risk: low: the declarations change what banners show, and the one behaviour change only stops Marketo/HubSpot milestones for visitors who haven't accepted marketing on a WP Consent API site.