Skip to content

Marketing skills for Claude Code and AI agents. CRO, copywriting, SEO, analytics, and growth engineering.

fix(attribution): keep analytics failures non-fatal in the webhook

Rudy Celekli3ee6c7724ba0
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.json
index ea384a9..a6f60db 100644
--- a/.claude-plugin/marketplace.json
+++ b/.claude-plugin/marketplace.json
@@ -6,7 +6,7 @@
},
"metadata": {
"description": "Marketing skills for AI agents — conversion optimization, copywriting, SEO, paid ads, and growth",
- "version": "2.11.17",
+ "version": "2.11.18",
"repository": "https://github.com/coreyhaines31/marketingskills"
},
"plugins": [
diff --git a/.claude-plugin/plugin.json b/.claude-plugin/plugin.json
index 83527da..d155ceb 100644
--- a/.claude-plugin/plugin.json
+++ b/.claude-plugin/plugin.json
@@ -1,7 +1,7 @@
{
"name": "marketing-skills",
"description": "Marketing skills for AI agents — conversion optimization, copywriting, SEO, paid ads, ad creative, and growth",
- "version": "2.11.17",
+ "version": "2.11.18",
"author": {
"name": "Corey Haines"
},
diff --git a/.codex-plugin/plugin.json b/.codex-plugin/plugin.json
index 7f59e6e..5884655 100644
--- a/.codex-plugin/plugin.json
+++ b/.codex-plugin/plugin.json
@@ -1,7 +1,7 @@
{
"name": "marketing-skills",
"description": "Marketing skills for AI agents — conversion optimization, copywriting, SEO, paid ads, ad creative, and growth",
- "version": "2.11.17",
+ "version": "2.11.18",
"author": {
"name": "Corey Haines"
},
diff --git a/VERSIONS.md b/VERSIONS.md
index 404f2de..b240204 100644
--- a/VERSIONS.md
+++ b/VERSIONS.md
@@ -9,7 +9,7 @@ Current versions of all skills. Agents can compare against local versions to che
| ai-seo | 2.7.2 | 2026-10-02 |
| analytics | 2.0.2 | 2026-10-02 |
| aso | 2.0.1 | 2026-08-19 |
-| attribution | 1.1.2 | 2026-10-02 |
+| attribution | 1.1.3 | 2026-10-06 |
| churn-prevention | 2.0.1 | 2026-10-02 |
| co-marketing | 2.0.2 | 2026-10-02 |
| cold-email | 2.1.0 | 2026-10-02 |
@@ -57,6 +57,10 @@ Current versions of all skills. Agents can compare against local versions to che
## Recent Changes
+### 2.11.18 (2026-10-06)
+
+- **attribution** (1.1.2 → 1.1.3): keep webhook analytics timeout/network failures non-fatal and report rejected HTTP ingestion without logging identity data. Add a matching diagnostic eval.
+
### 2.11.17 (2026-10-02)
- **video** (2.2.0 → 2.2.1) and the **Hyperframes integration guide** (reported in #600 by @pjthegiant): the old example called a `render({ frames })` API that the `hyperframes` package doesn't export. Both now lead with the CLI (`npx hyperframes init`, `preview`, `render -o output.mp4`) and explain the composition format: a root with `data-composition-id`, `class="clip"` elements with timing attributes, and a paused GSAP timeline. Rendering from code goes through `@hyperframes/producer` (`createRenderJob` + `executeRenderJob`). Checked against v0.8.114.
diff --git a/skills/attribution/SKILL.md b/skills/attribution/SKILL.md
index 310f30f..61a013d 100644
--- a/skills/attribution/SKILL.md
+++ b/skills/attribution/SKILL.md
@@ -2,7 +2,7 @@
name: attribution
description: When the user wants to figure out which marketing actually drives conversions and revenue, choose or interpret an attribution model, or reconcile conflicting numbers across tools. Also use when the user mentions "attribution," "attribution model," "first-touch vs last-touch," "multi-touch," "which channel drives revenue," "what's my real CAC," "my dashboards disagree," "Google/Meta says X but GA says Y," "media mix model," "MMM," "incrementality," "geo lift," "holdout test," "how did you hear about us," "self-reported attribution," "dark social," or wants to instrument attribution themselves — "stitch my bookings to their source," "SavvyCal/Calendly attribution," "close the identify gap," "track conversions on a third-party domain," "first-party / self-hosted attribution." For event tracking setup and UTMs, see analytics. For ad-platform pixels/CAPI, see ads. For pipeline and CRM revenue reporting, see revops. For the AI-search attribution blind spot, see ai-seo.
metadata:
- version: 1.1.2
+ version: 1.1.3
---
# Attribution
diff --git a/skills/attribution/evals/evals.json b/skills/attribution/evals/evals.json
index ef2d62f..9e78e17 100644
--- a/skills/attribution/evals/evals.json
+++ b/skills/attribution/evals/evals.json
@@ -97,6 +97,19 @@
"References the by-business-type or measurement-paradigms guidance"
],
"files": []
+ },
+ {
+ "id": 8,
+ "prompt": "Our booking webhook sends PostHog identity and conversion events with fetch and a three-second timeout. When analytics times out it fails the webhook; HTTP 503 resolves without any diagnostic. How should the attribution recipe preserve a successful booking and show ingestion failures without exposing identities?",
+ "expected_output": "Should run analytics after business-critical work, catch network and timeout rejections, inspect response.ok for rejected HTTP ingestion, and emit only a booking identifier plus safe status diagnostics. Keep analytics non-fatal for the booking. Do not log the email, payload or raw exception, or claim a fulfilled fetch means events were accepted. If reliable delivery is required, recommend a separate idempotent queue rather than replaying the booking.",
+ "assertions": [
+ "Catches timeout and network rejection without failing the booking",
+ "Checks HTTP response acceptance separately from promise fulfillment",
+ "Logs only booking identifier and safe status",
+ "Keeps payload, email and raw exception out of diagnostics",
+ "Separates reliable analytics delivery from booking execution"
+ ],
+ "files": []
}
]
}
diff --git a/skills/attribution/references/first-party-tracking.md b/skills/attribution/references/first-party-tracking.md
index 93a9c31..14c7a96 100644
--- a/skills/attribution/references/first-party-tracking.md
+++ b/skills/attribution/references/first-party-tracking.md
@@ -126,12 +126,22 @@ events.push({
properties: { booking_id, journey_linked: Boolean(anonId) }, // track the fallback rate
});
-await fetch(`${POSTHOG_HOST}/batch/`, {
- method: "POST",
- headers: { "Content-Type": "application/json" },
- body: JSON.stringify({ api_key: POSTHOG_API_KEY, batch: events }),
- signal: AbortSignal.timeout(3000), // bound it; never hang the webhook
-});
+// Run after the booking's business-critical work; analytics must not fail it.
+try {
+ const response = await fetch(`${POSTHOG_HOST}/batch/`, {
+ method: "POST",
+ headers: { "Content-Type": "application/json" },
+ body: JSON.stringify({ api_key: POSTHOG_API_KEY, batch: events }),
+ signal: AbortSignal.timeout(3000),
+ });
+ // fetch resolves for HTTP errors too; a resolved promise isn't acceptance.
+ if (!response.ok) {
+ console.warn("Analytics ingestion rejected", { booking_id, status: response.status });
+ }
+} catch {
+ // Timeouts and network errors stay non-fatal. Never log the payload or email.
+ console.warn("Analytics ingestion unavailable", { booking_id });
+}
```
When no id survives (link bypassed the decorator, e.g. a booking link inside a generated email/PDF), fall back to **email-only capture** with `journey_linked: false`. You still get the conversion; you just don't get the journey for that one.
@@ -193,7 +203,7 @@ Mark these fallback-attributed conversions with a lower-confidence `basis` (see
- Verify the provider's **signature** (`SAVVYCAL_WEBHOOK_SECRET` etc.).
- **Validate** the smuggled id (string, ≤100 chars, no `@`) before merging.
-- Run the analytics call **after** any business-critical work, bounded by a timeout, **non-fatal** on failure.
+- Run the analytics call **after** any business-critical work, bounded by a timeout, **non-fatal** on failure. Check HTTP status and catch timeout/network rejections, as in Step 2c. If delivery needs retry guarantees, enqueue analytics separately with idempotency rather than failing or replaying the booking.
- **Log the booking id, never the email.**
## Step 4 — Report