claude-plugin-wordpress-manager 2.2.0 → 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 (34) hide show
  1. package/.claude-plugin/plugin.json +2 -2
  2. package/CHANGELOG.md +26 -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/docs/GUIDE.md +116 -28
  7. package/package.json +8 -3
  8. package/skills/wordpress-router/references/decision-tree.md +8 -2
  9. package/skills/wp-content/SKILL.md +1 -0
  10. package/skills/wp-content-attribution/SKILL.md +97 -0
  11. package/skills/wp-content-attribution/references/attribution-models.md +189 -0
  12. package/skills/wp-content-attribution/references/conversion-funnels.md +137 -0
  13. package/skills/wp-content-attribution/references/reporting-dashboards.md +199 -0
  14. package/skills/wp-content-attribution/references/roi-calculation.md +202 -0
  15. package/skills/wp-content-attribution/references/utm-tracking-setup.md +161 -0
  16. package/skills/wp-content-attribution/scripts/attribution_inspect.mjs +277 -0
  17. package/skills/wp-headless/SKILL.md +1 -0
  18. package/skills/wp-i18n/SKILL.md +1 -0
  19. package/skills/wp-multilang-network/SKILL.md +107 -0
  20. package/skills/wp-multilang-network/references/content-sync.md +182 -0
  21. package/skills/wp-multilang-network/references/hreflang-config.md +198 -0
  22. package/skills/wp-multilang-network/references/language-routing.md +234 -0
  23. package/skills/wp-multilang-network/references/network-architecture.md +119 -0
  24. package/skills/wp-multilang-network/references/seo-international.md +213 -0
  25. package/skills/wp-multilang-network/scripts/multilang_inspect.mjs +308 -0
  26. package/skills/wp-multisite/SKILL.md +1 -0
  27. package/skills/wp-programmatic-seo/SKILL.md +97 -0
  28. package/skills/wp-programmatic-seo/references/data-sources.md +200 -0
  29. package/skills/wp-programmatic-seo/references/location-seo.md +134 -0
  30. package/skills/wp-programmatic-seo/references/product-seo.md +147 -0
  31. package/skills/wp-programmatic-seo/references/technical-seo.md +197 -0
  32. package/skills/wp-programmatic-seo/references/template-architecture.md +125 -0
  33. package/skills/wp-programmatic-seo/scripts/programmatic_seo_inspect.mjs +264 -0
  34. package/skills/wp-woocommerce/SKILL.md +1 -0
