# Add analytics to a WordPress business site

Choose an analytics approach and verify data collection and privacy requirements. A consenting test visit and form event appear once with the right site identifier.

Canonical: https://xcloud.host/use-cases/playbooks/add-analytics-to-a-wordpress-business-site/
Published: 2026-09-30 · Updated: 2026-09-30 · Technical review: 2026-09-30
Evidence: Source reviewed; no production deployment test claimed
Editorial owner: xCloud editorial

Intent: Choose an analytics approach and verify data collection and privacy requirements.
For: business-owner, operator

## Requirements and responsibilities

- Have named ownership of the domain, selected xCloud team and site, and WordPress administrator access. For this scenario, agree who supplies the data and signs off: A local business wants to understand which page produces inquiries without collecting excess data. Sources: [xCloud agent capability boundaries](https://github.com/xCloudDev/xcloud-agent-skills/blob/main/plugins/xcloud/reference/capability-map.md); [WordPress roles and capabilities](https://wordpress.org/documentation/article/roles-and-capabilities/)
- Use a compatible Nginx or OpenLiteSpeed stack for native WordPress. Verify current server resources, plan eligibility and each selected plugin or service license and requirements before installing; a Docker server does not host a new native WordPress site. Sources: [xCloud agent capability boundaries](https://github.com/xCloudDev/xcloud-agent-skills/blob/main/plugins/xcloud/reference/capability-map.md); [WordPress plugin administration](https://wordpress.org/documentation/article/manage-plugins/)
- Prepare a safe test identity and a completed, accessible backup before consequential changes. The important failure to plan around is: Duplicate tags or blocked consent can make reports misleading. Sources: [Site backups in xCloud](https://xcloud.host/docs/site-backups-in-xcloud/); [WordPress hardening handbook](https://developer.wordpress.org/advanced-administration/security/hardening/)

## Illustrative situation

Illustrative scenario, not a customer case study: A local business wants to understand which page produces inquiries without collecting excess data. A consenting test visit and form event appear once with the right site identifier.

## Choose the approach

- Choose an analytics service and measurement plan before adding scripts. Verify the selected provider or plugin documentation and license against this requirement; xCloud hosting does not supply its business configuration. Sources: [xCloud agent capability boundaries](https://github.com/xCloudDev/xcloud-agent-skills/blob/main/plugins/xcloud/reference/capability-map.md); [xCloud MCP documentation and connection profiles](https://app.xcloud.host/mcp/docs); [WordPress roles and capabilities](https://wordpress.org/documentation/article/roles-and-capabilities/)
- Keep application setup, domain/DNS ownership, mail delivery and external integrations with their named administrators. Use a plain documented path when a proposed integration cannot be demonstrated end to end. Sources: [xCloud agent capability boundaries](https://github.com/xCloudDev/xcloud-agent-skills/blob/main/plugins/xcloud/reference/capability-map.md); [WordPress plugin administration](https://wordpress.org/documentation/article/manage-plugins/)

## Dashboard and application procedure

### 1. Define events with purpose

**Where:** Umami website settings and WordPress tracking integration

**Permissions:** Named WordPress or app administrator; business owner signs results.

**Inputs:** Owner, hostname, approved requirements, sample record and decision date. Define events with purpose.

**Action:** Write one business question, such as which service page produces inquiries, and choose only the page view and form event needed to answer it. Define consent, retention and access.

**Expected result:** The measurement plan has a clear use.

**Verify:** The owner explains what decision the two events will change.

**If it fails:** Remove events with no clear decision from the initial plan.

Capability: Configure and validate Umami tracking
Sources: [Umami collect website data](https://docs.umami.is/docs/collect-data); [Umami track events](https://docs.umami.is/docs/track-events)

### 2. Choose service and property

**Where:** Umami website settings and WordPress tracking integration

**Permissions:** Named WordPress or app administrator; business owner signs results.

**Inputs:** Target team/site, server or plugin version, license and documented prerequisites. Choose service and property.

**Action:** Use Umami as one documented example: create a website property for the exact hostname, give a named administrator access and document the tracking ID.

**Expected result:** Property and site identity agree.

**Verify:** Compare website ID, hostname and owner before installing its script.

**If it fails:** If the property belongs to another site, select or create the correct one.

Capability: Configure and validate Umami tracking
Sources: [Umami collect website data](https://docs.umami.is/docs/collect-data); [Umami track events](https://docs.umami.is/docs/track-events)

### 3. Install one tracking path

**Where:** Umami website settings and WordPress tracking integration

**Permissions:** Named WordPress or app administrator; business owner signs results.

**Inputs:** Approved change scope, backup state, selected version and maintenance window. Install one tracking path.

**Action:** Add Umami's documented tracking script once through an approved WordPress method. Configure a form-success event only after checking how the chosen form reports completion; a button click is not proof of a saved lead.

**Expected result:** One tag path records intended events.

**Verify:** Inspect source and network requests for duplicate scripts.

**If it fails:** If theme and plugin both inject tracking, remove one path before interpreting metrics.

Capability: Configure and validate Umami tracking
Sources: [Umami collect website data](https://docs.umami.is/docs/collect-data); [Umami track events](https://docs.umami.is/docs/track-events)

### 4. Test consent and events

**Where:** Umami website settings and WordPress tracking integration

**Permissions:** Named WordPress or app administrator; business owner signs results.

**Inputs:** Test accounts, sample content or transaction, expected result and provider access. Test consent and events.

**Action:** With appropriate consent, open a marked test session, view a service page and complete one form. Compare Umami's page and event view with the form's actual destination; local storage exists only if the plugin provides it.

**Expected result:** One page view and one conversion event appear for the correct site.

**Verify:** Match event time and hostname to the actual form outcome; repeat with consent declined according to policy.

**If it fails:** If counts differ, debug consent or event firing before using reports.

Capability: Configure and validate Umami tracking
Sources: [Umami collect website data](https://docs.umami.is/docs/collect-data); [Umami track events](https://docs.umami.is/docs/track-events)

### 5. Maintain reliable reporting

**Where:** Umami website settings and WordPress tracking integration

**Permissions:** Named WordPress or app administrator; business owner signs results.

**Inputs:** Observed results, unresolved failures, backup point and owner contacts. Maintain reliable reporting.

**Action:** Record who checks event health after theme or form changes and who can export or delete collected data.

**Expected result:** Reports remain interpretable after releases.

**Verify:** Another maintainer finds the event definition and test procedure.

**If it fails:** If tags break, mark the affected reporting period rather than filling it with estimates.

Capability: Configure and validate Umami tracking
Sources: [Umami collect website data](https://docs.umami.is/docs/collect-data); [Umami track events](https://docs.umami.is/docs/track-events)

## Maintenance

- Assign a cadence for selected WordPress core, theme and plugin updates, review version-based findings and retest the path in this guide. In particular, repeat: A consenting test visit and form event appear once with the right site identifier. A chat prompt is not a scheduled task. Sources: [Manage WordPress updates with Updates Manager](https://xcloud.host/docs/manage-wordpress-updates-with-updates-manager/); [Vulnerability Checker in xCloud](https://xcloud.host/docs/vulnerability-checker-in-xcloud/)
- Record actual backup completion, storage access and responsible staff. Recheck connected application and provider behavior after changes rather than relying on a site health status alone. Sources: [Site backups in xCloud](https://xcloud.host/docs/site-backups-in-xcloud/); [xCloud agent capability boundaries](https://github.com/xCloudDev/xcloud-agent-skills/blob/main/plugins/xcloud/reference/capability-map.md)

## Recovery decisions

- If analytics disappear after a WordPress change, inspect the Umami website ID, tracking script, consent handling and network requests, then restore the last approved tag configuration. Do not fill missing event history with inferred counts or restore the WordPress database as a first-line analytics fix. Sources: [Umami collect website data](https://docs.umami.is/docs/collect-data); [Umami track events](https://docs.umami.is/docs/track-events)

## AI handoff

Connect xCloud MCP through the current documented profile and grant only the scopes needed for the selected team. Discover tool schemas first. Read resources to plan; require approval for any supported write. Use returned dashboard URLs for manual work. The packaged REST wrapper accepts GET requests only.

### Supported scope

- **Confirm requirements and inspect resources** (mcp; read): Discover the connected profile and operation schema first; only teams granted to the connection are visible. Checkpoint: Confirm exact team, server and site identity. Use dashboard\_url returned by the resource; do not invent a dashboard link. Operation identifiers to discover: teams.index, servers.show, sites.show. Scopes: read:servers, read:sites. Sources: [xCloud MCP documentation and connection profiles](https://app.xcloud.host/mcp/docs); [xCloud agent capability boundaries](https://github.com/xCloudDev/xcloud-agent-skills/blob/main/plugins/xcloud/reference/capability-map.md)
- **Configure and validate Umami tracking** (app; manual): A named Umami and WordPress administrator sets the website ID, tracking script, events and data policy. xCloud MCP hosting reads cannot prove browser events. Checkpoint: Observe a consent-appropriate page view and event in Umami; inspect duplicate scripts and failures. Sources: [Umami collect website data](https://docs.umami.is/docs/collect-data); [Umami track events](https://docs.umami.is/docs/track-events)

### Copyable agent brief

```text
Help with add analytics to a wordpress business site for the exact xCloud team and site I name. First inspect only resources the connection permits and confirm returned identity, stack and relevant versions. Prepare the following authored workflow: Define events with purpose; Choose service and property; Install one tracking path; Test consent and events; Maintain reliable reporting. Ask the named dashboard, domain, WordPress and application owners to perform operations outside connected capabilities. WordPress staging push/pull, native backup schedules, restore and cache settings remain manual dashboard tasks; the packaged REST wrapper is GET-only. Use the guide’s checks to report observed application evidence, unresolved questions and recovery implications; do not claim completion from a hosting resource read. Acceptance: One page view and one conversion event appear for the correct site.
```

### Manual checkpoints

- The named WordPress, app, dashboard or provider administrator performs the guide’s actual configuration step: Add Umami's documented tracking script once through an approved WordPress method. Configure a form-success event only after checking how the chosen form reports completion; a button click is not proof of a saved lead.
- The business owner compares the controlled sample with this observable result: One page view and one conversion event appear for the correct site.
- Staging push/pull, native backup schedules, restores and cache-setting edits require the authorized xCloud dashboard operator; the packaged REST wrapper is GET-only.

## Feature coverage

- **business-acceptance** (covered): A consenting test visit and form event appear once with the right site identifier. Steps: phase-4
- **recovery** (covered): Duplicate tags or blocked consent can make reports misleading. Steps: phase-5

## Sources

- [xCloud agent capability boundaries](https://github.com/xCloudDev/xcloud-agent-skills/blob/main/plugins/xcloud/reference/capability-map.md) — reviewed 2026-09-30; v4.4.2 package; xCloud v2.8.8 capability review
- [WordPress roles and capabilities](https://wordpress.org/documentation/article/roles-and-capabilities/) — reviewed 2026-09-30
- [WordPress plugin administration](https://wordpress.org/documentation/article/manage-plugins/) — reviewed 2026-09-30
- [Site backups in xCloud](https://xcloud.host/docs/site-backups-in-xcloud/) — reviewed 2026-09-30
- [WordPress hardening handbook](https://developer.wordpress.org/advanced-administration/security/hardening/) — reviewed 2026-09-30
- [xCloud MCP documentation and connection profiles](https://app.xcloud.host/mcp/docs) — reviewed 2026-09-30
- [Manage WordPress updates with Updates Manager](https://xcloud.host/docs/manage-wordpress-updates-with-updates-manager/) — reviewed 2026-09-30
- [Vulnerability Checker in xCloud](https://xcloud.host/docs/vulnerability-checker-in-xcloud/) — reviewed 2026-09-30
- [Umami collect website data](https://docs.umami.is/docs/collect-data) — reviewed 2026-09-30
- [Umami track events](https://docs.umami.is/docs/track-events) — reviewed 2026-09-30

## Continue

[Explore the next WordPress workflow](https://xcloud.host/use-cases/playbooks/deploy-a-companion-app-beside-wordpress/)

- [Add an analytics service to WordPress](https://xcloud.host/use-cases/solutions/add-an-analytics-service-to-wordpress/)
- [Deploy a private analytics service beside WordPress](https://xcloud.host/use-cases/workflows/deploy-a-private-analytics-service-beside-wordpress/)
- [Hand over WordPress maintenance and client reporting](https://xcloud.host/use-cases/playbooks/agency-wordpress-maintenance-handover/)
