Skip to content

Update documentation links for Proactive User Enhancement/Email Reporting links #12327

@tofumatt

Description

@tofumatt

Feature Description

Further to this Slack thread and this discussion, all documentation/support links for Email Reporting/Proactive User Enhancement need to be updated with actual links instead of placeholder support links.

Complete Link Inventory

All learn more, get help, and documentation links across the PUE/Email Reporting feature:

Frontend — Admin UI

# Location Link text Current destination Target destination Action Source
1 Admin Settings toggle description "Learn more" ?doc=email-reporting ?doc=email-reporting No change (remove TODO comment) SettingsEmailReporting.js#L175-L189
2 Admin Settings disable modal "Learn more" ?doc=email-reporting ?doc=email-reporting No change (remove TODO comment) SettingsEmailReporting.js#L264-L276
3 Invite others tooltip — "dashboard sharing" link "dashboard sharing" ?doc=dashboard-sharing ?doc=dashboard-sharing No change InviteOthersToSubscribe/index.js#L115-L117
4 Invite others tooltip — "Learn more" link "Learn more" ?doc=email-reporting ?doc=email-reporting-inviting-others Update InviteOthersToSubscribe/index.js#L119-L121
5 SetupAnalyticsNotice (side panel + settings) "Learn more" ?doc=ga4 ?doc=ga4 No change SetupAnalyticsNotice.js#L112-L114
6 ReportErrorNotice (SC/GA4 data errors) "Get help" ?doc=email-reporting ?doc=email-reporting-module-issues Update ReportErrorNotice.js#L53-L55
7 PermissionsErrorNotice (SC/GA4 permissions) "Get help" ?error_id={moduleSlug}_insufficient_permissions ?error_id={moduleSlug}_insufficient_permissions No change PermissionsErrorNotice.js#L53-L57
8 SendingErrorNotice (email delivery failures) — (none) ?doc=email-reporting-deliverability-issues Add link SendingErrorNotice.js#L43-L56
9 CronSchedulerErrorNotice (WP-Cron issues) — (none) ?doc=email-reporting-scheduler-issues Add link CronSchedulerErrorNotice.js#L43-L56
10 ServerErrorNotice (server errors) — (none) ?doc=email-reporting-server-issues Add link ServerErrorNotice.js#L43-L56

Backend — Email Templates

All email types (report, subscription confirmation, invitation, error) now use a single simple email template with a shared footer rendered by parts/footer.php.

# Email type Link location Link text Current destination Target destination Action Source
11 All emails (shared footer) Footer "Help center" ?doc=get-support ?doc=get-support No change parts/footer.php#L59-L62
12 Report email — Analytics Setup notice In-email notice "Learn more" ?doc=ga4 ?doc=ga4 No change Analytics_Setup_Email_Notice.php#L166-L167
13 Report email — Enable Conversion Events notice In-email notice "Learn more" ?doc=key-metrics ?doc=key-metrics No change Enable_Conversion_Events_Email_Notice.php#L204-L205
14 Subscription confirmation email Body "Learn more" Hardcoded https://sitekit.withgoogle.com/documentation/email-reports/ ?doc=email-reporting (via support redirect) Update Email_Template_Formatter.php#L395
15 Invitation email Inline in body "Learn more" Hardcoded https://sitekit.withgoogle.com/documentation/email-reports/ ?doc=email-reporting (via support redirect) Update REST_Email_Reporting_Controller.php#L583
16 Error email — SC report error Inline in body "get help" ?doc=email-reporting ?doc=email-reporting-module-issues Update Batch_Error_Notifier.php#L321-L328
17 Error email — GA4 report error Inline in body "get help" ?doc=email-reporting ?doc=email-reporting-module-issues Update Batch_Error_Notifier.php#L330-L337
18 Error email — SC permissions error Inline in body "get help" ?doc=email-reporting ?error_id=search-console_insufficient_permissions Update Batch_Error_Notifier.php#L339-L344
19 Error email — GA4 permissions error Inline in body "get help" ?doc=email-reporting ?error_id=analytics-4_insufficient_permissions Update Batch_Error_Notifier.php#L339-L344
20 Error email — server/fallback error Body (no link) No change (no placeholders in Content_Map body) Content_Map.php#L136-L138

Doc Key Mapping

Note: some of these keys may not be used in the final docs.

