claude-plugin-wordpress-manager 2.2.1 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/.claude-plugin/plugin.json +2 -2
  2. package/CHANGELOG.md +21 -0
  3. package/agents/wp-content-strategist.md +25 -0
  4. package/agents/wp-ecommerce-manager.md +23 -0
  5. package/agents/wp-site-manager.md +26 -0
  6. package/package.json +8 -3
  7. package/skills/wordpress-router/references/decision-tree.md +8 -2
  8. package/skills/wp-content/SKILL.md +1 -0
  9. package/skills/wp-content-attribution/SKILL.md +97 -0
  10. package/skills/wp-content-attribution/references/attribution-models.md +189 -0
  11. package/skills/wp-content-attribution/references/conversion-funnels.md +137 -0
  12. package/skills/wp-content-attribution/references/reporting-dashboards.md +199 -0
  13. package/skills/wp-content-attribution/references/roi-calculation.md +202 -0
  14. package/skills/wp-content-attribution/references/utm-tracking-setup.md +161 -0
  15. package/skills/wp-content-attribution/scripts/attribution_inspect.mjs +277 -0
  16. package/skills/wp-headless/SKILL.md +1 -0
  17. package/skills/wp-i18n/SKILL.md +1 -0
  18. package/skills/wp-multilang-network/SKILL.md +107 -0
  19. package/skills/wp-multilang-network/references/content-sync.md +182 -0
  20. package/skills/wp-multilang-network/references/hreflang-config.md +198 -0
  21. package/skills/wp-multilang-network/references/language-routing.md +234 -0
  22. package/skills/wp-multilang-network/references/network-architecture.md +119 -0
  23. package/skills/wp-multilang-network/references/seo-international.md +213 -0
  24. package/skills/wp-multilang-network/scripts/multilang_inspect.mjs +308 -0
  25. package/skills/wp-multisite/SKILL.md +1 -0
  26. package/skills/wp-programmatic-seo/SKILL.md +97 -0
  27. package/skills/wp-programmatic-seo/references/data-sources.md +200 -0
  28. package/skills/wp-programmatic-seo/references/location-seo.md +134 -0
  29. package/skills/wp-programmatic-seo/references/product-seo.md +147 -0
  30. package/skills/wp-programmatic-seo/references/technical-seo.md +197 -0
  31. package/skills/wp-programmatic-seo/references/template-architecture.md +125 -0
  32. package/skills/wp-programmatic-seo/scripts/programmatic_seo_inspect.mjs +264 -0
  33. package/skills/wp-woocommerce/SKILL.md +1 -0
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "wordpress-manager",
3
- "version": "2.2.1",
4
- "description": "Unified WordPress management plugin for Claude Code. Orchestrates Hostinger MCP (infrastructure), WP REST API bridge (85 tools incl. WooCommerce + Multisite + Webhooks), and WordPress.com MCP (hosted sites) with 11 specialized agents, 30 skills, and security hooks. Includes fleet monitoring, content repurposing, webhook propagation, site monitoring (uptime, performance baseline, security scanning, content integrity, alerting), CI/CD pipeline automation (GitHub Actions, GitLab CI, Bitbucket), WordPress Multisite network management, WooCommerce store management, local dev environment support, development, testing, security, i18n, accessibility, headless, and operations.",
3
+ "version": "2.3.0",
4
+ "description": "Unified WordPress management plugin for Claude Code. Orchestrates Hostinger MCP (infrastructure), WP REST API bridge (85 tools incl. WooCommerce + Multisite + Webhooks), and WordPress.com MCP (hosted sites) with 11 specialized agents, 33 skills, and security hooks. Includes programmatic SEO, content-commerce attribution, multi-language network, fleet monitoring, content repurposing, webhook propagation, site monitoring (uptime, performance baseline, security scanning, content integrity, alerting), CI/CD pipeline automation (GitHub Actions, GitLab CI, Bitbucket), WordPress Multisite network management, WooCommerce store management, local dev environment support, development, testing, security, i18n, accessibility, headless, and operations.",
5
5
  "author": {
6
6
  "name": "vinmor",
7
7
  "email": "morreale.v@gmail.com"
package/CHANGELOG.md CHANGED
@@ -2,6 +2,27 @@
2
2
 
3
3
  All notable changes to the WordPress Manager plugin for Claude Code.
4
4
 
5
+ ## [2.3.0] - 2026-02-28
6
+
7
+ ### Added
8
+ - **Programmatic SEO skill** (`wp-programmatic-seo`) — template-based scalable page generation via headless WordPress + multisite
9
+ - 5 reference files: `template-architecture.md`, `location-seo.md`, `product-seo.md`, `data-sources.md`, `technical-seo.md`
10
+ - Detection script: `programmatic_seo_inspect.mjs` (headless frontend, SEO plugins, CPTs, WPGraphQL)
11
+ - Agent updated: Programmatic SEO Workflow + example in `wp-content-strategist`
12
+ - **Content-Commerce Attribution skill** (`wp-content-attribution`) — link WooCommerce sales data to content that drives conversions
13
+ - 5 reference files: `utm-tracking-setup.md`, `conversion-funnels.md`, `attribution-models.md`, `roi-calculation.md`, `reporting-dashboards.md`
14
+ - Detection script: `attribution_inspect.mjs` (WooCommerce, analytics plugins, UTM tracking, order meta)
15
+ - Agent updated: Content Attribution Workflow + example in `wp-ecommerce-manager`
16
+ - **Multi-Language Network skill** (`wp-multilang-network`) — multisite multi-language orchestration with hreflang and content sync
17
+ - 5 reference files: `network-architecture.md`, `hreflang-config.md`, `content-sync.md`, `language-routing.md`, `seo-international.md`
18
+ - Detection script: `multilang_inspect.mjs` (multisite status, multilingual plugins, language patterns, hreflang)
19
+ - Agent updated: Multi-Language Network Management + example in `wp-site-manager`
20
+
21
+ ### Changed
22
+ - Router decision-tree.md upgraded to v10 with programmatic SEO, content attribution, and multi-language network keywords and routing
23
+ - Cross-references added: `wp-headless` → wp-programmatic-seo, `wp-woocommerce` → wp-content-attribution, `wp-content` → wp-content-attribution, `wp-multisite` → wp-multilang-network, `wp-i18n` → wp-multilang-network
24
+ - Plugin now has 33 skills, 11 agents, and 85 MCP tools
25
+
5
26
  ## [2.2.1] - 2026-02-28
6
27
 
7
28
  ### Changed
@@ -31,6 +31,13 @@ description: |
31
31
  assistant: "I'll use the wp-content-strategist agent to extract key insights from your posts and generate platform-specific social content."
32
32
  <commentary>Content repurposing requires selecting source content and applying platform templates.</commentary>
33
33
  </example>
34
+
35
+ <example>
36
+ Context: User wants to generate hundreds of location-based landing pages.
37
+ user: "Generate 200 city pages for our plumbing service"
38
+ assistant: "I'll use the wp-content-strategist agent to design the template, set up the data source, and bulk-generate the city pages."
39
+ <commentary>Programmatic SEO at scale requires structured data, URL design, and bulk content creation via REST API.</commentary>
40
+ </example>
34
41
  model: inherit
35
42
  tools: Read, Grep, Glob, Bash, WebFetch, WebSearch
36
43
  ---
@@ -176,6 +183,23 @@ When repurposing existing WordPress content into multi-channel formats:
176
183
 
177
184
  See the `wp-content-repurposing` skill for detailed templates and platform specifications.
178
185
 
186
+ ## Programmatic SEO Workflow
187
+
188
+ When generating large-scale pages from structured data (city pages, product variants, comparison pages):
189
+
190
+ 1. **Assess data source**: Use `discover_content_types` to find what structured data exists (products, locations, categories). Run `programmatic_seo_inspect.mjs` for readiness assessment.
191
+ 2. **Design URL pattern**: Define the template — `/{service}/{city}` or `/{product}/{variant}`. Keep to max 3 levels, include primary keyword in first path segment.
192
+ 3. **Create CPT or taxonomy**: If no suitable CPT exists, create one in WordPress with `show_in_rest: true` for headless access. Define custom fields for template variables.
193
+ 4. **Build page template**: Map CPT fields to page elements — title, meta description, H1, body sections, schema markup. Ensure 300+ words of unique content per page.
194
+ 5. **Generate content in bulk**: Loop via `create_content` MCP tool:
195
+ - Create as `status: "draft"` first for review
196
+ - Process in batches of 10, report progress
197
+ - Assign taxonomies via `assign_terms_to_content`
198
+ 6. **Configure headless frontend**: Reference `wp-programmatic-seo` skill for ISR/SSG setup (Next.js `revalidate`, Nuxt `routeRules`, Astro hybrid mode).
199
+ 7. **Submit sitemap**: Verify XML sitemap includes all programmatic pages, submit to Google Search Console.
200
+
201
+ See the `wp-programmatic-seo` skill for reference files on template architecture, location SEO, product SEO, data sources, and technical SEO.
202
+
179
203
  ## Multilingual Content
180
204
 
181
205
  When creating content for multilingual sites:
@@ -194,3 +218,4 @@ When creating content for multilingual sites:
194
218
  - **`wp-content` skill** — content lifecycle management, editorial workflows
195
219
  - **`wp-i18n` skill** — internationalization and localization procedures
196
220
  - **`wp-content-repurposing` skill** — content transformation for multi-channel distribution
221
+ - **`wp-programmatic-seo` skill** — scalable page generation from structured data (city pages, product variants, comparison pages)
@@ -26,6 +26,13 @@ description: |
26
26
  <commentary>Sales analytics combining multiple report endpoints requires the WooCommerce agent.</commentary>
27
27
  </example>
28
28
 
29
+ <example>
30
+ Context: User wants to know which blog posts are driving sales.
31
+ user: "Which blog posts are driving the most sales?"
32
+ assistant: "I'll use the wp-ecommerce-manager agent to analyze order attribution data and identify top converting content."
33
+ <commentary>Content-commerce attribution requires correlating WooCommerce order UTM meta with content data.</commentary>
34
+ </example>
35
+
29
36
  model: inherit
30
37
  tools: Read, Grep, Glob, Bash, WebFetch, WebSearch
31
38
  ---
@@ -93,6 +100,21 @@ For cross-referencing with WordPress content:
93
100
  3. Shipping: `wc_list_shipping_zones` (verify zone coverage)
94
101
  4. Tax: `wc_get_tax_classes` (verify tax configuration)
95
102
 
103
+ ### Content Attribution Workflow
104
+
105
+ When analyzing which content drives WooCommerce sales:
106
+
107
+ 1. **Verify setup**: Run `attribution_inspect.mjs` to check WooCommerce + content + UTM tracking readiness
108
+ 2. **Check UTM tracking**: Is the UTM capture mu-plugin installed? If not, guide setup from `wp-content-attribution` skill → `references/utm-tracking-setup.md`
109
+ 3. **Pull sales data**: `wc_get_sales_report` for the reporting period (default: last 30 days)
110
+ 4. **Pull order details**: `wc_list_orders` with `status=completed` — check `_last_utm_campaign` and `_first_utm_campaign` meta on each order
111
+ 5. **Pull content data**: `list_content` for the same period to map campaign slugs back to post titles
112
+ 6. **Correlate**: Match order UTM campaign values with content piece slugs; aggregate revenue per content piece
113
+ 7. **Apply attribution model**: Default to last-touch (`_last_utm_campaign`); reference `wp-content-attribution` skill for other models
114
+ 8. **Generate attribution report**: Top converting content pieces, revenue by content category, CAC by source, recommendations
115
+
116
+ See the `wp-content-attribution` skill for reference files on UTM setup, attribution models, ROI calculation, and reporting dashboards.
117
+
96
118
  ## Report Format
97
119
 
98
120
  ```
@@ -134,3 +156,4 @@ For cross-referencing with WordPress content:
134
156
  - `wp-deploy` — Deploy store changes to production
135
157
  - `wp-backup` — Backup store database before bulk operations
136
158
  - `wp-audit` — Security and performance audit for WC stores
159
+ - `wp-content-attribution` — Content-commerce attribution, UTM tracking, ROI calculation
@@ -24,6 +24,13 @@ description: |
24
24
  assistant: "I'll use the wp-site-manager agent to handle multi-site operations."
25
25
  <commentary>Multi-site coordination is a core capability of this agent.</commentary>
26
26
  </example>
27
+
28
+ <example>
29
+ Context: User wants to set up a multilingual multisite network.
30
+ user: "Set up Italian and Spanish versions of our site"
31
+ assistant: "I'll use the wp-site-manager agent to create language-specific sub-sites and configure the multi-language network."
32
+ <commentary>Multi-language network setup requires creating sub-sites, configuring hreflang, and establishing content sync — all multisite operations.</commentary>
33
+ </example>
27
34
  model: inherit
28
35
  tools: Read, Grep, Glob, Bash, WebFetch, WebSearch
29
36
  ---
@@ -127,6 +134,20 @@ For WordPress Multisite networks (sites with `is_multisite: true` in WP_SITES_CO
127
134
  - ALWAYS confirm before network-activating plugins (affects ALL sites)
128
135
  - Announce which network you're operating on when multiple multisite networks are configured
129
136
 
137
+ ### Multi-Language Network Management
138
+
139
+ When setting up or managing a multi-language WordPress Multisite network:
140
+
141
+ 1. **Assess current network**: Use `ms_list_sites` to list existing sub-sites. Run `multilang_inspect.mjs` for readiness assessment (multisite status, multilingual plugin, language patterns, hreflang).
142
+ 2. **Create language sub-sites**: Use `ms_create_site` for each target language. Use ISO 639-1 codes as slugs (e.g., `/it/`, `/de/`, `/fr/`). Title format: `{Brand} - {Language Name}`.
143
+ 3. **Configure multilingual plugin**: Network-activate the chosen plugin (WPML, Polylang, or MultilingualPress) via `ms_network_activate_plugin`. Assign language to each sub-site in plugin settings.
144
+ 4. **Set up hreflang**: If using MultilingualPress or WPML, hreflang is auto-generated. Otherwise, install the hreflang mu-plugin from `wp-multilang-network` skill → `references/hreflang-config.md`.
145
+ 5. **Establish content sync workflow**: Define whether content is manually replicated, semi-auto (plugin-assisted), or fully synced. See `wp-multilang-network` skill → `references/content-sync.md`.
146
+ 6. **Configure language routing**: Set up language switcher widget and optional browser detection redirect. See `references/language-routing.md`.
147
+ 7. **Verify international SEO**: Check hreflang reciprocal links, per-language sitemaps, GSC properties per language. See `references/seo-international.md`.
148
+
149
+ See the `wp-multilang-network` skill for detailed reference files on network architecture, hreflang, content sync, language routing, and international SEO.
150
+
130
151
  ### Safety Rules
131
152
  - NEVER delete content without explicit user confirmation
132
153
  - NEVER deactivate plugins without listing dependencies first
@@ -150,3 +171,8 @@ For domain-specific tasks, delegate to specialized agents:
150
171
  | Multisite network management | `wp-site-manager` (this agent) | Sub-sites, network plugins, Super Admin — see section above |
151
172
  | CI/CD pipeline setup and troubleshooting | `wp-cicd-engineer` | GitHub Actions, GitLab CI, Bitbucket, quality gates |
152
173
  | Site monitoring and health reports | `wp-monitoring-agent` | Uptime, performance trends, security scanning, content integrity |
174
+
175
+ ## Related Skills
176
+
177
+ - **`wp-multisite` skill** — multisite network management with 10 MCP tools
178
+ - **`wp-multilang-network` skill** — multi-language network orchestration (hreflang, content sync, international SEO)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "claude-plugin-wordpress-manager",
3
- "version": "2.2.1",
4
- "description": "Unified WordPress management and development plugin for Claude Code. Orchestrates Hostinger MCP, WP REST API bridge (85 tools incl. 30 WooCommerce + 10 Multisite + 4 Webhooks), and WordPress.com MCP with 30 skills, 11 agents, and security hooks. v2.2.0 adds fleet monitoring, content repurposing skill, and webhook propagation (WooCommerce webhook MCP tools + mu-plugin patterns).",
3
+ "version": "2.3.0",
4
+ "description": "Unified WordPress management and development plugin for Claude Code. Orchestrates Hostinger MCP, WP REST API bridge (85 tools incl. 30 WooCommerce + 10 Multisite + 4 Webhooks), and WordPress.com MCP with 33 skills, 11 agents, and security hooks. v2.3.0 adds programmatic SEO, content-commerce attribution, and multi-language network skills.",
5
5
  "author": {
6
6
  "name": "vinmor",
7
7
  "email": "morreale.v@gmail.com"
@@ -36,7 +36,12 @@
36
36
  "health-check",
37
37
  "webhook",
38
38
  "content-repurposing",
39
- "fleet-monitoring"
39
+ "fleet-monitoring",
40
+ "programmatic-seo",
41
+ "attribution",
42
+ "multilingual",
43
+ "hreflang",
44
+ "international-seo"
40
45
  ],
41
46
  "repository": {
42
47
  "type": "git",
@@ -1,4 +1,4 @@
1
- # Router decision tree (v9 — development + local environment + operations + multisite + CI/CD + monitoring + webhooks + content repurposing)
1
+ # Router decision tree (v10 — development + local environment + operations + multisite + CI/CD + monitoring + webhooks + content repurposing + programmatic SEO + content attribution + multi-language network)
2
2
 
3
3
  This routing guide covers WordPress **development**, **local environment**, and **operations** workflows.
4
4
 
@@ -14,7 +14,7 @@ Keywords that indicate **local environment**:
14
14
  local site, Studio, LocalWP, Local by Flywheel, wp-env, local WordPress, start site, stop site, create local site, local development, symlink plugin, local database, switch PHP version, localhost, local preview, detect environment, WASM, SQLite local
15
15
 
16
16
  Keywords that indicate **operations**:
17
- deploy, push to production, audit, security check, backup, restore, migrate, move site, create post, manage content, site status, check plugins, performance check, SEO audit, WooCommerce, prodotto, ordine, coupon, negozio, catalogo, inventario, vendite, carrello, multisite, network, sub-site, sub-sito, domain mapping, super admin, network activate, monitor, uptime, health report, trend, scansione periodica, alerting, performance baseline, fleet, all sites, network health, cross-site, webhook, outbound notification, event propagation, Zapier, content sync, repurpose content, social posts from blog, content atomization, newsletter from posts, content distribution
17
+ deploy, push to production, audit, security check, backup, restore, migrate, move site, create post, manage content, site status, check plugins, performance check, SEO audit, WooCommerce, prodotto, ordine, coupon, negozio, catalogo, inventario, vendite, carrello, multisite, network, sub-site, sub-sito, domain mapping, super admin, network activate, monitor, uptime, health report, trend, scansione periodica, alerting, performance baseline, fleet, all sites, network health, cross-site, webhook, outbound notification, event propagation, Zapier, content sync, repurpose content, social posts from blog, content atomization, newsletter from posts, content distribution, programmatic SEO, template pages, city pages, location pages, bulk page generation, scalable landing pages, content ROI, attribution, which content drives sales, conversion tracking, UTM tracking, revenue per post, multilingual, multi-language, hreflang, international SEO, translate site, language sites, localize content
18
18
 
19
19
  Keywords that indicate **development**:
20
20
  create block, block.json, theme.json, register_rest_route, plugin development, hooks, PHPStan, build, test, scaffold, i18n, translation, accessibility, a11y, headless, decoupled, WPGraphQL, CI, CD, pipeline, GitHub Actions, GitLab CI, deploy automatico, workflow, quality gate
@@ -98,6 +98,12 @@ Priority: `gutenberg` > `wp-core` > `wp-site` > `wp-block-theme` > `wp-block-plu
98
98
  → `wp-webhooks` skill + `wp-site-manager` agent
99
99
  - **Repurpose content / social posts from blog / newsletter from content / atomize / content distribution / turn blog into social**
100
100
  → `wp-content-repurposing` skill + `wp-content-strategist` agent
101
+ - **Programmatic SEO / template pages / city pages / bulk page generation / scalable landing pages / location-based SEO / product variant pages**
102
+ → `wp-programmatic-seo` skill + `wp-content-strategist` agent
103
+ - **Content attribution / ROI / conversion tracking / UTM / revenue per post / which content drives sales**
104
+ → `wp-content-attribution` skill + `wp-ecommerce-manager` agent
105
+ - **Multi-language / multilingual / hreflang / international SEO / language sites / translate network**
106
+ → `wp-multilang-network` skill + `wp-site-manager` agent
101
107
 
102
108
  ## Step 2c: route by local environment intent (keywords)
103
109
 
@@ -104,3 +104,4 @@ Tool: assign_terms_to_content — assign terms to content
104
104
 
105
105
  ### Related Skills
106
106
  - **`wp-content-repurposing`** — transform existing content for social media, email, and multi-channel distribution
107
+ - **`wp-content-attribution`** — measure which content drives WooCommerce sales (UTM tracking, attribution models, ROI)
@@ -0,0 +1,97 @@
1
+ ---
2
+ name: wp-content-attribution
3
+ description: |
4
+ This skill should be used when the user asks to "track content ROI",
5
+ "attribute sales to content", "measure content performance", "conversion tracking",
6
+ "UTM tracking setup", "which content drives sales", "content attribution",
7
+ "revenue per post", "customer acquisition source", "marketing attribution",
8
+ or mentions connecting WordPress content metrics with WooCommerce sales data.
9
+ version: 1.0.0
10
+ ---
11
+
12
+ ## Overview
13
+
14
+ Content-Commerce Attribution measures which WordPress content pieces drive WooCommerce conversions, enabling data-driven content strategy. By linking UTM-tracked traffic to order data, you can calculate ROI per content piece — answering "which blog posts actually generate revenue?"
15
+
16
+ This skill orchestrates existing MCP tools — WooCommerce reports, content CRUD, order management — into attribution workflows. No new tools or custom plugins are required; UTM capture uses lightweight mu-plugin patterns.
17
+
18
+ ## When to Use
19
+
20
+ - User has a WooCommerce store plus blog/content and wants to understand content ROI
21
+ - "Which of my blog posts are driving the most sales?"
22
+ - "How do I track which content leads to purchases?"
23
+ - "Set up UTM tracking for my WooCommerce store"
24
+ - "Calculate revenue per blog post"
25
+ - "Build a content attribution dashboard"
26
+ - "What's my customer acquisition cost by content type?"
27
+
28
+ ## Attribution vs Analytics
29
+
30
+ | Aspect | Attribution | Analytics |
31
+ |--------|------------|-----------|
32
+ | Measures | Contribution to conversion | Traffic and engagement |
33
+ | Answer | "This post generated $5,000 in revenue" | "This post got 10,000 visits" |
34
+ | Data source | Order meta + UTM params | Page views + sessions |
35
+ | Granularity | Revenue per content piece | Visitors per content piece |
36
+ | Action | Invest more in high-ROI content | Invest in high-traffic topics |
37
+
38
+ ## Prerequisites / Detection
39
+
40
+ ```bash
41
+ node skills/wp-content-attribution/scripts/attribution_inspect.mjs --cwd=/path/to/wordpress
42
+ ```
43
+
44
+ The script checks WooCommerce presence, analytics plugins, UTM tracking setup, content/product volume ratio, and existing order meta with source fields.
45
+
46
+ ## Content Attribution Operations Decision Tree
47
+
48
+ 1. **What attribution task?**
49
+
50
+ - "UTM tracking" / "campaign tracking" / "source tracking"
51
+ → **UTM Setup** — Read: `references/utm-tracking-setup.md`
52
+
53
+ - "conversion funnel" / "customer journey" / "touchpoints"
54
+ → **Funnel Analysis** — Read: `references/conversion-funnels.md`
55
+
56
+ - "attribution model" / "first touch" / "last touch" / "multi-touch"
57
+ → **Attribution Models** — Read: `references/attribution-models.md`
58
+
59
+ - "content ROI" / "revenue per post" / "cost per acquisition"
60
+ → **ROI Calculation** — Read: `references/roi-calculation.md`
61
+
62
+ - "dashboard" / "report" / "analytics setup"
63
+ → **Reporting** — Read: `references/reporting-dashboards.md`
64
+
65
+ 2. **Common workflow (first-time setup):**
66
+ 1. Verify WooCommerce + content setup (run `attribution_inspect.mjs`)
67
+ 2. Install UTM capture mu-plugin (see `utm-tracking-setup.md`)
68
+ 3. Tag internal links from content → product pages with UTM parameters
69
+ 4. Wait for data accumulation (minimum 2–4 weeks)
70
+ 5. Pull sales data: `wc_get_sales_report` for period
71
+ 6. Pull content data: `list_content` for same period
72
+ 7. Correlate: match order UTM sources with content pieces
73
+ 8. Apply attribution model (default: last-touch)
74
+ 9. Generate attribution report with top converting content
75
+
76
+ ## Recommended Agent
77
+
78
+ `wp-ecommerce-manager` — handles WooCommerce data, sales reports, and order analysis with attribution context.
79
+
80
+ ## Additional Resources
81
+
82
+ ### Reference Files
83
+
84
+ | File | Description |
85
+ |------|-------------|
86
+ | **`references/utm-tracking-setup.md`** | UTM parameter design, mu-plugin for capture, naming conventions |
87
+ | **`references/conversion-funnels.md`** | Funnel stages, drop-off analysis, cart abandonment metrics |
88
+ | **`references/attribution-models.md`** | First-touch, last-touch, linear, time-decay, position-based models |
89
+ | **`references/roi-calculation.md`** | Revenue per post, content ROI formula, CAC, LTV by source |
90
+ | **`references/reporting-dashboards.md`** | GA4 integration, MonsterInsights setup, dashboard KPIs |
91
+
92
+ ### Related Skills
93
+
94
+ - `wp-woocommerce` — WooCommerce store management and reporting tools
95
+ - `wp-content` — content management and editorial workflows
96
+ - `wp-monitoring` — ongoing site performance and health tracking
97
+ - `wp-content-repurposing` — transform high-ROI content into multi-channel formats
@@ -0,0 +1,189 @@
1
+ # Attribution Models
2
+
3
+ Use this file when selecting and implementing an attribution model — first-touch, last-touch, linear, time-decay, and position-based approaches for WordPress + WooCommerce content attribution.
4
+
5
+ ## Model Overview
6
+
7
+ | Model | Credit Distribution | Best For | Complexity |
8
+ |-------|-------------------|----------|------------|
9
+ | **First-Touch** | 100% to first interaction | Brand awareness measurement | Low |
10
+ | **Last-Touch** | 100% to last interaction before purchase | Direct conversion analysis | Low |
11
+ | **Linear** | Equal across all touchpoints | Balanced view of journey | Medium |
12
+ | **Time-Decay** | More to recent touchpoints | Short sales cycles | Medium |
13
+ | **Position-Based (U-shaped)** | 40% first, 40% last, 20% middle | Full journey with key moments | High |
14
+
15
+ ## First-Touch Attribution
16
+
17
+ Credit goes entirely to the first content interaction that brought the customer.
18
+
19
+ **Logic:**
20
+ ```
21
+ Customer journey: Blog Post A → Product Page → Blog Post B → Purchase
22
+ Attribution: Blog Post A = 100%
23
+ ```
24
+
25
+ **WordPress implementation:**
26
+ - Uses the `_first_utm_source` and `_first_utm_campaign` order meta fields
27
+ - Captured via the first-visit cookie in the UTM mu-plugin
28
+
29
+ **When to use:**
30
+ - You want to understand which content attracts new customers
31
+ - Evaluating top-of-funnel content effectiveness
32
+ - Measuring brand awareness investment ROI
33
+
34
+ **Limitation:** Ignores all subsequent interactions that nurtured the conversion.
35
+
36
+ ## Last-Touch Attribution
37
+
38
+ Credit goes entirely to the last content interaction before purchase.
39
+
40
+ **Logic:**
41
+ ```
42
+ Customer journey: Blog Post A → Product Page → Blog Post B → Purchase
43
+ Attribution: Blog Post B = 100%
44
+ ```
45
+
46
+ **WordPress implementation:**
47
+ - Uses the `_last_utm_source` and `_last_utm_campaign` order meta fields
48
+ - Captured via the always-updated last-touch cookie
49
+
50
+ **When to use:**
51
+ - Default starting model (simplest, most actionable)
52
+ - Identifying content that directly triggers purchases
53
+ - Short sales cycles where one touchpoint dominates
54
+
55
+ **Limitation:** Ignores the content that initially attracted the customer.
56
+
57
+ ## Linear Attribution
58
+
59
+ Equal credit distributed across all touchpoints in the journey.
60
+
61
+ **Logic:**
62
+ ```
63
+ Customer journey: Blog Post A → Product Page → Blog Post B → Purchase
64
+ Attribution: Blog Post A = 33.3%, Product Page = 33.3%, Blog Post B = 33.3%
65
+ ```
66
+
67
+ **WordPress implementation:**
68
+ Requires tracking all touchpoints, not just first and last. Options:
69
+ 1. **Session tracking:** Store each page view with UTM in a user session log (more complex mu-plugin)
70
+ 2. **GA4 integration:** Use Google Analytics 4's exploration reports for multi-touch paths
71
+ 3. **Simplified approach:** Split credit between first-touch and last-touch (50/50)
72
+
73
+ **When to use:**
74
+ - All content in the journey contributes equally
75
+ - Long sales cycles with many touchpoints
76
+ - Content team needs validation that middle-of-funnel content matters
77
+
78
+ **Limitation:** Overvalues low-impact touchpoints (e.g., accidental page views).
79
+
80
+ ## Time-Decay Attribution
81
+
82
+ More credit to touchpoints closer in time to the conversion.
83
+
84
+ **Logic (example decay: 7-day half-life):**
85
+ ```
86
+ Day 1: Blog Post A (30 days before purchase) = 6%
87
+ Day 15: Product Page (15 days before) = 18%
88
+ Day 25: Blog Post B (5 days before) = 31%
89
+ Day 29: Email Link (1 day before) = 45%
90
+ ```
91
+
92
+ **Formula:**
93
+ ```
94
+ Credit = 2^(-(time_before_purchase / half_life))
95
+ Normalize all credits to sum to 100%
96
+ ```
97
+
98
+ **When to use:**
99
+ - Sales cycle is short (< 30 days)
100
+ - Recent interactions are more influential than early ones
101
+ - Evaluating promotional/seasonal content effectiveness
102
+
103
+ **Limitation:** Undervalues brand awareness content that starts the journey.
104
+
105
+ ## Position-Based (U-shaped) Attribution
106
+
107
+ 40% to first touch, 40% to last touch, 20% distributed across middle touchpoints.
108
+
109
+ **Logic:**
110
+ ```
111
+ Customer journey: Blog Post A → Product Page → Comparison → Blog Post B → Purchase
112
+ Attribution: Blog Post A = 40%, Product Page = 10%, Comparison = 10%, Blog Post B = 40%
113
+ ```
114
+
115
+ **When to use:**
116
+ - Both acquisition (first touch) and conversion (last touch) are strategically important
117
+ - Multi-step customer journeys with clear awareness and decision phases
118
+ - Most balanced model for content strategy decisions
119
+
120
+ **Limitation:** Requires full journey tracking; arbitrary 40/40/20 split.
121
+
122
+ ## Choosing the Right Model
123
+
124
+ ```
125
+ Start here:
126
+
127
+ ├─ "I just need something simple to start"
128
+ │ → Last-Touch Attribution
129
+
130
+ ├─ "I want to know what content attracts new customers"
131
+ │ → First-Touch Attribution
132
+
133
+ ├─ "My sales cycle is short (< 7 days)"
134
+ │ → Last-Touch Attribution
135
+
136
+ ├─ "My sales cycle is medium (7-30 days)"
137
+ │ → Time-Decay Attribution (7-day half-life)
138
+
139
+ ├─ "My sales cycle is long (30+ days, many touchpoints)"
140
+ │ → Position-Based (U-shaped)
141
+
142
+ └─ "I want to validate all content stages equally"
143
+ → Linear Attribution
144
+ ```
145
+
146
+ ## WordPress-Specific Implementation
147
+
148
+ ### Building Attribution from Order Meta
149
+
150
+ With the UTM mu-plugin capturing first-touch and last-touch data:
151
+
152
+ ```bash
153
+ # Pull orders with attribution data
154
+ wc_list_orders(status="completed", per_page=100)
155
+
156
+ # For each order, check meta fields:
157
+ # _first_utm_source, _first_utm_campaign → first-touch attribution
158
+ # _last_utm_source, _last_utm_campaign → last-touch attribution
159
+ # _landing_page → first page visited
160
+ ```
161
+
162
+ ### Attribution Report Query
163
+
164
+ ```
165
+ For each unique utm_campaign value in completed orders:
166
+ 1. Count orders with this campaign (first-touch)
167
+ 2. Count orders with this campaign (last-touch)
168
+ 3. Sum revenue for each
169
+ 4. Map campaign name back to content piece (campaign = post slug)
170
+ 5. Rank by revenue
171
+ ```
172
+
173
+ ### Simplified Multi-Touch (50/50 First/Last)
174
+
175
+ When full journey tracking is not available, split attribution between first and last touch:
176
+
177
+ ```
178
+ Revenue per content piece =
179
+ (orders where _first_utm_campaign = post_slug × order_total × 0.5) +
180
+ (orders where _last_utm_campaign = post_slug × order_total × 0.5)
181
+ ```
182
+
183
+ ## Decision Checklist
184
+
185
+ 1. What is the average sales cycle length? → Short = last-touch; Long = position-based
186
+ 2. Is full journey tracking available (all touchpoints)? → No = use first/last touch only
187
+ 3. Is the goal to optimize acquisition or conversion content? → Acquisition = first-touch; Conversion = last-touch
188
+ 4. Does the team need a simple, actionable model first? → Start with last-touch, evolve later
189
+ 5. Are UTM cookies capturing first and last touch? → Verify mu-plugin is installed
@@ -0,0 +1,137 @@
1
+ # Conversion Funnels
2
+
3
+ Use this file when analyzing the content-to-commerce funnel — mapping funnel stages, measuring drop-off, and correlating WooCommerce events with content interactions.
4
+
5
+ ## Content-to-Commerce Funnel Stages
6
+
7
+ ```
8
+ Awareness → Consideration → Decision → Purchase → Retention
9
+ │ │ │ │ │
10
+ Blog post Product page Cart Checkout Re-order
11
+ Social share Comparison Wishlist Payment Review
12
+ SEO landing Category page Pricing Confirm Referral
13
+ ```
14
+
15
+ ### Stage Definitions
16
+
17
+ | Stage | User Intent | Content Type | WooCommerce Event |
18
+ |-------|------------|--------------|-------------------|
19
+ | **Awareness** | "I have a problem" | Blog posts, guides, educational content | Page view (no WC interaction) |
20
+ | **Consideration** | "What are my options?" | Product pages, comparisons, reviews | Product view, add to wishlist |
21
+ | **Decision** | "I'm choosing this one" | Product detail, pricing, testimonials | Add to cart |
22
+ | **Purchase** | "I'm buying now" | Cart, checkout | Checkout initiated → Order placed |
23
+ | **Retention** | "I'll come back" | Thank-you page, follow-up emails | Re-order, review submitted |
24
+
25
+ ## Funnel Metrics per Stage
26
+
27
+ | Metric | Formula | Target | Data Source |
28
+ |--------|---------|--------|-------------|
29
+ | **Awareness rate** | Unique blog visitors / Total visitors | > 40% | Google Analytics |
30
+ | **Content→Product rate** | Product page views from blog / Blog page views | > 5% | UTM tracking |
31
+ | **Add-to-cart rate** | Add-to-cart events / Product page views | > 8% | WooCommerce analytics |
32
+ | **Cart→Checkout rate** | Checkout initiated / Add-to-cart events | > 50% | WooCommerce analytics |
33
+ | **Checkout conversion** | Orders placed / Checkout initiated | > 60% | `wc_get_sales_report` |
34
+ | **Overall content→sale** | Orders from blog / Blog visitors | > 0.5% | UTM + order correlation |
35
+
36
+ ## WordPress Content Mapping to Funnel Stages
37
+
38
+ ### Awareness Content (Top of Funnel)
39
+
40
+ - **Blog posts** — educational, informational, SEO-targeted
41
+ - **Guides/tutorials** — how-to content solving user problems
42
+ - **Infographics/media** — shareable, high-reach content
43
+ - **SEO landing pages** — targeting informational keywords
44
+
45
+ Query awareness content:
46
+ ```bash
47
+ # List recent blog posts (awareness stage content)
48
+ list_content(type="post", status="publish", per_page=50, orderby="date")
49
+ ```
50
+
51
+ ### Consideration Content (Middle of Funnel)
52
+
53
+ - **Product pages** — detailed product information
54
+ - **Category pages** — curated product collections
55
+ - **Comparison posts** — "Product A vs Product B"
56
+ - **Case studies/reviews** — social proof content
57
+
58
+ ### Decision Content (Bottom of Funnel)
59
+
60
+ - **Product detail with CTA** — pricing, buy button, urgency
61
+ - **Testimonials/reviews** — conversion reinforcement
62
+ - **FAQ pages** — objection handling
63
+ - **Pricing/plans pages** — clear value proposition
64
+
65
+ ## Funnel Drop-Off Analysis
66
+
67
+ ### Identifying Drop-Off Points
68
+
69
+ ```
70
+ Stage Visitors Drop-off Rate
71
+ ─────────────────────────────────────────────────
72
+ Blog post view 10,000 - 100%
73
+ Click to product 500 9,500 5.0%
74
+ Add to cart 80 420 16.0%
75
+ Begin checkout 50 30 62.5%
76
+ Complete purchase 35 15 70.0%
77
+ ─────────────────────────────────────────────────
78
+ Overall conversion: 35 / 10,000 = 0.35%
79
+ ```
80
+
81
+ ### Common Drop-Off Causes and Fixes
82
+
83
+ | Drop-Off Point | Common Cause | Fix |
84
+ |----------------|-------------|-----|
85
+ | Blog → Product | Weak CTA in blog post | Add prominent product CTA with UTM |
86
+ | Product → Cart | Missing social proof | Add reviews, ratings, trust badges |
87
+ | Cart → Checkout | Unexpected costs (shipping) | Show shipping calculator earlier |
88
+ | Checkout → Purchase | Complex checkout form | Simplify, enable guest checkout |
89
+ | Purchase → Re-order | No follow-up engagement | Set up post-purchase email sequence |
90
+
91
+ ## WooCommerce Cart Abandonment as Funnel Metric
92
+
93
+ Cart abandonment rate = (Carts created - Orders completed) / Carts created
94
+
95
+ ### Measuring with WooCommerce
96
+
97
+ ```bash
98
+ # Get total orders in period
99
+ wc_get_sales_report(period="month")
100
+ # Returns: total_orders, total_sales, etc.
101
+
102
+ # Compare with add-to-cart events (requires analytics plugin or custom tracking)
103
+ ```
104
+
105
+ ### Abandonment Recovery Strategies
106
+
107
+ 1. **Abandoned cart emails** — send 1h, 24h, 72h after abandonment
108
+ 2. **Exit-intent popup** — offer discount at checkout page exit
109
+ 3. **Retargeting ads** — Facebook/Google remarketing to cart abandoners
110
+ 4. **Simplified checkout** — reduce form fields, add payment options
111
+
112
+ ## Cross-Referencing Sales with Content Dates
113
+
114
+ Correlate content publication with sales spikes:
115
+
116
+ ```bash
117
+ # Get sales by date range
118
+ wc_get_sales_report(date_min="2025-01-01", date_max="2025-01-31")
119
+
120
+ # Get content published in same period
121
+ list_content(type="post", status="publish", after="2025-01-01", before="2025-01-31")
122
+ ```
123
+
124
+ **Analysis pattern:**
125
+ 1. Pull monthly sales report from WooCommerce
126
+ 2. Pull content published that month
127
+ 3. Identify sales spikes after content publication
128
+ 4. Match spikes with UTM source data on orders
129
+ 5. Calculate correlation: content publish date → sales uplift window (typically 1–7 days)
130
+
131
+ ## Decision Checklist
132
+
133
+ 1. Are funnel stages defined and mapped to content types? → Use table above as starting point
134
+ 2. Are drop-off rates measured at each stage? → Set up analytics tracking if not
135
+ 3. Is cart abandonment rate tracked? → Check WooCommerce reports or analytics plugin
136
+ 4. Are content publish dates correlated with sales data? → Cross-reference monthly
137
+ 5. Are recovery strategies in place for the biggest drop-off point? → Prioritize highest-impact fix