Agent recipes
Step-by-step playbooks an agent (or a human) can follow with the MCP tools or the REST API — Google Ads setup, fraud investigation, smart-link design, offline conversions.
Updated 2026-09-02
Each recipe lists the tools in order. REST equivalents are in the API reference.
Recipe 1 — Set up certified Google Ads tracking#
get_doc→tracking/transparency,tracking/template.list_domains→ confirm the tracking domain isACTIVE; if not, return the CNAME (edge.whichclick.is) and TXT records and stop.list_campaigns→ reuse orcreate_campaign(external_id= Google Ads campaign id).create_tracking_link(domain,default_final_url,campaign_id) → returnstracking_templateandfinal_url_suffix.- Give the user the curl self-test from the response; after they paste the template,
list_clicks(link_slug) to confirmforceTransparent=trueclicks arrive. get_doc→tracking/complianceand walk through the checklist.
Recipe 2 — Investigate invalid clicks#
get_protection_stats(days: 7) → invalid rate, reasons, top IPs, incidents.get_metric_timeseries(metric: invalid_rate,days: 30) → trend.lookup_ipon each top IP → type, ASN, org.list_clicks(limit: 200) → cross-check verdicts against campaigns / keywords.- Recommend:
block_ipfor clear datacenter / VPN sources, ablockrule onipType in [DATACENTER, TOR]for smart links, andget_doc→protect/google-ads-syncfor the exclusion export. Ask before writing.
Recipe 3 — Design and verify a smart link#
get_doc→attribution/smart-links,attribution/routing-rules.list_apps→ app id, scheme, universal-link host.- Draft rules JSON;
validate_routing_rules. create_smart_link→update_smart_link_routing.test_smart_link_routefor iOS / Android / desktop / in-app-browser / target-country profiles; report each decision.
Recipe 4 — Offline conversion import to Google Ads#
list_clicks(since,limit: 500) orGET /api/v1/clickspaged bysince.- Join CRM outcomes on
wc_click_id; keepgclid,gbraid,wbraid. - Build the Google Ads offline conversion upload (gclid, conversion name, time in the account timezone, value, currency).
- Mirror each outcome into WhichClick with
record_conversion(order_idfor idempotency) so ROAS matches.
Recipe 5 — Weekly performance summary#
get_overview(days: 7) andget_pivot_report(dimension: campaign).get_cohorts(weeks: 4) for retention and LTV.recent_alertsfor anything open.- Summarise spend, CPI, ROAS, invalid rate, notable movers; link to
https://app.whichclick.is/dashboard.
Recipe 6 — Ship the mobile SDK#
get_doc→attribution/sdk,attribution/methods.list_apps→ SDK key (masked; the user copies it from the dashboard).- Produce platform code for configure / consent / deep links / events from the SDK page.
- Verify with
list_clicks→get_metric_timeseries(installs) after the first test install.