Key Type Usage
email-reporting ?doc= Admin Settings toggle, subscription confirmation email, disable modal
email-reporting-module-issues ?doc= ReportErrorNotice "Get help", error email inline "get help" for report errors
email-reporting-inviting-others ?doc= InviteOthersToSubscribe tooltip "Learn more"
email-reporting-deliverability-issues ?doc= SendingErrorNotice
email-reporting-scheduler-issues ?doc= CronSchedulerErrorNotice
email-reporting-server-issues ?doc= ServerErrorNotice
search-console_insufficient_permissions ?error_id= PermissionsErrorNotice (frontend), error email inline "get help" for SC permissions errors
analytics-4_insufficient_permissions ?error_id= PermissionsErrorNotice (frontend), error email inline "get help" for GA4 permissions errors

Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • All support documentation links within the Email Reporting feature should link to one of the above doc key maps across:
    • Plugin components
    • Email templates

Implementation Brief

Frontend: Admin Settings

  • Update file assets/js/components/settings/SettingsEmailReporting.js
    • Remove the TODO comment on line 264 (/** TODO update learn more link when it is provided. */) since the email-reporting doc key is now the intended destination

Frontend: Invite Panel

  • Update file assets/js/components/email-reporting/InviteOthersToSubscribe/index.js
    • Change getDocumentationLinkURL( 'email-reporting' ) (line 120) to getDocumentationLinkURL( 'email-reporting-inviting-others' )

Frontend: Error Notices (side panel + admin settings)

  • Update file assets/js/components/email-reporting/notices/errors/ReportErrorNotice.js

    • Change getDocumentationLinkURL( 'email-reporting' ) to getDocumentationLinkURL( 'email-reporting-module-issues' )
  • Update file assets/js/components/email-reporting/notices/errors/SendingErrorNotice.js

    • Import useSelect and CORE_SITE
    • Add getDocumentationLinkURL( 'email-reporting-deliverability-issues' ) selector
    • Add useNotificationEvents tracking (import already present)
    • Add a dismissButton with "Get help" label linking to the doc URL (follow ReportErrorNotice.js pattern)
  • Update file assets/js/components/email-reporting/notices/errors/CronSchedulerErrorNotice.js

    • Import useSelect and CORE_SITE
    • Add getDocumentationLinkURL( 'email-reporting-scheduler-issues' ) selector
    • Add a dismissButton with "Get help" label linking to the doc URL
  • Update file assets/js/components/email-reporting/notices/errors/ServerErrorNotice.js

    • Import useSelect and CORE_SITE
    • Add getDocumentationLinkURL( 'email-reporting-server-issues' ) selector
    • Add a dismissButton with "Get help" label linking to the doc URL

Backend: Email Templates

All email types now use a single simple email template with a shared footer in templates/parts/footer.php. Footer "Help center" link (?doc=get-support) is hardcoded in the shared footer — no changes needed there.

  • Update file includes/Core/Email_Reporting/Email_Template_Formatter.php

    • In prepare_subscription_confirmation_template_data() (line 395), replace hardcoded 'https://sitekit.withgoogle.com/documentation/email-reports/' with add_query_arg( 'doc', 'email-reporting', 'https://sitekit.withgoogle.com/support/' )
  • Update file includes/Core/Email_Reporting/REST_Email_Reporting_Controller.php

    • In invitation email data (line 583), replace hardcoded 'https://sitekit.withgoogle.com/documentation/email-reports/' with add_query_arg( 'doc', 'email-reporting', 'https://sitekit.withgoogle.com/support/' )
  • Update file includes/Core/Email_Reporting/Batch_Error_Notifier.php

    • In get_body_args() (line 315), replace the single generic $help_url (doc=email-reporting) with specific URLs per content key:
      • error-email-report-search-console and error-email-report-analytics-4 ... doc=email-reporting-module-issues
      • error-email-permissions-search-console ... error_id=search-console_insufficient_permissions (matching the frontend PermissionsErrorNotice pattern)
      • error-email-permissions-analytics-4 ... error_id=analytics-4_insufficient_permissions

Test Coverage

  • Update JS tests for ReportErrorNotice to verify the "Get help" link uses the email-reporting-module-issues doc key
  • Update JS tests for SendingErrorNotice, CronSchedulerErrorNotice, and ServerErrorNotice to verify the "Get help" link renders with the correct doc URL
  • Update InviteOthersToSubscribe tests to verify the updated email-reporting-inviting-others doc key
  • Update Batch_Error_Notifier PHP tests to verify the email-reporting-module-issues doc slug in error email body args

QA Brief

  • Confirm every Learn more or documentation link in the email reporting feature, notices and emails links to the email reporting documentation.
  • Confirm every Learn more or documentation link maps to the correct document key specified in the ticket description.

Changelog entry

  • Add documentation links to Email Reporting feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P1Medium priorityTeam SIssues for Squad 1Type: EnhancementImprovement of an existing feature

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions