feat: add attribution tools (get_top_creatives, analyze_customer_journeys, compare_attribution_models, get_recent_conversions, get_top_landing_pages)#2
Open
jshorwitz wants to merge 1 commit into
Conversation
…er_journeys, compare_attribution_models, get_recent_conversions, get_top_landing_pages) Exposes five read-only attribution analysis tools that let external Claude Code users query Synter's attribution data directly from their agentic workflows. All five tools route through the new POST /api/v1/attribution backend endpoint using the existing API key auth pattern. Tools added: - get_top_creatives: cross-platform creative leaderboard by spend/conversions/clicks/CTR/ROAS - analyze_customer_journeys: multi-touch journey analysis with sankey flow + channel overlap - compare_attribution_models: first/last/linear/time-decay/position/Markov/Shapley comparison - get_recent_conversions: live per-account conversion feed with attributed source - get_top_landing_pages: Synter LP + pixel-tracked site page performance leaderboard Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
@synterai/mcp-serverpackage (v1.3.0)POST /api/v1/attributionbackend endpoint (see companion PR in synter-media)readOnlyHint: trueand only read attribution data scoped to the caller's API keyTools:
get_top_creatives— cross-platform creative leaderboard by spend/conversions/clicks/CTR/ROAS, with thumbnail URLs, headlines, and CPAanalyze_customer_journeys— multi-touch journey analysis: sankey flow data, channel overlap (solo vs assisted), top paths, average touches to convertcompare_attribution_models— runs all 7 models (first/last/linear/time-decay/position/Markov/Shapley) over the same conversion-path data and shows per-channel credit deltas vs last-touchget_recent_conversions— live per-account conversion feed with deterministic source attribution (platform click IDs) + UTM fallbackget_top_landing_pages— Synter-built LP metrics (views/CTA clicks/leads) + pixel-tracked site page metrics (views/conversions/conversion rate)Backend dependency
Requires the companion PR in synter-media:
feat/v1-attribution-api— addsPOST /api/v1/attributionwith API key auth that dispatches toexecuteAttributionTool.Test plan
npm run buildpasses (TypeScript clean — verified locally)get_top_creativesreturns leaderboard rows withgranularity,rows, and summary fieldsanalyze_customer_journeysreturnssankey,channelOverlap,topPaths, summary stats (no rawattributionPaths)compare_attribution_modelsreturns per-channel credit for each requested modelget_recent_conversionsreturns conversion rows scoped to the API key's userget_top_landing_pagesreturnssynterPagesandsitePagesarraysUNKNOWN_TOOL🤖 Generated with Claude Code