Marketing skills for Claude Code and AI agents. CRO, copywriting, SEO, analytics, and growth engineering.
JavaScript agent-skillsai-agentsai-seoclaudeclaude-codeclaude-code-pluginclaude-skillscodexcontent-marketingconversion-rate-optimizationcopywritingcursoremail-marketinggenerative-engine-optimizationgrowth-marketingmarketingmarketing-automationsaas-marketingseoskill-md
fix(attribution): clear stale booking-link identity metadata
Rudy Celeklia651458d3a1a
diff --git a/.claude-plugin/marketplace.json b/.claude-plugin/marketplace.jsonindex 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.jsonindex 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.jsonindex 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.mdindex 404f2de..22adba6 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): clear previously decorated booking-link metadata when the current identity is rejected or unavailable; preserve other URL components and cover repeated click/auxclick activation. Adds a stale-ID evaluation scenario.+### 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.mdindex 310f30f..61a013d 100644--- a/skills/attribution/SKILL.md+++ b/skills/attribution/SKILL.md@@ -2,7 +2,7 @@name: attributiondescription: 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---# Attributiondiff --git a/skills/attribution/evals/evals.json b/skills/attribution/evals/evals.jsonindex ef2d62f..1871b25 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 capture-phase SavvyCal decorator added metadata[ph_distinct_id]=anonymous-old to a booking anchor. On the same page the visitor identifies by email, then activates that same anchor again (including middle-click). Our helper correctly returns null for the identified email. Is returning early enough to fail closed? Preserve the booking path, campaign query parameter and fragment.",+ "expected_output": "Should recognize that anchor.href is already mutated: returning early preserves the old anonymous ID. On each supported booking-link activation, set the metadata parameter when a current safe anonymous ID exists, otherwise delete only metadata[ph_distinct_id] and write the refreshed URL back. Apply to click and auxclick, including unavailable identity. Preserve unrelated query parameters, hash, destination and unrelated hosts. Keep the existing identity-model guard; do not use identified email/UUID as a substitute.",+ "assertions": [+ "Explains why early return retains stale metadata on a reused anchor",+ "Deletes only the attribution parameter when identity is rejected or unavailable",+ "Refreshes the parameter for a new valid anonymous ID",+ "Covers click and auxclick without changing unrelated destinations or URL components",+ "Does not substitute an identified user ID"+ ],+ "files": []}]}diff --git a/skills/attribution/references/first-party-tracking.md b/skills/attribution/references/first-party-tracking.mdindex 93a9c31..4321134 100644--- a/skills/attribution/references/first-party-tracking.md+++ b/skills/attribution/references/first-party-tracking.md@@ -53,7 +53,7 @@ When the conversion completes on a third-party domain (a booking tool, hosted chOne document-level listener rewrites every outbound booking link at click time — no per-CTA edits, and it covers plain clicks, keyboard activation, and middle-click (`auxclick`):```js-// Append the anonymous distinct_id to any SavvyCal link at click time.+// Refresh anonymous metadata on each SavvyCal activation; clear stale IDs.function decorate(e) {const anchor = e.target?.closest?.("a[href]");if (!(anchor instanceof HTMLAnchorElement)) return;@@ -64,15 +64,20 @@ function decorate(e) {if (host !== "savvycal.com" && !host.endsWith(".savvycal.com")) return;const distinctId = getPostHogDistinctId(); // anonymous-only — see guard- if (!distinctId) return; // fail closed-- url.searchParams.set("metadata[ph_distinct_id]", distinctId);+ if (distinctId) {+ url.searchParams.set("metadata[ph_distinct_id]", distinctId);+ } else {+ // The same anchor may have been decorated before identify() or reset().+ url.searchParams.delete("metadata[ph_distinct_id]");+ }anchor.href = url.toString();}document.addEventListener("click", decorate, true); // capture phasedocument.addEventListener("auxclick", decorate, true);```+An early return when the guard rejects the current ID leaves any previously added metadata on the anchor. Remove that one parameter instead, preserving the booking path, other parameters and fragment. Check both `click` and `auxclick` after an identity change.+For an **inline embed** (e.g. `/demo` with an embedded calendar), pass the same id in the embed's metadata config instead; poll briefly (~2s) for the id on fresh visits, but never block the calendar from rendering.### 2b — Read the anonymous id safely