@@ -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
@@ -0,0 +1,199 @@
1
+ # Reporting Dashboards
2
+
3
+ Use this file when setting up content attribution reporting — GA4 integration, analytics plugin configuration, dashboard KPIs, and automated reporting workflows.
4
+
5
+ ## WooCommerce + WordPress Analytics Correlation
6
+
7
+ The core reporting methodology links three data sources:
8
+
9
+ ```
10
+ WordPress Content Data WooCommerce Order Data Analytics Data
11
+ (list_content, post dates) + (wc_list_orders, order meta) + (GA4, MonsterInsights)
12
+ │ │ │
13
+ └──────────── Correlate via UTM campaign = post slug ─────────┘
14
+ ```
15
+
16
+ ### Manual Correlation Workflow
17
+
18
+ 1. **Export orders** with UTM meta for the reporting period
19
+ 2. **Export content** published in the same period
20
+ 3. **Match** `_last_utm_campaign` values to post slugs
21
+ 4. **Aggregate** revenue per post, per category, per content type
22
+ 5. **Rank** by revenue, ROI, or conversion rate
23
+
24
+ ## Google Analytics 4 Integration
25
+
26
+ ### UTM → GA4 → WooCommerce Reconciliation
27
+
28
+ GA4 automatically captures UTM parameters as session-level dimensions:
29
+
30
+ | GA4 Dimension | UTM Parameter | Use |
31
+ |---------------|--------------|-----|
32
+ | Session source | `utm_source` | Where traffic came from |
33
+ | Session medium | `utm_medium` | Channel type |
34
+ | Session campaign | `utm_campaign` | Specific campaign/post |
35
+ | Session manual ad content | `utm_content` | Link variant |
36
+ | Session manual term | `utm_term` | Search keyword |
37
+
38
+ **GA4 Exploration report for content attribution:**
39
+ 1. Go to Explore → Free-form
40
+ 2. Dimensions: Session campaign, Landing page
41
+ 3. Metrics: Sessions, Conversions, Revenue
42
+ 4. Filter: Session source = "blog"
43
+ 5. Sort by Revenue descending
44
+
45
+ ### Enhanced E-commerce Events
46
+
47
+ GA4 tracks the full purchase funnel when configured:
48
+ - `view_item` — product page view
49
+ - `add_to_cart` — item added to cart
50
+ - `begin_checkout` — checkout started
51
+ - `purchase` — order completed with revenue
52
+
53
+ ## MonsterInsights / WooCommerce Google Analytics Plugin
54
+
55
+ ### MonsterInsights Setup
56
+
57
+ MonsterInsights bridges WordPress content data with GA4:
58
+
59
+ 1. **Install:** MonsterInsights plugin (free tier sufficient for basic attribution)
60
+ 2. **Connect:** Link to GA4 property via the setup wizard
61
+ 3. **Enable:** Enhanced E-commerce tracking in MonsterInsights settings
62
+ 4. **Dashboard:** View top posts by revenue directly in WordPress admin
63
+
64
+ **Key MonsterInsights reports:**
65
+ - Top Landing Pages (awareness stage)
66
+ - Top Outbound Links (consideration stage)
67
+ - E-commerce Revenue by Source (attribution)
68
+ - Top Products (conversion stage)
69
+
70
+ ### WooCommerce Google Analytics Plugin (Official)
71
+
72
+ Alternative for sites already using GA4 without MonsterInsights:
73
+
74
+ 1. Install: "WooCommerce Google Analytics" (official extension)
75
+ 2. Enter GA4 Measurement ID
76
+ 3. Enable: Enhanced E-commerce events
77
+ 4. Events auto-tracked: `view_item`, `add_to_cart`, `purchase`
78
+
79
+ ## Custom Dashboard Options
80
+
81
+ ### WP Admin Dashboard Widget
82
+
83
+ Create a simple attribution summary widget:
84
+
85
+ ```php
86
+ add_action('wp_dashboard_setup', function () {
87
+ wp_add_dashboard_widget(
88
+ 'content_attribution_widget',
89
+ 'Content Attribution — Top 5 Posts by Revenue',
90
+ function () {
91
+ // Query recent completed orders with UTM data
92
+ $orders = wc_get_orders([
93
+ 'status' => 'completed',
94
+ 'limit' => 100,
95
+ 'date_created' => '>' . date('Y-m-d', strtotime('-30 days')),
96
+ ]);
97
+ $revenue_by_campaign = [];
98
+ foreach ($orders as $order) {
99
+ $campaign = $order->get_meta('_last_utm_campaign');
100
+ if ($campaign) {
101
+ $revenue_by_campaign[$campaign] = ($revenue_by_campaign[$campaign] ?? 0) + $order->get_total();
102
+ }
103
+ }
104
+ arsort($revenue_by_campaign);
105
+ echo '<table><tr><th>Content</th><th>Revenue</th></tr>';
106
+ $i = 0;
107
+ foreach ($revenue_by_campaign as $campaign => $revenue) {
108
+ if ($i++ >= 5) break;
109
+ echo '<tr><td>' . esc_html($campaign) . '</td><td>' . wc_price($revenue) . '</td></tr>';
110
+ }
111
+ echo '</table>';
112
+ }
113
+ );
114
+ });
115
+ ```
116
+
117
+ ### External BI Tools
118
+
119
+ For larger operations, export data to external dashboards:
120
+
121
+ | Tool | Integration Method | Cost |
122
+ |------|-------------------|------|
123
+ | Google Looker Studio | GA4 connector + WC data export | Free |
124
+ | Tableau | WooCommerce REST API → CSV/database | Paid |
125
+ | Metabase | Direct MySQL/PostgreSQL connection | Free (self-hosted) |
126
+ | Power BI | REST API connector or CSV import | Paid |
127
+
128
+ ## Automated Reporting
129
+
130
+ ### Monthly Content Attribution Report Template
131
+
132
+ ```
133
+ ## Content Attribution Report — {Month} {Year}
134
+
135
+ ### Summary
136
+ - Total content-attributed revenue: ${total}
137
+ - Orders with UTM attribution: {count} ({percentage}% of total orders)
138
+ - Top attribution model used: {model}
139
+
140
+ ### Top 10 Converting Content Pieces
141
+ | Rank | Post | Revenue | Orders | Avg Order Value |
142
+ |------|------|---------|--------|-----------------|
143
+ | 1 | {title} | ${rev} | {n} | ${aov} |
144
+ | ... | ... | ... | ... | ... |
145
+
146
+ ### Revenue by Content Category
147
+ | Category | Revenue | Posts | Revenue/Post |
148
+ |----------|---------|-------|-------------|
149
+ | {cat} | ${rev} | {n} | ${rpp} |
150
+
151
+ ### Revenue by Source
152
+ | Source | Revenue | Orders | CAC |
153
+ |--------|---------|--------|-----|
154
+ | blog | ${rev} | {n} | ${cac} |
155
+ | newsletter | ${rev} | {n} | ${cac} |
156
+
157
+ ### Recommendations
158
+ - Invest more in: {top category}
159
+ - Reduce investment in: {lowest ROI category}
160
+ - Content gap: {opportunity identified}
161
+ ```
162
+
163
+ ### Automation via WP-Cron
164
+
165
+ Schedule monthly report generation:
166
+
167
+ ```php
168
+ // Register cron event
169
+ if (!wp_next_scheduled('generate_attribution_report')) {
170
+ wp_schedule_event(time(), 'monthly', 'generate_attribution_report');
171
+ }
172
+
173
+ add_action('generate_attribution_report', function () {
174
+ // Generate report data (query orders, correlate with content)
175
+ // Save as a private post or send via email
176
+ // Uses same logic as dashboard widget but for full month
177
+ });
178
+ ```
179
+
180
+ ## Key KPIs Dashboard
181
+
182
+ The essential metrics for an at-a-glance attribution dashboard:
183
+
184
+ | KPI | Description | Update Frequency |
185
+ |-----|-------------|-----------------|
186
+ | **Content-Attributed Revenue** | Total revenue from orders with UTM data | Weekly |
187
+ | **Top Converting Post** | Post with highest attributed revenue this month | Monthly |
188
+ | **Attribution Rate** | % of orders with UTM attribution data | Weekly |
189
+ | **Content ROI** | (Revenue - Cost) / Cost × 100% | Monthly |
190
+ | **CAC by Source** | Customer acquisition cost per channel | Monthly |
191
+ | **Revenue/Post Trend** | Month-over-month revenue per post | Monthly |
192
+
193
+ ## Decision Checklist
194
+
195
+ 1. Is GA4 connected and tracking enhanced e-commerce events? → Verify in GA4 Realtime report
196
+ 2. Is MonsterInsights or equivalent analytics plugin active? → Check WordPress admin dashboard
197
+ 3. Are WooCommerce orders showing UTM meta data? → Spot-check 5 recent orders
198
+ 4. Is a monthly report process defined (manual or automated)? → Set up template + schedule
199
+ 5. Are KPIs reviewed and actioned on regularly? → Schedule monthly review meeting