[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill-posthog-exploring-autocapture-events":3,"mdc-c4a6e0-key":34,"related-repo-posthog-exploring-autocapture-events":2930,"related-org-posthog-exploring-autocapture-events":3041},{"slug":4,"name":4,"fn":5,"description":6,"org":7,"tags":11,"stars":23,"repoUrl":24,"updatedAt":25,"license":26,"forks":27,"topics":28,"repo":29,"sourceUrl":32,"mdContent":33},"exploring-autocapture-events","explore PostHog autocapture events and selectors","Guides exploration of $autocapture events captured by posthog-js to understand user interactions, find CSS selectors (especially data-attr attributes), evaluate selector uniqueness, query matching clicks ad-hoc, and create actions. Use when the user asks about autocapture data, wants to find what users are clicking, needs to build actions from click events, asks about elements_chain, wants to build a trend or funnel filtered by clicks or other autocapture interactions, asks which properties autocapture sends, or asks how to filter $autocapture events. Only applies to projects using posthog-js autocapture.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},"posthog","PostHog","https:\u002F\u002Fpexgzepcugksgbtrxkhf.supabase.co\u002Fstorage\u002Fv1\u002Fobject\u002Fpublic\u002Forg-logos\u002Fposthog.png",[12,14,17,20],{"name":9,"slug":8,"type":13},"tag",{"name":15,"slug":16,"type":13},"UX Copy","ux-copy",{"name":18,"slug":19,"type":13},"Analytics","analytics",{"name":21,"slug":22,"type":13},"Frontend","frontend",56,"https:\u002F\u002Fgithub.com\u002FPostHog\u002Fskills","2026-04-15T05:06:01.908657",null,4,[],{"repoUrl":24,"stars":23,"forks":27,"topics":30,"description":31},[],"PostHog skills (under construction)","https:\u002F\u002Fgithub.com\u002FPostHog\u002Fskills\u002Ftree\u002FHEAD\u002Fskills\u002Fomnibus\u002Fexploring-autocapture-events","---\nname: exploring-autocapture-events\ndescription: >\n  Guides exploration of $autocapture events captured by posthog-js to understand user interactions,\n  find CSS selectors (especially data-attr attributes), evaluate selector uniqueness, query matching\n  clicks ad-hoc, and create actions. Use when the user asks about autocapture data, wants to find\n  what users are clicking, needs to build actions from click events, asks about elements_chain,\n  wants to build a trend or funnel filtered by clicks or other autocapture interactions, asks which\n  properties autocapture sends, or asks how to filter $autocapture events. Only applies to projects\n  using posthog-js autocapture.\n---\n\n# Exploring autocapture events\n\nif users opt in then posthog-js automatically captures clicks, form submissions, and page changes as `$autocapture` events.\nEach event records the clicked DOM element and its ancestors in the `elements_chain` column.\n\n`$autocapture` is intentionally excluded from the `posthog:read-data-schema` taxonomy\nbecause it is only useful with autocapture-specific filters (selector, tag, text, href).\nThis skill fills that gap.\n\n## Materialized columns\n\nThe `events` table provides fast access to common element fields without parsing the full chain string.\n\n| Column                    | Type          | Description                                                                                            |\n| ------------------------- | ------------- | ------------------------------------------------------------------------------------------------------ |\n| `elements_chain`          | String        | Full semicolon-separated element chain (see [format reference](.\u002Freferences\u002Felements-chain-format.md)) |\n| `elements_chain_href`     | String        | Last href value from the chain                                                                         |\n| `elements_chain_texts`    | Array(String) | All text values from elements                                                                          |\n| `elements_chain_ids`      | Array(String) | All id attribute values                                                                                |\n| `elements_chain_elements` | Array(String) | Useful tag names: a, button, input, select, textarea, label                                            |\n\nUse materialized columns for exploration queries whenever possible — they avoid regex parsing.\n\n## Canonical autocapture properties\n\nEvery `$autocapture` event from posthog-js ships with a fixed set of properties.\nDo not query the schema to \"look them up\" — they are these:\n\n| Property          | Examples                          | Notes                                                       |\n| ----------------- | --------------------------------- | ----------------------------------------------------------- |\n| `$event_type`     | `click`, `submit`, `change`       | the kind of interaction                                     |\n| `$el_text`        | `Sign up`, `Submit`               | text of the clicked element                                 |\n| `$current_url`    | `https:\u002F\u002Fapp.example.com\u002Fpricing` | page the interaction happened on                            |\n| `$elements_chain` | semicolon-separated chain         | parsed via the `elements_chain*` materialized columns above |\n\nStandard event properties (`$browser`, `$os`, `$device_type`, etc.) are also present.\n\n## Workflow\n\n### 1. Confirm autocapture data exists\n\nRun a count query before doing anything else.\nIf the count is zero, autocapture may be disabled. There are two ways this happens:\n\n- **Project settings** — the team can set `autocapture_opt_out` in PostHog project settings\n- **SDK config** — the posthog-js `init()` call can pass `autocapture: false`\n\nTell the user if no data is found so they can check both settings.\n\n```sql\nSELECT count() as cnt\nFROM events\nWHERE event = '$autocapture'\n  AND timestamp > now() - INTERVAL 7 DAY\n```\n\n### 2. Explore what users are interacting with\n\nStart broad using the materialized columns.\nThe goal is to understand what users are clicking before narrowing down.\n\nUseful explorations:\n\n- Top clicked tag names (via `elements_chain_elements`)\n- Top clicked text values (via `elements_chain_texts`)\n- Top clicked hrefs (via `elements_chain_href`)\n- Raw `elements_chain` values for a specific page (filtered by `properties.$current_url`)\n\nSee [example queries](.\u002Freferences\u002Fexample-queries.md) for all patterns.\n\n### 3. Find candidate selectors\n\nOnce the user identifies an interaction they care about, find a CSS selector that identifies it.\n\nPriority order for selector attributes (best first):\n\n1. **`data-attr` or other `data-*` attributes** — highest specificity, stable across deploys, developer-intended anchors.\n   Search with `match(elements_chain, 'data-attr=')` or `extractAll`.\n2. **Element ID** (`attr_id`) — also highly stable, queryable via `elements_chain_ids`.\n3. **Tag + class combination** — moderately stable but classes change with CSS refactors.\n4. **Text content** — fragile (changes with copy edits, i18n) but sometimes the only option.\n5. **Tag name alone** — too broad on its own, useful as a qualifier.\n\nWhen a `data-attr` value is found, construct a selector like `[data-attr=\"value\"]` or `button[data-attr=\"value\"]`.\n\n### 4. Evaluate selector uniqueness\n\nA selector is only useful if it matches the intended interaction and not unrelated events.\n\nRun a uniqueness check using `elements_chain =~` with the regex pattern for the selector.\nThen sample matching events to inspect what the selector actually captures.\nCompare the count against total autocapture volume to understand selectivity.\n\nA good selector matches a single logical interaction.\nIf it matches too many distinct elements, refine it in the next step.\n\n### 5. Refine with additional filters\n\nIf the selector alone is not unique enough, layer on additional filters:\n\n- **Text filter** — match by element text content using `elements_chain_texts`\n- **URL filter** — restrict to a specific page using `properties.$current_url`\n- **Href filter** — match by link target using `elements_chain_href`\n\nRe-run the uniqueness check after each refinement.\nOnly include filters that are needed — fewer filters means more resilience to minor DOM changes.\n\n### 6. Filter autocapture inside an insight query\n\nWhen the user wants a funnel, trend, or other insight, the filter shape is different from HogQL.\nEach step in a `FunnelsQuery` \u002F `TrendsQuery` is an `EventsNode` (or `ActionsNode`) with `event: \"$autocapture\"` and a `properties` array.\n\nTwo distinct property `type` values matter — they are not interchangeable:\n\n- **`type: \"element\"`** — keys: `selector`, `tag_name`, `text`, `href`. Matched against the parsed `elements_chain`. Operator support is split:\n  - `selector` and `tag_name` only support `exact` and `is_not` — anything else raises `NotImplementedError` in the query compiler (`posthog\u002Fhogql\u002Fproperty.py`).\n  - `text` and `href` accept the full string operator set (`exact`, `is_not`, `icontains`, `not_icontains`, `regex`, `not_regex`, `is_set`, `is_not_set`).\n- **`type: \"event\"`** — keys: any of the canonical autocapture properties (`$event_type`, `$el_text`, `$current_url`) or anything else on the event. Standard event-property operators (`exact`, `icontains`, `regex`, etc.).\n\nExample funnel from clicking one button to clicking another:\n\n```json\n{\n  \"kind\": \"FunnelsQuery\",\n  \"series\": [\n    {\n      \"kind\": \"EventsNode\",\n      \"event\": \"$autocapture\",\n      \"properties\": [\n        {\n          \"type\": \"element\",\n          \"key\": \"selector\",\n          \"value\": [\"[data-attr=\\\"autocapture-series-save-as-action-banner-shown\\\"]\"],\n          \"operator\": \"exact\"\n        }\n      ]\n    },\n    {\n      \"kind\": \"EventsNode\",\n      \"event\": \"$autocapture\",\n      \"properties\": [\n        {\n          \"type\": \"element\",\n          \"key\": \"selector\",\n          \"value\": [\"[data-attr=\\\"autocapture-save-as-action\\\"]\"],\n          \"operator\": \"exact\"\n        }\n      ]\n    }\n  ]\n}\n```\n\nTwo things easy to get wrong:\n\n- `value` is an array even when matching a single selector\n- The selector string includes the `[data-attr=\"...\"]` wrapper — it is a CSS selector, not a bare attribute value\n\nDecision rule: prefer an action (`ActionsNode` referencing an existing action — see Step 8) when the interaction will be referenced more than once; inline `type: \"element\"` \u002F `type: \"event\"` filters when it's a one-off insight; raw HogQL (Step 7) when joining across events or doing custom aggregations.\n\n### 7. Use in ad-hoc queries\n\nThe discovered selector can be used directly in HogQL without creating an action.\n\n**Trends** — count matching clicks over time:\n\n```sql\nSELECT\n  toStartOfDay(timestamp) as day,\n  count() as clicks\nFROM events\nWHERE event = '$autocapture'\n  AND timestamp > now() - INTERVAL 14 DAY\n  AND elements_chain =~ '(^|;)button.*?data-attr=\"checkout\"'\nGROUP BY day\nORDER BY day\n```\n\n**Funnel** — pageview to click conversion:\n\n```sql\nSELECT\n  person_id,\n  first_pageview,\n  first_click_after\nFROM (\n  SELECT\n    p.person_id,\n    p.pageview_time as first_pageview,\n    min(c.click_time) as first_click_after\n  FROM (\n    SELECT person_id, min(timestamp) as pageview_time\n    FROM events\n    WHERE event = '$pageview'\n      AND timestamp > now() - INTERVAL 14 DAY\n      AND properties.$current_url ILIKE '%\u002Fpricing%'\n    GROUP BY person_id\n  ) p\n  INNER JOIN (\n    SELECT person_id, timestamp as click_time\n    FROM events\n    WHERE event = '$autocapture'\n      AND timestamp > now() - INTERVAL 14 DAY\n      AND elements_chain =~ '(^|;)button.*?data-attr=\"signup\"'\n  ) c ON p.person_id = c.person_id AND c.click_time > p.pageview_time\n  GROUP BY p.person_id, p.pageview_time\n)\n```\n\nFor recurring analysis, prefer creating an action (next step) or using `posthog:query-trends` \u002F `posthog:query-funnel` with the action.\n\n### 8. Create an action\n\nActions are the durable version of ad-hoc selector queries.\nOnce the criteria uniquely identify the interaction, create an action using `posthog:action-create`.\n\nConstruct the step with only the filters needed for uniqueness:\n\n```json\n{\n  \"name\": \"Clicked checkout button\",\n  \"steps\": [\n    {\n      \"event\": \"$autocapture\",\n      \"selector\": \"button[data-attr='checkout']\",\n      \"text\": \"Complete Purchase\",\n      \"text_matching\": \"exact\",\n      \"url\": \"\u002Fcheckout\",\n      \"url_matching\": \"contains\"\n    }\n  ]\n}\n```\n\nAvailable step fields for `$autocapture`:\n\n- `selector` — CSS selector (e.g. `button[data-attr='checkout']`)\n- `tag_name` — HTML tag name (e.g. `button`, `a`, `input`)\n- `text` \u002F `text_matching` — element text (`exact`, `contains`, or `regex`)\n- `href` \u002F `href_matching` — link href (`exact`, `contains`, or `regex`)\n- `url` \u002F `url_matching` — page URL (`exact`, `contains`, or `regex`)\n\nAfter creation, verify with `matchesAction()`:\n\n```sql\nSELECT count() as matching_events\nFROM events\nWHERE matchesAction('Clicked checkout button')\n  AND timestamp > now() - INTERVAL 7 DAY\n```\n\n## Tips\n\n- Always set timestamp filters — `$autocapture` is high volume\n- Use `LIMIT` generously when sampling `elements_chain` — the strings can be long\n- The `elements_chain =~` operator matches CSS selectors as regex internally;\n  prefer materialized columns when possible for performance\n- This workflow only applies to posthog-js — other SDKs do not capture elements\n",{"data":35,"body":36},{"name":4,"description":6},{"type":37,"children":38},"root",[39,47,70,88,95,108,256,261,267,279,436,463,469,476,481,529,534,582,588,593,598,653,666,672,677,682,780,806,812,817,830,835,841,846,894,899,905,958,971,1196,1201,1919,1924,1950,1975,1981,1986,1996,2073,2083,2295,2315,2321,2333,2338,2654,2665,2818,2830,2867,2873,2924],{"type":40,"tag":41,"props":42,"children":43},"element","h1",{"id":4},[44],{"type":45,"value":46},"text","Exploring autocapture events",{"type":40,"tag":48,"props":49,"children":50},"p",{},[51,53,60,62,68],{"type":45,"value":52},"if users opt in then posthog-js automatically captures clicks, form submissions, and page changes as ",{"type":40,"tag":54,"props":55,"children":57},"code",{"className":56},[],[58],{"type":45,"value":59},"$autocapture",{"type":45,"value":61}," events.\nEach event records the clicked DOM element and its ancestors in the ",{"type":40,"tag":54,"props":63,"children":65},{"className":64},[],[66],{"type":45,"value":67},"elements_chain",{"type":45,"value":69}," column.",{"type":40,"tag":48,"props":71,"children":72},{},[73,78,80,86],{"type":40,"tag":54,"props":74,"children":76},{"className":75},[],[77],{"type":45,"value":59},{"type":45,"value":79}," is intentionally excluded from the ",{"type":40,"tag":54,"props":81,"children":83},{"className":82},[],[84],{"type":45,"value":85},"posthog:read-data-schema",{"type":45,"value":87}," taxonomy\nbecause it is only useful with autocapture-specific filters (selector, tag, text, href).\nThis skill fills that gap.",{"type":40,"tag":89,"props":90,"children":92},"h2",{"id":91},"materialized-columns",[93],{"type":45,"value":94},"Materialized columns",{"type":40,"tag":48,"props":96,"children":97},{},[98,100,106],{"type":45,"value":99},"The ",{"type":40,"tag":54,"props":101,"children":103},{"className":102},[],[104],{"type":45,"value":105},"events",{"type":45,"value":107}," table provides fast access to common element fields without parsing the full chain string.",{"type":40,"tag":109,"props":110,"children":111},"table",{},[112,136],{"type":40,"tag":113,"props":114,"children":115},"thead",{},[116],{"type":40,"tag":117,"props":118,"children":119},"tr",{},[120,126,131],{"type":40,"tag":121,"props":122,"children":123},"th",{},[124],{"type":45,"value":125},"Column",{"type":40,"tag":121,"props":127,"children":128},{},[129],{"type":45,"value":130},"Type",{"type":40,"tag":121,"props":132,"children":133},{},[134],{"type":45,"value":135},"Description",{"type":40,"tag":137,"props":138,"children":139},"tbody",{},[140,171,192,214,235],{"type":40,"tag":117,"props":141,"children":142},{},[143,152,157],{"type":40,"tag":144,"props":145,"children":146},"td",{},[147],{"type":40,"tag":54,"props":148,"children":150},{"className":149},[],[151],{"type":45,"value":67},{"type":40,"tag":144,"props":153,"children":154},{},[155],{"type":45,"value":156},"String",{"type":40,"tag":144,"props":158,"children":159},{},[160,162,169],{"type":45,"value":161},"Full semicolon-separated element chain (see ",{"type":40,"tag":163,"props":164,"children":166},"a",{"href":165},".\u002Freferences\u002Felements-chain-format.md",[167],{"type":45,"value":168},"format reference",{"type":45,"value":170},")",{"type":40,"tag":117,"props":172,"children":173},{},[174,183,187],{"type":40,"tag":144,"props":175,"children":176},{},[177],{"type":40,"tag":54,"props":178,"children":180},{"className":179},[],[181],{"type":45,"value":182},"elements_chain_href",{"type":40,"tag":144,"props":184,"children":185},{},[186],{"type":45,"value":156},{"type":40,"tag":144,"props":188,"children":189},{},[190],{"type":45,"value":191},"Last href value from the chain",{"type":40,"tag":117,"props":193,"children":194},{},[195,204,209],{"type":40,"tag":144,"props":196,"children":197},{},[198],{"type":40,"tag":54,"props":199,"children":201},{"className":200},[],[202],{"type":45,"value":203},"elements_chain_texts",{"type":40,"tag":144,"props":205,"children":206},{},[207],{"type":45,"value":208},"Array(String)",{"type":40,"tag":144,"props":210,"children":211},{},[212],{"type":45,"value":213},"All text values from elements",{"type":40,"tag":117,"props":215,"children":216},{},[217,226,230],{"type":40,"tag":144,"props":218,"children":219},{},[220],{"type":40,"tag":54,"props":221,"children":223},{"className":222},[],[224],{"type":45,"value":225},"elements_chain_ids",{"type":40,"tag":144,"props":227,"children":228},{},[229],{"type":45,"value":208},{"type":40,"tag":144,"props":231,"children":232},{},[233],{"type":45,"value":234},"All id attribute values",{"type":40,"tag":117,"props":236,"children":237},{},[238,247,251],{"type":40,"tag":144,"props":239,"children":240},{},[241],{"type":40,"tag":54,"props":242,"children":244},{"className":243},[],[245],{"type":45,"value":246},"elements_chain_elements",{"type":40,"tag":144,"props":248,"children":249},{},[250],{"type":45,"value":208},{"type":40,"tag":144,"props":252,"children":253},{},[254],{"type":45,"value":255},"Useful tag names: a, button, input, select, textarea, label",{"type":40,"tag":48,"props":257,"children":258},{},[259],{"type":45,"value":260},"Use materialized columns for exploration queries whenever possible — they avoid regex parsing.",{"type":40,"tag":89,"props":262,"children":264},{"id":263},"canonical-autocapture-properties",[265],{"type":45,"value":266},"Canonical autocapture properties",{"type":40,"tag":48,"props":268,"children":269},{},[270,272,277],{"type":45,"value":271},"Every ",{"type":40,"tag":54,"props":273,"children":275},{"className":274},[],[276],{"type":45,"value":59},{"type":45,"value":278}," event from posthog-js ships with a fixed set of properties.\nDo not query the schema to \"look them up\" — they are these:",{"type":40,"tag":109,"props":280,"children":281},{},[282,303],{"type":40,"tag":113,"props":283,"children":284},{},[285],{"type":40,"tag":117,"props":286,"children":287},{},[288,293,298],{"type":40,"tag":121,"props":289,"children":290},{},[291],{"type":45,"value":292},"Property",{"type":40,"tag":121,"props":294,"children":295},{},[296],{"type":45,"value":297},"Examples",{"type":40,"tag":121,"props":299,"children":300},{},[301],{"type":45,"value":302},"Notes",{"type":40,"tag":137,"props":304,"children":305},{},[306,347,380,406],{"type":40,"tag":117,"props":307,"children":308},{},[309,318,342],{"type":40,"tag":144,"props":310,"children":311},{},[312],{"type":40,"tag":54,"props":313,"children":315},{"className":314},[],[316],{"type":45,"value":317},"$event_type",{"type":40,"tag":144,"props":319,"children":320},{},[321,327,329,335,336],{"type":40,"tag":54,"props":322,"children":324},{"className":323},[],[325],{"type":45,"value":326},"click",{"type":45,"value":328},", ",{"type":40,"tag":54,"props":330,"children":332},{"className":331},[],[333],{"type":45,"value":334},"submit",{"type":45,"value":328},{"type":40,"tag":54,"props":337,"children":339},{"className":338},[],[340],{"type":45,"value":341},"change",{"type":40,"tag":144,"props":343,"children":344},{},[345],{"type":45,"value":346},"the kind of interaction",{"type":40,"tag":117,"props":348,"children":349},{},[350,359,375],{"type":40,"tag":144,"props":351,"children":352},{},[353],{"type":40,"tag":54,"props":354,"children":356},{"className":355},[],[357],{"type":45,"value":358},"$el_text",{"type":40,"tag":144,"props":360,"children":361},{},[362,368,369],{"type":40,"tag":54,"props":363,"children":365},{"className":364},[],[366],{"type":45,"value":367},"Sign up",{"type":45,"value":328},{"type":40,"tag":54,"props":370,"children":372},{"className":371},[],[373],{"type":45,"value":374},"Submit",{"type":40,"tag":144,"props":376,"children":377},{},[378],{"type":45,"value":379},"text of the clicked element",{"type":40,"tag":117,"props":381,"children":382},{},[383,392,401],{"type":40,"tag":144,"props":384,"children":385},{},[386],{"type":40,"tag":54,"props":387,"children":389},{"className":388},[],[390],{"type":45,"value":391},"$current_url",{"type":40,"tag":144,"props":393,"children":394},{},[395],{"type":40,"tag":54,"props":396,"children":398},{"className":397},[],[399],{"type":45,"value":400},"https:\u002F\u002Fapp.example.com\u002Fpricing",{"type":40,"tag":144,"props":402,"children":403},{},[404],{"type":45,"value":405},"page the interaction happened on",{"type":40,"tag":117,"props":407,"children":408},{},[409,418,423],{"type":40,"tag":144,"props":410,"children":411},{},[412],{"type":40,"tag":54,"props":413,"children":415},{"className":414},[],[416],{"type":45,"value":417},"$elements_chain",{"type":40,"tag":144,"props":419,"children":420},{},[421],{"type":45,"value":422},"semicolon-separated chain",{"type":40,"tag":144,"props":424,"children":425},{},[426,428,434],{"type":45,"value":427},"parsed via the ",{"type":40,"tag":54,"props":429,"children":431},{"className":430},[],[432],{"type":45,"value":433},"elements_chain*",{"type":45,"value":435}," materialized columns above",{"type":40,"tag":48,"props":437,"children":438},{},[439,441,447,448,454,455,461],{"type":45,"value":440},"Standard event properties (",{"type":40,"tag":54,"props":442,"children":444},{"className":443},[],[445],{"type":45,"value":446},"$browser",{"type":45,"value":328},{"type":40,"tag":54,"props":449,"children":451},{"className":450},[],[452],{"type":45,"value":453},"$os",{"type":45,"value":328},{"type":40,"tag":54,"props":456,"children":458},{"className":457},[],[459],{"type":45,"value":460},"$device_type",{"type":45,"value":462},", etc.) are also present.",{"type":40,"tag":89,"props":464,"children":466},{"id":465},"workflow",[467],{"type":45,"value":468},"Workflow",{"type":40,"tag":470,"props":471,"children":473},"h3",{"id":472},"_1-confirm-autocapture-data-exists",[474],{"type":45,"value":475},"1. Confirm autocapture data exists",{"type":40,"tag":48,"props":477,"children":478},{},[479],{"type":45,"value":480},"Run a count query before doing anything else.\nIf the count is zero, autocapture may be disabled. There are two ways this happens:",{"type":40,"tag":482,"props":483,"children":484},"ul",{},[485,505],{"type":40,"tag":486,"props":487,"children":488},"li",{},[489,495,497,503],{"type":40,"tag":490,"props":491,"children":492},"strong",{},[493],{"type":45,"value":494},"Project settings",{"type":45,"value":496}," — the team can set ",{"type":40,"tag":54,"props":498,"children":500},{"className":499},[],[501],{"type":45,"value":502},"autocapture_opt_out",{"type":45,"value":504}," in PostHog project settings",{"type":40,"tag":486,"props":506,"children":507},{},[508,513,515,521,523],{"type":40,"tag":490,"props":509,"children":510},{},[511],{"type":45,"value":512},"SDK config",{"type":45,"value":514}," — the posthog-js ",{"type":40,"tag":54,"props":516,"children":518},{"className":517},[],[519],{"type":45,"value":520},"init()",{"type":45,"value":522}," call can pass ",{"type":40,"tag":54,"props":524,"children":526},{"className":525},[],[527],{"type":45,"value":528},"autocapture: false",{"type":40,"tag":48,"props":530,"children":531},{},[532],{"type":45,"value":533},"Tell the user if no data is found so they can check both settings.",{"type":40,"tag":535,"props":536,"children":541},"pre",{"className":537,"code":538,"language":539,"meta":540,"style":540},"language-sql shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","SELECT count() as cnt\nFROM events\nWHERE event = '$autocapture'\n  AND timestamp > now() - INTERVAL 7 DAY\n","sql","",[542],{"type":40,"tag":54,"props":543,"children":544},{"__ignoreMap":540},[545,556,565,574],{"type":40,"tag":546,"props":547,"children":550},"span",{"class":548,"line":549},"line",1,[551],{"type":40,"tag":546,"props":552,"children":553},{},[554],{"type":45,"value":555},"SELECT count() as cnt\n",{"type":40,"tag":546,"props":557,"children":559},{"class":548,"line":558},2,[560],{"type":40,"tag":546,"props":561,"children":562},{},[563],{"type":45,"value":564},"FROM events\n",{"type":40,"tag":546,"props":566,"children":568},{"class":548,"line":567},3,[569],{"type":40,"tag":546,"props":570,"children":571},{},[572],{"type":45,"value":573},"WHERE event = '$autocapture'\n",{"type":40,"tag":546,"props":575,"children":576},{"class":548,"line":27},[577],{"type":40,"tag":546,"props":578,"children":579},{},[580],{"type":45,"value":581},"  AND timestamp > now() - INTERVAL 7 DAY\n",{"type":40,"tag":470,"props":583,"children":585},{"id":584},"_2-explore-what-users-are-interacting-with",[586],{"type":45,"value":587},"2. Explore what users are interacting with",{"type":40,"tag":48,"props":589,"children":590},{},[591],{"type":45,"value":592},"Start broad using the materialized columns.\nThe goal is to understand what users are clicking before narrowing down.",{"type":40,"tag":48,"props":594,"children":595},{},[596],{"type":45,"value":597},"Useful explorations:",{"type":40,"tag":482,"props":599,"children":600},{},[601,612,623,634],{"type":40,"tag":486,"props":602,"children":603},{},[604,606,611],{"type":45,"value":605},"Top clicked tag names (via ",{"type":40,"tag":54,"props":607,"children":609},{"className":608},[],[610],{"type":45,"value":246},{"type":45,"value":170},{"type":40,"tag":486,"props":613,"children":614},{},[615,617,622],{"type":45,"value":616},"Top clicked text values (via ",{"type":40,"tag":54,"props":618,"children":620},{"className":619},[],[621],{"type":45,"value":203},{"type":45,"value":170},{"type":40,"tag":486,"props":624,"children":625},{},[626,628,633],{"type":45,"value":627},"Top clicked hrefs (via ",{"type":40,"tag":54,"props":629,"children":631},{"className":630},[],[632],{"type":45,"value":182},{"type":45,"value":170},{"type":40,"tag":486,"props":635,"children":636},{},[637,639,644,646,652],{"type":45,"value":638},"Raw ",{"type":40,"tag":54,"props":640,"children":642},{"className":641},[],[643],{"type":45,"value":67},{"type":45,"value":645}," values for a specific page (filtered by ",{"type":40,"tag":54,"props":647,"children":649},{"className":648},[],[650],{"type":45,"value":651},"properties.$current_url",{"type":45,"value":170},{"type":40,"tag":48,"props":654,"children":655},{},[656,658,664],{"type":45,"value":657},"See ",{"type":40,"tag":163,"props":659,"children":661},{"href":660},".\u002Freferences\u002Fexample-queries.md",[662],{"type":45,"value":663},"example queries",{"type":45,"value":665}," for all patterns.",{"type":40,"tag":470,"props":667,"children":669},{"id":668},"_3-find-candidate-selectors",[670],{"type":45,"value":671},"3. Find candidate selectors",{"type":40,"tag":48,"props":673,"children":674},{},[675],{"type":45,"value":676},"Once the user identifies an interaction they care about, find a CSS selector that identifies it.",{"type":40,"tag":48,"props":678,"children":679},{},[680],{"type":45,"value":681},"Priority order for selector attributes (best first):",{"type":40,"tag":683,"props":684,"children":685},"ol",{},[686,726,750,760,770],{"type":40,"tag":486,"props":687,"children":688},{},[689,708,710,716,718,724],{"type":40,"tag":490,"props":690,"children":691},{},[692,698,700,706],{"type":40,"tag":54,"props":693,"children":695},{"className":694},[],[696],{"type":45,"value":697},"data-attr",{"type":45,"value":699}," or other ",{"type":40,"tag":54,"props":701,"children":703},{"className":702},[],[704],{"type":45,"value":705},"data-*",{"type":45,"value":707}," attributes",{"type":45,"value":709}," — highest specificity, stable across deploys, developer-intended anchors.\nSearch with ",{"type":40,"tag":54,"props":711,"children":713},{"className":712},[],[714],{"type":45,"value":715},"match(elements_chain, 'data-attr=')",{"type":45,"value":717}," or ",{"type":40,"tag":54,"props":719,"children":721},{"className":720},[],[722],{"type":45,"value":723},"extractAll",{"type":45,"value":725},".",{"type":40,"tag":486,"props":727,"children":728},{},[729,734,736,742,744,749],{"type":40,"tag":490,"props":730,"children":731},{},[732],{"type":45,"value":733},"Element ID",{"type":45,"value":735}," (",{"type":40,"tag":54,"props":737,"children":739},{"className":738},[],[740],{"type":45,"value":741},"attr_id",{"type":45,"value":743},") — also highly stable, queryable via ",{"type":40,"tag":54,"props":745,"children":747},{"className":746},[],[748],{"type":45,"value":225},{"type":45,"value":725},{"type":40,"tag":486,"props":751,"children":752},{},[753,758],{"type":40,"tag":490,"props":754,"children":755},{},[756],{"type":45,"value":757},"Tag + class combination",{"type":45,"value":759}," — moderately stable but classes change with CSS refactors.",{"type":40,"tag":486,"props":761,"children":762},{},[763,768],{"type":40,"tag":490,"props":764,"children":765},{},[766],{"type":45,"value":767},"Text content",{"type":45,"value":769}," — fragile (changes with copy edits, i18n) but sometimes the only option.",{"type":40,"tag":486,"props":771,"children":772},{},[773,778],{"type":40,"tag":490,"props":774,"children":775},{},[776],{"type":45,"value":777},"Tag name alone",{"type":45,"value":779}," — too broad on its own, useful as a qualifier.",{"type":40,"tag":48,"props":781,"children":782},{},[783,785,790,792,798,799,805],{"type":45,"value":784},"When a ",{"type":40,"tag":54,"props":786,"children":788},{"className":787},[],[789],{"type":45,"value":697},{"type":45,"value":791}," value is found, construct a selector like ",{"type":40,"tag":54,"props":793,"children":795},{"className":794},[],[796],{"type":45,"value":797},"[data-attr=\"value\"]",{"type":45,"value":717},{"type":40,"tag":54,"props":800,"children":802},{"className":801},[],[803],{"type":45,"value":804},"button[data-attr=\"value\"]",{"type":45,"value":725},{"type":40,"tag":470,"props":807,"children":809},{"id":808},"_4-evaluate-selector-uniqueness",[810],{"type":45,"value":811},"4. Evaluate selector uniqueness",{"type":40,"tag":48,"props":813,"children":814},{},[815],{"type":45,"value":816},"A selector is only useful if it matches the intended interaction and not unrelated events.",{"type":40,"tag":48,"props":818,"children":819},{},[820,822,828],{"type":45,"value":821},"Run a uniqueness check using ",{"type":40,"tag":54,"props":823,"children":825},{"className":824},[],[826],{"type":45,"value":827},"elements_chain =~",{"type":45,"value":829}," with the regex pattern for the selector.\nThen sample matching events to inspect what the selector actually captures.\nCompare the count against total autocapture volume to understand selectivity.",{"type":40,"tag":48,"props":831,"children":832},{},[833],{"type":45,"value":834},"A good selector matches a single logical interaction.\nIf it matches too many distinct elements, refine it in the next step.",{"type":40,"tag":470,"props":836,"children":838},{"id":837},"_5-refine-with-additional-filters",[839],{"type":45,"value":840},"5. Refine with additional filters",{"type":40,"tag":48,"props":842,"children":843},{},[844],{"type":45,"value":845},"If the selector alone is not unique enough, layer on additional filters:",{"type":40,"tag":482,"props":847,"children":848},{},[849,864,879],{"type":40,"tag":486,"props":850,"children":851},{},[852,857,859],{"type":40,"tag":490,"props":853,"children":854},{},[855],{"type":45,"value":856},"Text filter",{"type":45,"value":858}," — match by element text content using ",{"type":40,"tag":54,"props":860,"children":862},{"className":861},[],[863],{"type":45,"value":203},{"type":40,"tag":486,"props":865,"children":866},{},[867,872,874],{"type":40,"tag":490,"props":868,"children":869},{},[870],{"type":45,"value":871},"URL filter",{"type":45,"value":873}," — restrict to a specific page using ",{"type":40,"tag":54,"props":875,"children":877},{"className":876},[],[878],{"type":45,"value":651},{"type":40,"tag":486,"props":880,"children":881},{},[882,887,889],{"type":40,"tag":490,"props":883,"children":884},{},[885],{"type":45,"value":886},"Href filter",{"type":45,"value":888}," — match by link target using ",{"type":40,"tag":54,"props":890,"children":892},{"className":891},[],[893],{"type":45,"value":182},{"type":40,"tag":48,"props":895,"children":896},{},[897],{"type":45,"value":898},"Re-run the uniqueness check after each refinement.\nOnly include filters that are needed — fewer filters means more resilience to minor DOM changes.",{"type":40,"tag":470,"props":900,"children":902},{"id":901},"_6-filter-autocapture-inside-an-insight-query",[903],{"type":45,"value":904},"6. Filter autocapture inside an insight query",{"type":40,"tag":48,"props":906,"children":907},{},[908,910,916,918,924,926,932,934,940,942,948,950,956],{"type":45,"value":909},"When the user wants a funnel, trend, or other insight, the filter shape is different from HogQL.\nEach step in a ",{"type":40,"tag":54,"props":911,"children":913},{"className":912},[],[914],{"type":45,"value":915},"FunnelsQuery",{"type":45,"value":917}," \u002F ",{"type":40,"tag":54,"props":919,"children":921},{"className":920},[],[922],{"type":45,"value":923},"TrendsQuery",{"type":45,"value":925}," is an ",{"type":40,"tag":54,"props":927,"children":929},{"className":928},[],[930],{"type":45,"value":931},"EventsNode",{"type":45,"value":933}," (or ",{"type":40,"tag":54,"props":935,"children":937},{"className":936},[],[938],{"type":45,"value":939},"ActionsNode",{"type":45,"value":941},") with ",{"type":40,"tag":54,"props":943,"children":945},{"className":944},[],[946],{"type":45,"value":947},"event: \"$autocapture\"",{"type":45,"value":949}," and a ",{"type":40,"tag":54,"props":951,"children":953},{"className":952},[],[954],{"type":45,"value":955},"properties",{"type":45,"value":957}," array.",{"type":40,"tag":48,"props":959,"children":960},{},[961,963,969],{"type":45,"value":962},"Two distinct property ",{"type":40,"tag":54,"props":964,"children":966},{"className":965},[],[967],{"type":45,"value":968},"type",{"type":45,"value":970}," values matter — they are not interchangeable:",{"type":40,"tag":482,"props":972,"children":973},{},[974,1144],{"type":40,"tag":486,"props":975,"children":976},{},[977,986,988,994,995,1001,1002,1007,1008,1014,1016,1021,1023],{"type":40,"tag":490,"props":978,"children":979},{},[980],{"type":40,"tag":54,"props":981,"children":983},{"className":982},[],[984],{"type":45,"value":985},"type: \"element\"",{"type":45,"value":987}," — keys: ",{"type":40,"tag":54,"props":989,"children":991},{"className":990},[],[992],{"type":45,"value":993},"selector",{"type":45,"value":328},{"type":40,"tag":54,"props":996,"children":998},{"className":997},[],[999],{"type":45,"value":1000},"tag_name",{"type":45,"value":328},{"type":40,"tag":54,"props":1003,"children":1005},{"className":1004},[],[1006],{"type":45,"value":45},{"type":45,"value":328},{"type":40,"tag":54,"props":1009,"children":1011},{"className":1010},[],[1012],{"type":45,"value":1013},"href",{"type":45,"value":1015},". Matched against the parsed ",{"type":40,"tag":54,"props":1017,"children":1019},{"className":1018},[],[1020],{"type":45,"value":67},{"type":45,"value":1022},". Operator support is split:\n",{"type":40,"tag":482,"props":1024,"children":1025},{},[1026,1074],{"type":40,"tag":486,"props":1027,"children":1028},{},[1029,1034,1036,1041,1043,1049,1050,1056,1058,1064,1066,1072],{"type":40,"tag":54,"props":1030,"children":1032},{"className":1031},[],[1033],{"type":45,"value":993},{"type":45,"value":1035}," and ",{"type":40,"tag":54,"props":1037,"children":1039},{"className":1038},[],[1040],{"type":45,"value":1000},{"type":45,"value":1042}," only support ",{"type":40,"tag":54,"props":1044,"children":1046},{"className":1045},[],[1047],{"type":45,"value":1048},"exact",{"type":45,"value":1035},{"type":40,"tag":54,"props":1051,"children":1053},{"className":1052},[],[1054],{"type":45,"value":1055},"is_not",{"type":45,"value":1057}," — anything else raises ",{"type":40,"tag":54,"props":1059,"children":1061},{"className":1060},[],[1062],{"type":45,"value":1063},"NotImplementedError",{"type":45,"value":1065}," in the query compiler (",{"type":40,"tag":54,"props":1067,"children":1069},{"className":1068},[],[1070],{"type":45,"value":1071},"posthog\u002Fhogql\u002Fproperty.py",{"type":45,"value":1073},").",{"type":40,"tag":486,"props":1075,"children":1076},{},[1077,1082,1083,1088,1090,1095,1096,1101,1102,1108,1109,1115,1116,1122,1123,1129,1130,1136,1137,1143],{"type":40,"tag":54,"props":1078,"children":1080},{"className":1079},[],[1081],{"type":45,"value":45},{"type":45,"value":1035},{"type":40,"tag":54,"props":1084,"children":1086},{"className":1085},[],[1087],{"type":45,"value":1013},{"type":45,"value":1089}," accept the full string operator set (",{"type":40,"tag":54,"props":1091,"children":1093},{"className":1092},[],[1094],{"type":45,"value":1048},{"type":45,"value":328},{"type":40,"tag":54,"props":1097,"children":1099},{"className":1098},[],[1100],{"type":45,"value":1055},{"type":45,"value":328},{"type":40,"tag":54,"props":1103,"children":1105},{"className":1104},[],[1106],{"type":45,"value":1107},"icontains",{"type":45,"value":328},{"type":40,"tag":54,"props":1110,"children":1112},{"className":1111},[],[1113],{"type":45,"value":1114},"not_icontains",{"type":45,"value":328},{"type":40,"tag":54,"props":1117,"children":1119},{"className":1118},[],[1120],{"type":45,"value":1121},"regex",{"type":45,"value":328},{"type":40,"tag":54,"props":1124,"children":1126},{"className":1125},[],[1127],{"type":45,"value":1128},"not_regex",{"type":45,"value":328},{"type":40,"tag":54,"props":1131,"children":1133},{"className":1132},[],[1134],{"type":45,"value":1135},"is_set",{"type":45,"value":328},{"type":40,"tag":54,"props":1138,"children":1140},{"className":1139},[],[1141],{"type":45,"value":1142},"is_not_set",{"type":45,"value":1073},{"type":40,"tag":486,"props":1145,"children":1146},{},[1147,1156,1158,1163,1164,1169,1170,1175,1177,1182,1183,1188,1189,1194],{"type":40,"tag":490,"props":1148,"children":1149},{},[1150],{"type":40,"tag":54,"props":1151,"children":1153},{"className":1152},[],[1154],{"type":45,"value":1155},"type: \"event\"",{"type":45,"value":1157}," — keys: any of the canonical autocapture properties (",{"type":40,"tag":54,"props":1159,"children":1161},{"className":1160},[],[1162],{"type":45,"value":317},{"type":45,"value":328},{"type":40,"tag":54,"props":1165,"children":1167},{"className":1166},[],[1168],{"type":45,"value":358},{"type":45,"value":328},{"type":40,"tag":54,"props":1171,"children":1173},{"className":1172},[],[1174],{"type":45,"value":391},{"type":45,"value":1176},") or anything else on the event. Standard event-property operators (",{"type":40,"tag":54,"props":1178,"children":1180},{"className":1179},[],[1181],{"type":45,"value":1048},{"type":45,"value":328},{"type":40,"tag":54,"props":1184,"children":1186},{"className":1185},[],[1187],{"type":45,"value":1107},{"type":45,"value":328},{"type":40,"tag":54,"props":1190,"children":1192},{"className":1191},[],[1193],{"type":45,"value":1121},{"type":45,"value":1195},", etc.).",{"type":40,"tag":48,"props":1197,"children":1198},{},[1199],{"type":45,"value":1200},"Example funnel from clicking one button to clicking another:",{"type":40,"tag":535,"props":1202,"children":1206},{"className":1203,"code":1204,"language":1205,"meta":540,"style":540},"language-json shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","{\n  \"kind\": \"FunnelsQuery\",\n  \"series\": [\n    {\n      \"kind\": \"EventsNode\",\n      \"event\": \"$autocapture\",\n      \"properties\": [\n        {\n          \"type\": \"element\",\n          \"key\": \"selector\",\n          \"value\": [\"[data-attr=\\\"autocapture-series-save-as-action-banner-shown\\\"]\"],\n          \"operator\": \"exact\"\n        }\n      ]\n    },\n    {\n      \"kind\": \"EventsNode\",\n      \"event\": \"$autocapture\",\n      \"properties\": [\n        {\n          \"type\": \"element\",\n          \"key\": \"selector\",\n          \"value\": [\"[data-attr=\\\"autocapture-save-as-action\\\"]\"],\n          \"operator\": \"exact\"\n        }\n      ]\n    }\n  ]\n}\n","json",[1207],{"type":40,"tag":54,"props":1208,"children":1209},{"__ignoreMap":540},[1210,1219,1262,1287,1295,1333,1370,1394,1403,1441,1478,1542,1576,1585,1594,1603,1611,1647,1683,1707,1715,1751,1787,1844,1876,1884,1892,1901,1910],{"type":40,"tag":546,"props":1211,"children":1212},{"class":548,"line":549},[1213],{"type":40,"tag":546,"props":1214,"children":1216},{"style":1215},"--shiki-light:#39ADB5;--shiki-default:#89DDFF;--shiki-dark:#89DDFF",[1217],{"type":45,"value":1218},"{\n",{"type":40,"tag":546,"props":1220,"children":1221},{"class":548,"line":558},[1222,1227,1233,1238,1243,1248,1253,1257],{"type":40,"tag":546,"props":1223,"children":1224},{"style":1215},[1225],{"type":45,"value":1226},"  \"",{"type":40,"tag":546,"props":1228,"children":1230},{"style":1229},"--shiki-light:#9C3EDA;--shiki-default:#C792EA;--shiki-dark:#C792EA",[1231],{"type":45,"value":1232},"kind",{"type":40,"tag":546,"props":1234,"children":1235},{"style":1215},[1236],{"type":45,"value":1237},"\"",{"type":40,"tag":546,"props":1239,"children":1240},{"style":1215},[1241],{"type":45,"value":1242},":",{"type":40,"tag":546,"props":1244,"children":1245},{"style":1215},[1246],{"type":45,"value":1247}," \"",{"type":40,"tag":546,"props":1249,"children":1251},{"style":1250},"--shiki-light:#91B859;--shiki-default:#C3E88D;--shiki-dark:#C3E88D",[1252],{"type":45,"value":915},{"type":40,"tag":546,"props":1254,"children":1255},{"style":1215},[1256],{"type":45,"value":1237},{"type":40,"tag":546,"props":1258,"children":1259},{"style":1215},[1260],{"type":45,"value":1261},",\n",{"type":40,"tag":546,"props":1263,"children":1264},{"class":548,"line":567},[1265,1269,1274,1278,1282],{"type":40,"tag":546,"props":1266,"children":1267},{"style":1215},[1268],{"type":45,"value":1226},{"type":40,"tag":546,"props":1270,"children":1271},{"style":1229},[1272],{"type":45,"value":1273},"series",{"type":40,"tag":546,"props":1275,"children":1276},{"style":1215},[1277],{"type":45,"value":1237},{"type":40,"tag":546,"props":1279,"children":1280},{"style":1215},[1281],{"type":45,"value":1242},{"type":40,"tag":546,"props":1283,"children":1284},{"style":1215},[1285],{"type":45,"value":1286}," [\n",{"type":40,"tag":546,"props":1288,"children":1289},{"class":548,"line":27},[1290],{"type":40,"tag":546,"props":1291,"children":1292},{"style":1215},[1293],{"type":45,"value":1294},"    {\n",{"type":40,"tag":546,"props":1296,"children":1298},{"class":548,"line":1297},5,[1299,1304,1309,1313,1317,1321,1325,1329],{"type":40,"tag":546,"props":1300,"children":1301},{"style":1215},[1302],{"type":45,"value":1303},"      \"",{"type":40,"tag":546,"props":1305,"children":1307},{"style":1306},"--shiki-light:#E2931D;--shiki-default:#FFCB6B;--shiki-dark:#FFCB6B",[1308],{"type":45,"value":1232},{"type":40,"tag":546,"props":1310,"children":1311},{"style":1215},[1312],{"type":45,"value":1237},{"type":40,"tag":546,"props":1314,"children":1315},{"style":1215},[1316],{"type":45,"value":1242},{"type":40,"tag":546,"props":1318,"children":1319},{"style":1215},[1320],{"type":45,"value":1247},{"type":40,"tag":546,"props":1322,"children":1323},{"style":1250},[1324],{"type":45,"value":931},{"type":40,"tag":546,"props":1326,"children":1327},{"style":1215},[1328],{"type":45,"value":1237},{"type":40,"tag":546,"props":1330,"children":1331},{"style":1215},[1332],{"type":45,"value":1261},{"type":40,"tag":546,"props":1334,"children":1336},{"class":548,"line":1335},6,[1337,1341,1346,1350,1354,1358,1362,1366],{"type":40,"tag":546,"props":1338,"children":1339},{"style":1215},[1340],{"type":45,"value":1303},{"type":40,"tag":546,"props":1342,"children":1343},{"style":1306},[1344],{"type":45,"value":1345},"event",{"type":40,"tag":546,"props":1347,"children":1348},{"style":1215},[1349],{"type":45,"value":1237},{"type":40,"tag":546,"props":1351,"children":1352},{"style":1215},[1353],{"type":45,"value":1242},{"type":40,"tag":546,"props":1355,"children":1356},{"style":1215},[1357],{"type":45,"value":1247},{"type":40,"tag":546,"props":1359,"children":1360},{"style":1250},[1361],{"type":45,"value":59},{"type":40,"tag":546,"props":1363,"children":1364},{"style":1215},[1365],{"type":45,"value":1237},{"type":40,"tag":546,"props":1367,"children":1368},{"style":1215},[1369],{"type":45,"value":1261},{"type":40,"tag":546,"props":1371,"children":1373},{"class":548,"line":1372},7,[1374,1378,1382,1386,1390],{"type":40,"tag":546,"props":1375,"children":1376},{"style":1215},[1377],{"type":45,"value":1303},{"type":40,"tag":546,"props":1379,"children":1380},{"style":1306},[1381],{"type":45,"value":955},{"type":40,"tag":546,"props":1383,"children":1384},{"style":1215},[1385],{"type":45,"value":1237},{"type":40,"tag":546,"props":1387,"children":1388},{"style":1215},[1389],{"type":45,"value":1242},{"type":40,"tag":546,"props":1391,"children":1392},{"style":1215},[1393],{"type":45,"value":1286},{"type":40,"tag":546,"props":1395,"children":1397},{"class":548,"line":1396},8,[1398],{"type":40,"tag":546,"props":1399,"children":1400},{"style":1215},[1401],{"type":45,"value":1402},"        {\n",{"type":40,"tag":546,"props":1404,"children":1406},{"class":548,"line":1405},9,[1407,1412,1417,1421,1425,1429,1433,1437],{"type":40,"tag":546,"props":1408,"children":1409},{"style":1215},[1410],{"type":45,"value":1411},"          \"",{"type":40,"tag":546,"props":1413,"children":1415},{"style":1414},"--shiki-light:#F76D47;--shiki-default:#F78C6C;--shiki-dark:#F78C6C",[1416],{"type":45,"value":968},{"type":40,"tag":546,"props":1418,"children":1419},{"style":1215},[1420],{"type":45,"value":1237},{"type":40,"tag":546,"props":1422,"children":1423},{"style":1215},[1424],{"type":45,"value":1242},{"type":40,"tag":546,"props":1426,"children":1427},{"style":1215},[1428],{"type":45,"value":1247},{"type":40,"tag":546,"props":1430,"children":1431},{"style":1250},[1432],{"type":45,"value":40},{"type":40,"tag":546,"props":1434,"children":1435},{"style":1215},[1436],{"type":45,"value":1237},{"type":40,"tag":546,"props":1438,"children":1439},{"style":1215},[1440],{"type":45,"value":1261},{"type":40,"tag":546,"props":1442,"children":1444},{"class":548,"line":1443},10,[1445,1449,1454,1458,1462,1466,1470,1474],{"type":40,"tag":546,"props":1446,"children":1447},{"style":1215},[1448],{"type":45,"value":1411},{"type":40,"tag":546,"props":1450,"children":1451},{"style":1414},[1452],{"type":45,"value":1453},"key",{"type":40,"tag":546,"props":1455,"children":1456},{"style":1215},[1457],{"type":45,"value":1237},{"type":40,"tag":546,"props":1459,"children":1460},{"style":1215},[1461],{"type":45,"value":1242},{"type":40,"tag":546,"props":1463,"children":1464},{"style":1215},[1465],{"type":45,"value":1247},{"type":40,"tag":546,"props":1467,"children":1468},{"style":1250},[1469],{"type":45,"value":993},{"type":40,"tag":546,"props":1471,"children":1472},{"style":1215},[1473],{"type":45,"value":1237},{"type":40,"tag":546,"props":1475,"children":1476},{"style":1215},[1477],{"type":45,"value":1261},{"type":40,"tag":546,"props":1479,"children":1481},{"class":548,"line":1480},11,[1482,1486,1491,1495,1499,1504,1508,1513,1519,1524,1528,1533,1537],{"type":40,"tag":546,"props":1483,"children":1484},{"style":1215},[1485],{"type":45,"value":1411},{"type":40,"tag":546,"props":1487,"children":1488},{"style":1414},[1489],{"type":45,"value":1490},"value",{"type":40,"tag":546,"props":1492,"children":1493},{"style":1215},[1494],{"type":45,"value":1237},{"type":40,"tag":546,"props":1496,"children":1497},{"style":1215},[1498],{"type":45,"value":1242},{"type":40,"tag":546,"props":1500,"children":1501},{"style":1215},[1502],{"type":45,"value":1503}," [",{"type":40,"tag":546,"props":1505,"children":1506},{"style":1215},[1507],{"type":45,"value":1237},{"type":40,"tag":546,"props":1509,"children":1510},{"style":1250},[1511],{"type":45,"value":1512},"[data-attr=",{"type":40,"tag":546,"props":1514,"children":1516},{"style":1515},"--shiki-light:#90A4AE;--shiki-default:#EEFFFF;--shiki-dark:#BABED8",[1517],{"type":45,"value":1518},"\\\"",{"type":40,"tag":546,"props":1520,"children":1521},{"style":1250},[1522],{"type":45,"value":1523},"autocapture-series-save-as-action-banner-shown",{"type":40,"tag":546,"props":1525,"children":1526},{"style":1515},[1527],{"type":45,"value":1518},{"type":40,"tag":546,"props":1529,"children":1530},{"style":1250},[1531],{"type":45,"value":1532},"]",{"type":40,"tag":546,"props":1534,"children":1535},{"style":1215},[1536],{"type":45,"value":1237},{"type":40,"tag":546,"props":1538,"children":1539},{"style":1215},[1540],{"type":45,"value":1541},"],\n",{"type":40,"tag":546,"props":1543,"children":1545},{"class":548,"line":1544},12,[1546,1550,1555,1559,1563,1567,1571],{"type":40,"tag":546,"props":1547,"children":1548},{"style":1215},[1549],{"type":45,"value":1411},{"type":40,"tag":546,"props":1551,"children":1552},{"style":1414},[1553],{"type":45,"value":1554},"operator",{"type":40,"tag":546,"props":1556,"children":1557},{"style":1215},[1558],{"type":45,"value":1237},{"type":40,"tag":546,"props":1560,"children":1561},{"style":1215},[1562],{"type":45,"value":1242},{"type":40,"tag":546,"props":1564,"children":1565},{"style":1215},[1566],{"type":45,"value":1247},{"type":40,"tag":546,"props":1568,"children":1569},{"style":1250},[1570],{"type":45,"value":1048},{"type":40,"tag":546,"props":1572,"children":1573},{"style":1215},[1574],{"type":45,"value":1575},"\"\n",{"type":40,"tag":546,"props":1577,"children":1579},{"class":548,"line":1578},13,[1580],{"type":40,"tag":546,"props":1581,"children":1582},{"style":1215},[1583],{"type":45,"value":1584},"        }\n",{"type":40,"tag":546,"props":1586,"children":1588},{"class":548,"line":1587},14,[1589],{"type":40,"tag":546,"props":1590,"children":1591},{"style":1215},[1592],{"type":45,"value":1593},"      ]\n",{"type":40,"tag":546,"props":1595,"children":1597},{"class":548,"line":1596},15,[1598],{"type":40,"tag":546,"props":1599,"children":1600},{"style":1215},[1601],{"type":45,"value":1602},"    },\n",{"type":40,"tag":546,"props":1604,"children":1606},{"class":548,"line":1605},16,[1607],{"type":40,"tag":546,"props":1608,"children":1609},{"style":1215},[1610],{"type":45,"value":1294},{"type":40,"tag":546,"props":1612,"children":1614},{"class":548,"line":1613},17,[1615,1619,1623,1627,1631,1635,1639,1643],{"type":40,"tag":546,"props":1616,"children":1617},{"style":1215},[1618],{"type":45,"value":1303},{"type":40,"tag":546,"props":1620,"children":1621},{"style":1306},[1622],{"type":45,"value":1232},{"type":40,"tag":546,"props":1624,"children":1625},{"style":1215},[1626],{"type":45,"value":1237},{"type":40,"tag":546,"props":1628,"children":1629},{"style":1215},[1630],{"type":45,"value":1242},{"type":40,"tag":546,"props":1632,"children":1633},{"style":1215},[1634],{"type":45,"value":1247},{"type":40,"tag":546,"props":1636,"children":1637},{"style":1250},[1638],{"type":45,"value":931},{"type":40,"tag":546,"props":1640,"children":1641},{"style":1215},[1642],{"type":45,"value":1237},{"type":40,"tag":546,"props":1644,"children":1645},{"style":1215},[1646],{"type":45,"value":1261},{"type":40,"tag":546,"props":1648,"children":1650},{"class":548,"line":1649},18,[1651,1655,1659,1663,1667,1671,1675,1679],{"type":40,"tag":546,"props":1652,"children":1653},{"style":1215},[1654],{"type":45,"value":1303},{"type":40,"tag":546,"props":1656,"children":1657},{"style":1306},[1658],{"type":45,"value":1345},{"type":40,"tag":546,"props":1660,"children":1661},{"style":1215},[1662],{"type":45,"value":1237},{"type":40,"tag":546,"props":1664,"children":1665},{"style":1215},[1666],{"type":45,"value":1242},{"type":40,"tag":546,"props":1668,"children":1669},{"style":1215},[1670],{"type":45,"value":1247},{"type":40,"tag":546,"props":1672,"children":1673},{"style":1250},[1674],{"type":45,"value":59},{"type":40,"tag":546,"props":1676,"children":1677},{"style":1215},[1678],{"type":45,"value":1237},{"type":40,"tag":546,"props":1680,"children":1681},{"style":1215},[1682],{"type":45,"value":1261},{"type":40,"tag":546,"props":1684,"children":1686},{"class":548,"line":1685},19,[1687,1691,1695,1699,1703],{"type":40,"tag":546,"props":1688,"children":1689},{"style":1215},[1690],{"type":45,"value":1303},{"type":40,"tag":546,"props":1692,"children":1693},{"style":1306},[1694],{"type":45,"value":955},{"type":40,"tag":546,"props":1696,"children":1697},{"style":1215},[1698],{"type":45,"value":1237},{"type":40,"tag":546,"props":1700,"children":1701},{"style":1215},[1702],{"type":45,"value":1242},{"type":40,"tag":546,"props":1704,"children":1705},{"style":1215},[1706],{"type":45,"value":1286},{"type":40,"tag":546,"props":1708,"children":1710},{"class":548,"line":1709},20,[1711],{"type":40,"tag":546,"props":1712,"children":1713},{"style":1215},[1714],{"type":45,"value":1402},{"type":40,"tag":546,"props":1716,"children":1718},{"class":548,"line":1717},21,[1719,1723,1727,1731,1735,1739,1743,1747],{"type":40,"tag":546,"props":1720,"children":1721},{"style":1215},[1722],{"type":45,"value":1411},{"type":40,"tag":546,"props":1724,"children":1725},{"style":1414},[1726],{"type":45,"value":968},{"type":40,"tag":546,"props":1728,"children":1729},{"style":1215},[1730],{"type":45,"value":1237},{"type":40,"tag":546,"props":1732,"children":1733},{"style":1215},[1734],{"type":45,"value":1242},{"type":40,"tag":546,"props":1736,"children":1737},{"style":1215},[1738],{"type":45,"value":1247},{"type":40,"tag":546,"props":1740,"children":1741},{"style":1250},[1742],{"type":45,"value":40},{"type":40,"tag":546,"props":1744,"children":1745},{"style":1215},[1746],{"type":45,"value":1237},{"type":40,"tag":546,"props":1748,"children":1749},{"style":1215},[1750],{"type":45,"value":1261},{"type":40,"tag":546,"props":1752,"children":1754},{"class":548,"line":1753},22,[1755,1759,1763,1767,1771,1775,1779,1783],{"type":40,"tag":546,"props":1756,"children":1757},{"style":1215},[1758],{"type":45,"value":1411},{"type":40,"tag":546,"props":1760,"children":1761},{"style":1414},[1762],{"type":45,"value":1453},{"type":40,"tag":546,"props":1764,"children":1765},{"style":1215},[1766],{"type":45,"value":1237},{"type":40,"tag":546,"props":1768,"children":1769},{"style":1215},[1770],{"type":45,"value":1242},{"type":40,"tag":546,"props":1772,"children":1773},{"style":1215},[1774],{"type":45,"value":1247},{"type":40,"tag":546,"props":1776,"children":1777},{"style":1250},[1778],{"type":45,"value":993},{"type":40,"tag":546,"props":1780,"children":1781},{"style":1215},[1782],{"type":45,"value":1237},{"type":40,"tag":546,"props":1784,"children":1785},{"style":1215},[1786],{"type":45,"value":1261},{"type":40,"tag":546,"props":1788,"children":1790},{"class":548,"line":1789},23,[1791,1795,1799,1803,1807,1811,1815,1819,1823,1828,1832,1836,1840],{"type":40,"tag":546,"props":1792,"children":1793},{"style":1215},[1794],{"type":45,"value":1411},{"type":40,"tag":546,"props":1796,"children":1797},{"style":1414},[1798],{"type":45,"value":1490},{"type":40,"tag":546,"props":1800,"children":1801},{"style":1215},[1802],{"type":45,"value":1237},{"type":40,"tag":546,"props":1804,"children":1805},{"style":1215},[1806],{"type":45,"value":1242},{"type":40,"tag":546,"props":1808,"children":1809},{"style":1215},[1810],{"type":45,"value":1503},{"type":40,"tag":546,"props":1812,"children":1813},{"style":1215},[1814],{"type":45,"value":1237},{"type":40,"tag":546,"props":1816,"children":1817},{"style":1250},[1818],{"type":45,"value":1512},{"type":40,"tag":546,"props":1820,"children":1821},{"style":1515},[1822],{"type":45,"value":1518},{"type":40,"tag":546,"props":1824,"children":1825},{"style":1250},[1826],{"type":45,"value":1827},"autocapture-save-as-action",{"type":40,"tag":546,"props":1829,"children":1830},{"style":1515},[1831],{"type":45,"value":1518},{"type":40,"tag":546,"props":1833,"children":1834},{"style":1250},[1835],{"type":45,"value":1532},{"type":40,"tag":546,"props":1837,"children":1838},{"style":1215},[1839],{"type":45,"value":1237},{"type":40,"tag":546,"props":1841,"children":1842},{"style":1215},[1843],{"type":45,"value":1541},{"type":40,"tag":546,"props":1845,"children":1847},{"class":548,"line":1846},24,[1848,1852,1856,1860,1864,1868,1872],{"type":40,"tag":546,"props":1849,"children":1850},{"style":1215},[1851],{"type":45,"value":1411},{"type":40,"tag":546,"props":1853,"children":1854},{"style":1414},[1855],{"type":45,"value":1554},{"type":40,"tag":546,"props":1857,"children":1858},{"style":1215},[1859],{"type":45,"value":1237},{"type":40,"tag":546,"props":1861,"children":1862},{"style":1215},[1863],{"type":45,"value":1242},{"type":40,"tag":546,"props":1865,"children":1866},{"style":1215},[1867],{"type":45,"value":1247},{"type":40,"tag":546,"props":1869,"children":1870},{"style":1250},[1871],{"type":45,"value":1048},{"type":40,"tag":546,"props":1873,"children":1874},{"style":1215},[1875],{"type":45,"value":1575},{"type":40,"tag":546,"props":1877,"children":1879},{"class":548,"line":1878},25,[1880],{"type":40,"tag":546,"props":1881,"children":1882},{"style":1215},[1883],{"type":45,"value":1584},{"type":40,"tag":546,"props":1885,"children":1887},{"class":548,"line":1886},26,[1888],{"type":40,"tag":546,"props":1889,"children":1890},{"style":1215},[1891],{"type":45,"value":1593},{"type":40,"tag":546,"props":1893,"children":1895},{"class":548,"line":1894},27,[1896],{"type":40,"tag":546,"props":1897,"children":1898},{"style":1215},[1899],{"type":45,"value":1900},"    }\n",{"type":40,"tag":546,"props":1902,"children":1904},{"class":548,"line":1903},28,[1905],{"type":40,"tag":546,"props":1906,"children":1907},{"style":1215},[1908],{"type":45,"value":1909},"  ]\n",{"type":40,"tag":546,"props":1911,"children":1913},{"class":548,"line":1912},29,[1914],{"type":40,"tag":546,"props":1915,"children":1916},{"style":1215},[1917],{"type":45,"value":1918},"}\n",{"type":40,"tag":48,"props":1920,"children":1921},{},[1922],{"type":45,"value":1923},"Two things easy to get wrong:",{"type":40,"tag":482,"props":1925,"children":1926},{},[1927,1937],{"type":40,"tag":486,"props":1928,"children":1929},{},[1930,1935],{"type":40,"tag":54,"props":1931,"children":1933},{"className":1932},[],[1934],{"type":45,"value":1490},{"type":45,"value":1936}," is an array even when matching a single selector",{"type":40,"tag":486,"props":1938,"children":1939},{},[1940,1942,1948],{"type":45,"value":1941},"The selector string includes the ",{"type":40,"tag":54,"props":1943,"children":1945},{"className":1944},[],[1946],{"type":45,"value":1947},"[data-attr=\"...\"]",{"type":45,"value":1949}," wrapper — it is a CSS selector, not a bare attribute value",{"type":40,"tag":48,"props":1951,"children":1952},{},[1953,1955,1960,1962,1967,1968,1973],{"type":45,"value":1954},"Decision rule: prefer an action (",{"type":40,"tag":54,"props":1956,"children":1958},{"className":1957},[],[1959],{"type":45,"value":939},{"type":45,"value":1961}," referencing an existing action — see Step 8) when the interaction will be referenced more than once; inline ",{"type":40,"tag":54,"props":1963,"children":1965},{"className":1964},[],[1966],{"type":45,"value":985},{"type":45,"value":917},{"type":40,"tag":54,"props":1969,"children":1971},{"className":1970},[],[1972],{"type":45,"value":1155},{"type":45,"value":1974}," filters when it's a one-off insight; raw HogQL (Step 7) when joining across events or doing custom aggregations.",{"type":40,"tag":470,"props":1976,"children":1978},{"id":1977},"_7-use-in-ad-hoc-queries",[1979],{"type":45,"value":1980},"7. Use in ad-hoc queries",{"type":40,"tag":48,"props":1982,"children":1983},{},[1984],{"type":45,"value":1985},"The discovered selector can be used directly in HogQL without creating an action.",{"type":40,"tag":48,"props":1987,"children":1988},{},[1989,1994],{"type":40,"tag":490,"props":1990,"children":1991},{},[1992],{"type":45,"value":1993},"Trends",{"type":45,"value":1995}," — count matching clicks over time:",{"type":40,"tag":535,"props":1997,"children":1999},{"className":537,"code":1998,"language":539,"meta":540,"style":540},"SELECT\n  toStartOfDay(timestamp) as day,\n  count() as clicks\nFROM events\nWHERE event = '$autocapture'\n  AND timestamp > now() - INTERVAL 14 DAY\n  AND elements_chain =~ '(^|;)button.*?data-attr=\"checkout\"'\nGROUP BY day\nORDER BY day\n",[2000],{"type":40,"tag":54,"props":2001,"children":2002},{"__ignoreMap":540},[2003,2011,2019,2027,2034,2041,2049,2057,2065],{"type":40,"tag":546,"props":2004,"children":2005},{"class":548,"line":549},[2006],{"type":40,"tag":546,"props":2007,"children":2008},{},[2009],{"type":45,"value":2010},"SELECT\n",{"type":40,"tag":546,"props":2012,"children":2013},{"class":548,"line":558},[2014],{"type":40,"tag":546,"props":2015,"children":2016},{},[2017],{"type":45,"value":2018},"  toStartOfDay(timestamp) as day,\n",{"type":40,"tag":546,"props":2020,"children":2021},{"class":548,"line":567},[2022],{"type":40,"tag":546,"props":2023,"children":2024},{},[2025],{"type":45,"value":2026},"  count() as clicks\n",{"type":40,"tag":546,"props":2028,"children":2029},{"class":548,"line":27},[2030],{"type":40,"tag":546,"props":2031,"children":2032},{},[2033],{"type":45,"value":564},{"type":40,"tag":546,"props":2035,"children":2036},{"class":548,"line":1297},[2037],{"type":40,"tag":546,"props":2038,"children":2039},{},[2040],{"type":45,"value":573},{"type":40,"tag":546,"props":2042,"children":2043},{"class":548,"line":1335},[2044],{"type":40,"tag":546,"props":2045,"children":2046},{},[2047],{"type":45,"value":2048},"  AND timestamp > now() - INTERVAL 14 DAY\n",{"type":40,"tag":546,"props":2050,"children":2051},{"class":548,"line":1372},[2052],{"type":40,"tag":546,"props":2053,"children":2054},{},[2055],{"type":45,"value":2056},"  AND elements_chain =~ '(^|;)button.*?data-attr=\"checkout\"'\n",{"type":40,"tag":546,"props":2058,"children":2059},{"class":548,"line":1396},[2060],{"type":40,"tag":546,"props":2061,"children":2062},{},[2063],{"type":45,"value":2064},"GROUP BY day\n",{"type":40,"tag":546,"props":2066,"children":2067},{"class":548,"line":1405},[2068],{"type":40,"tag":546,"props":2069,"children":2070},{},[2071],{"type":45,"value":2072},"ORDER BY day\n",{"type":40,"tag":48,"props":2074,"children":2075},{},[2076,2081],{"type":40,"tag":490,"props":2077,"children":2078},{},[2079],{"type":45,"value":2080},"Funnel",{"type":45,"value":2082}," — pageview to click conversion:",{"type":40,"tag":535,"props":2084,"children":2086},{"className":537,"code":2085,"language":539,"meta":540,"style":540},"SELECT\n  person_id,\n  first_pageview,\n  first_click_after\nFROM (\n  SELECT\n    p.person_id,\n    p.pageview_time as first_pageview,\n    min(c.click_time) as first_click_after\n  FROM (\n    SELECT person_id, min(timestamp) as pageview_time\n    FROM events\n    WHERE event = '$pageview'\n      AND timestamp > now() - INTERVAL 14 DAY\n      AND properties.$current_url ILIKE '%\u002Fpricing%'\n    GROUP BY person_id\n  ) p\n  INNER JOIN (\n    SELECT person_id, timestamp as click_time\n    FROM events\n    WHERE event = '$autocapture'\n      AND timestamp > now() - INTERVAL 14 DAY\n      AND elements_chain =~ '(^|;)button.*?data-attr=\"signup\"'\n  ) c ON p.person_id = c.person_id AND c.click_time > p.pageview_time\n  GROUP BY p.person_id, p.pageview_time\n)\n",[2087],{"type":40,"tag":54,"props":2088,"children":2089},{"__ignoreMap":540},[2090,2097,2105,2113,2121,2129,2137,2145,2153,2161,2169,2177,2185,2193,2201,2209,2217,2225,2233,2241,2248,2256,2263,2271,2279,2287],{"type":40,"tag":546,"props":2091,"children":2092},{"class":548,"line":549},[2093],{"type":40,"tag":546,"props":2094,"children":2095},{},[2096],{"type":45,"value":2010},{"type":40,"tag":546,"props":2098,"children":2099},{"class":548,"line":558},[2100],{"type":40,"tag":546,"props":2101,"children":2102},{},[2103],{"type":45,"value":2104},"  person_id,\n",{"type":40,"tag":546,"props":2106,"children":2107},{"class":548,"line":567},[2108],{"type":40,"tag":546,"props":2109,"children":2110},{},[2111],{"type":45,"value":2112},"  first_pageview,\n",{"type":40,"tag":546,"props":2114,"children":2115},{"class":548,"line":27},[2116],{"type":40,"tag":546,"props":2117,"children":2118},{},[2119],{"type":45,"value":2120},"  first_click_after\n",{"type":40,"tag":546,"props":2122,"children":2123},{"class":548,"line":1297},[2124],{"type":40,"tag":546,"props":2125,"children":2126},{},[2127],{"type":45,"value":2128},"FROM (\n",{"type":40,"tag":546,"props":2130,"children":2131},{"class":548,"line":1335},[2132],{"type":40,"tag":546,"props":2133,"children":2134},{},[2135],{"type":45,"value":2136},"  SELECT\n",{"type":40,"tag":546,"props":2138,"children":2139},{"class":548,"line":1372},[2140],{"type":40,"tag":546,"props":2141,"children":2142},{},[2143],{"type":45,"value":2144},"    p.person_id,\n",{"type":40,"tag":546,"props":2146,"children":2147},{"class":548,"line":1396},[2148],{"type":40,"tag":546,"props":2149,"children":2150},{},[2151],{"type":45,"value":2152},"    p.pageview_time as first_pageview,\n",{"type":40,"tag":546,"props":2154,"children":2155},{"class":548,"line":1405},[2156],{"type":40,"tag":546,"props":2157,"children":2158},{},[2159],{"type":45,"value":2160},"    min(c.click_time) as first_click_after\n",{"type":40,"tag":546,"props":2162,"children":2163},{"class":548,"line":1443},[2164],{"type":40,"tag":546,"props":2165,"children":2166},{},[2167],{"type":45,"value":2168},"  FROM (\n",{"type":40,"tag":546,"props":2170,"children":2171},{"class":548,"line":1480},[2172],{"type":40,"tag":546,"props":2173,"children":2174},{},[2175],{"type":45,"value":2176},"    SELECT person_id, min(timestamp) as pageview_time\n",{"type":40,"tag":546,"props":2178,"children":2179},{"class":548,"line":1544},[2180],{"type":40,"tag":546,"props":2181,"children":2182},{},[2183],{"type":45,"value":2184},"    FROM events\n",{"type":40,"tag":546,"props":2186,"children":2187},{"class":548,"line":1578},[2188],{"type":40,"tag":546,"props":2189,"children":2190},{},[2191],{"type":45,"value":2192},"    WHERE event = '$pageview'\n",{"type":40,"tag":546,"props":2194,"children":2195},{"class":548,"line":1587},[2196],{"type":40,"tag":546,"props":2197,"children":2198},{},[2199],{"type":45,"value":2200},"      AND timestamp > now() - INTERVAL 14 DAY\n",{"type":40,"tag":546,"props":2202,"children":2203},{"class":548,"line":1596},[2204],{"type":40,"tag":546,"props":2205,"children":2206},{},[2207],{"type":45,"value":2208},"      AND properties.$current_url ILIKE '%\u002Fpricing%'\n",{"type":40,"tag":546,"props":2210,"children":2211},{"class":548,"line":1605},[2212],{"type":40,"tag":546,"props":2213,"children":2214},{},[2215],{"type":45,"value":2216},"    GROUP BY person_id\n",{"type":40,"tag":546,"props":2218,"children":2219},{"class":548,"line":1613},[2220],{"type":40,"tag":546,"props":2221,"children":2222},{},[2223],{"type":45,"value":2224},"  ) p\n",{"type":40,"tag":546,"props":2226,"children":2227},{"class":548,"line":1649},[2228],{"type":40,"tag":546,"props":2229,"children":2230},{},[2231],{"type":45,"value":2232},"  INNER JOIN (\n",{"type":40,"tag":546,"props":2234,"children":2235},{"class":548,"line":1685},[2236],{"type":40,"tag":546,"props":2237,"children":2238},{},[2239],{"type":45,"value":2240},"    SELECT person_id, timestamp as click_time\n",{"type":40,"tag":546,"props":2242,"children":2243},{"class":548,"line":1709},[2244],{"type":40,"tag":546,"props":2245,"children":2246},{},[2247],{"type":45,"value":2184},{"type":40,"tag":546,"props":2249,"children":2250},{"class":548,"line":1717},[2251],{"type":40,"tag":546,"props":2252,"children":2253},{},[2254],{"type":45,"value":2255},"    WHERE event = '$autocapture'\n",{"type":40,"tag":546,"props":2257,"children":2258},{"class":548,"line":1753},[2259],{"type":40,"tag":546,"props":2260,"children":2261},{},[2262],{"type":45,"value":2200},{"type":40,"tag":546,"props":2264,"children":2265},{"class":548,"line":1789},[2266],{"type":40,"tag":546,"props":2267,"children":2268},{},[2269],{"type":45,"value":2270},"      AND elements_chain =~ '(^|;)button.*?data-attr=\"signup\"'\n",{"type":40,"tag":546,"props":2272,"children":2273},{"class":548,"line":1846},[2274],{"type":40,"tag":546,"props":2275,"children":2276},{},[2277],{"type":45,"value":2278},"  ) c ON p.person_id = c.person_id AND c.click_time > p.pageview_time\n",{"type":40,"tag":546,"props":2280,"children":2281},{"class":548,"line":1878},[2282],{"type":40,"tag":546,"props":2283,"children":2284},{},[2285],{"type":45,"value":2286},"  GROUP BY p.person_id, p.pageview_time\n",{"type":40,"tag":546,"props":2288,"children":2289},{"class":548,"line":1886},[2290],{"type":40,"tag":546,"props":2291,"children":2292},{},[2293],{"type":45,"value":2294},")\n",{"type":40,"tag":48,"props":2296,"children":2297},{},[2298,2300,2306,2307,2313],{"type":45,"value":2299},"For recurring analysis, prefer creating an action (next step) or using ",{"type":40,"tag":54,"props":2301,"children":2303},{"className":2302},[],[2304],{"type":45,"value":2305},"posthog:query-trends",{"type":45,"value":917},{"type":40,"tag":54,"props":2308,"children":2310},{"className":2309},[],[2311],{"type":45,"value":2312},"posthog:query-funnel",{"type":45,"value":2314}," with the action.",{"type":40,"tag":470,"props":2316,"children":2318},{"id":2317},"_8-create-an-action",[2319],{"type":45,"value":2320},"8. Create an action",{"type":40,"tag":48,"props":2322,"children":2323},{},[2324,2326,2332],{"type":45,"value":2325},"Actions are the durable version of ad-hoc selector queries.\nOnce the criteria uniquely identify the interaction, create an action using ",{"type":40,"tag":54,"props":2327,"children":2329},{"className":2328},[],[2330],{"type":45,"value":2331},"posthog:action-create",{"type":45,"value":725},{"type":40,"tag":48,"props":2334,"children":2335},{},[2336],{"type":45,"value":2337},"Construct the step with only the filters needed for uniqueness:",{"type":40,"tag":535,"props":2339,"children":2341},{"className":1203,"code":2340,"language":1205,"meta":540,"style":540},"{\n  \"name\": \"Clicked checkout button\",\n  \"steps\": [\n    {\n      \"event\": \"$autocapture\",\n      \"selector\": \"button[data-attr='checkout']\",\n      \"text\": \"Complete Purchase\",\n      \"text_matching\": \"exact\",\n      \"url\": \"\u002Fcheckout\",\n      \"url_matching\": \"contains\"\n    }\n  ]\n}\n",[2342],{"type":40,"tag":54,"props":2343,"children":2344},{"__ignoreMap":540},[2345,2352,2389,2413,2420,2455,2491,2527,2563,2600,2633,2640,2647],{"type":40,"tag":546,"props":2346,"children":2347},{"class":548,"line":549},[2348],{"type":40,"tag":546,"props":2349,"children":2350},{"style":1215},[2351],{"type":45,"value":1218},{"type":40,"tag":546,"props":2353,"children":2354},{"class":548,"line":558},[2355,2359,2364,2368,2372,2376,2381,2385],{"type":40,"tag":546,"props":2356,"children":2357},{"style":1215},[2358],{"type":45,"value":1226},{"type":40,"tag":546,"props":2360,"children":2361},{"style":1229},[2362],{"type":45,"value":2363},"name",{"type":40,"tag":546,"props":2365,"children":2366},{"style":1215},[2367],{"type":45,"value":1237},{"type":40,"tag":546,"props":2369,"children":2370},{"style":1215},[2371],{"type":45,"value":1242},{"type":40,"tag":546,"props":2373,"children":2374},{"style":1215},[2375],{"type":45,"value":1247},{"type":40,"tag":546,"props":2377,"children":2378},{"style":1250},[2379],{"type":45,"value":2380},"Clicked checkout button",{"type":40,"tag":546,"props":2382,"children":2383},{"style":1215},[2384],{"type":45,"value":1237},{"type":40,"tag":546,"props":2386,"children":2387},{"style":1215},[2388],{"type":45,"value":1261},{"type":40,"tag":546,"props":2390,"children":2391},{"class":548,"line":567},[2392,2396,2401,2405,2409],{"type":40,"tag":546,"props":2393,"children":2394},{"style":1215},[2395],{"type":45,"value":1226},{"type":40,"tag":546,"props":2397,"children":2398},{"style":1229},[2399],{"type":45,"value":2400},"steps",{"type":40,"tag":546,"props":2402,"children":2403},{"style":1215},[2404],{"type":45,"value":1237},{"type":40,"tag":546,"props":2406,"children":2407},{"style":1215},[2408],{"type":45,"value":1242},{"type":40,"tag":546,"props":2410,"children":2411},{"style":1215},[2412],{"type":45,"value":1286},{"type":40,"tag":546,"props":2414,"children":2415},{"class":548,"line":27},[2416],{"type":40,"tag":546,"props":2417,"children":2418},{"style":1215},[2419],{"type":45,"value":1294},{"type":40,"tag":546,"props":2421,"children":2422},{"class":548,"line":1297},[2423,2427,2431,2435,2439,2443,2447,2451],{"type":40,"tag":546,"props":2424,"children":2425},{"style":1215},[2426],{"type":45,"value":1303},{"type":40,"tag":546,"props":2428,"children":2429},{"style":1306},[2430],{"type":45,"value":1345},{"type":40,"tag":546,"props":2432,"children":2433},{"style":1215},[2434],{"type":45,"value":1237},{"type":40,"tag":546,"props":2436,"children":2437},{"style":1215},[2438],{"type":45,"value":1242},{"type":40,"tag":546,"props":2440,"children":2441},{"style":1215},[2442],{"type":45,"value":1247},{"type":40,"tag":546,"props":2444,"children":2445},{"style":1250},[2446],{"type":45,"value":59},{"type":40,"tag":546,"props":2448,"children":2449},{"style":1215},[2450],{"type":45,"value":1237},{"type":40,"tag":546,"props":2452,"children":2453},{"style":1215},[2454],{"type":45,"value":1261},{"type":40,"tag":546,"props":2456,"children":2457},{"class":548,"line":1335},[2458,2462,2466,2470,2474,2478,2483,2487],{"type":40,"tag":546,"props":2459,"children":2460},{"style":1215},[2461],{"type":45,"value":1303},{"type":40,"tag":546,"props":2463,"children":2464},{"style":1306},[2465],{"type":45,"value":993},{"type":40,"tag":546,"props":2467,"children":2468},{"style":1215},[2469],{"type":45,"value":1237},{"type":40,"tag":546,"props":2471,"children":2472},{"style":1215},[2473],{"type":45,"value":1242},{"type":40,"tag":546,"props":2475,"children":2476},{"style":1215},[2477],{"type":45,"value":1247},{"type":40,"tag":546,"props":2479,"children":2480},{"style":1250},[2481],{"type":45,"value":2482},"button[data-attr='checkout']",{"type":40,"tag":546,"props":2484,"children":2485},{"style":1215},[2486],{"type":45,"value":1237},{"type":40,"tag":546,"props":2488,"children":2489},{"style":1215},[2490],{"type":45,"value":1261},{"type":40,"tag":546,"props":2492,"children":2493},{"class":548,"line":1372},[2494,2498,2502,2506,2510,2514,2519,2523],{"type":40,"tag":546,"props":2495,"children":2496},{"style":1215},[2497],{"type":45,"value":1303},{"type":40,"tag":546,"props":2499,"children":2500},{"style":1306},[2501],{"type":45,"value":45},{"type":40,"tag":546,"props":2503,"children":2504},{"style":1215},[2505],{"type":45,"value":1237},{"type":40,"tag":546,"props":2507,"children":2508},{"style":1215},[2509],{"type":45,"value":1242},{"type":40,"tag":546,"props":2511,"children":2512},{"style":1215},[2513],{"type":45,"value":1247},{"type":40,"tag":546,"props":2515,"children":2516},{"style":1250},[2517],{"type":45,"value":2518},"Complete Purchase",{"type":40,"tag":546,"props":2520,"children":2521},{"style":1215},[2522],{"type":45,"value":1237},{"type":40,"tag":546,"props":2524,"children":2525},{"style":1215},[2526],{"type":45,"value":1261},{"type":40,"tag":546,"props":2528,"children":2529},{"class":548,"line":1396},[2530,2534,2539,2543,2547,2551,2555,2559],{"type":40,"tag":546,"props":2531,"children":2532},{"style":1215},[2533],{"type":45,"value":1303},{"type":40,"tag":546,"props":2535,"children":2536},{"style":1306},[2537],{"type":45,"value":2538},"text_matching",{"type":40,"tag":546,"props":2540,"children":2541},{"style":1215},[2542],{"type":45,"value":1237},{"type":40,"tag":546,"props":2544,"children":2545},{"style":1215},[2546],{"type":45,"value":1242},{"type":40,"tag":546,"props":2548,"children":2549},{"style":1215},[2550],{"type":45,"value":1247},{"type":40,"tag":546,"props":2552,"children":2553},{"style":1250},[2554],{"type":45,"value":1048},{"type":40,"tag":546,"props":2556,"children":2557},{"style":1215},[2558],{"type":45,"value":1237},{"type":40,"tag":546,"props":2560,"children":2561},{"style":1215},[2562],{"type":45,"value":1261},{"type":40,"tag":546,"props":2564,"children":2565},{"class":548,"line":1405},[2566,2570,2575,2579,2583,2587,2592,2596],{"type":40,"tag":546,"props":2567,"children":2568},{"style":1215},[2569],{"type":45,"value":1303},{"type":40,"tag":546,"props":2571,"children":2572},{"style":1306},[2573],{"type":45,"value":2574},"url",{"type":40,"tag":546,"props":2576,"children":2577},{"style":1215},[2578],{"type":45,"value":1237},{"type":40,"tag":546,"props":2580,"children":2581},{"style":1215},[2582],{"type":45,"value":1242},{"type":40,"tag":546,"props":2584,"children":2585},{"style":1215},[2586],{"type":45,"value":1247},{"type":40,"tag":546,"props":2588,"children":2589},{"style":1250},[2590],{"type":45,"value":2591},"\u002Fcheckout",{"type":40,"tag":546,"props":2593,"children":2594},{"style":1215},[2595],{"type":45,"value":1237},{"type":40,"tag":546,"props":2597,"children":2598},{"style":1215},[2599],{"type":45,"value":1261},{"type":40,"tag":546,"props":2601,"children":2602},{"class":548,"line":1443},[2603,2607,2612,2616,2620,2624,2629],{"type":40,"tag":546,"props":2604,"children":2605},{"style":1215},[2606],{"type":45,"value":1303},{"type":40,"tag":546,"props":2608,"children":2609},{"style":1306},[2610],{"type":45,"value":2611},"url_matching",{"type":40,"tag":546,"props":2613,"children":2614},{"style":1215},[2615],{"type":45,"value":1237},{"type":40,"tag":546,"props":2617,"children":2618},{"style":1215},[2619],{"type":45,"value":1242},{"type":40,"tag":546,"props":2621,"children":2622},{"style":1215},[2623],{"type":45,"value":1247},{"type":40,"tag":546,"props":2625,"children":2626},{"style":1250},[2627],{"type":45,"value":2628},"contains",{"type":40,"tag":546,"props":2630,"children":2631},{"style":1215},[2632],{"type":45,"value":1575},{"type":40,"tag":546,"props":2634,"children":2635},{"class":548,"line":1480},[2636],{"type":40,"tag":546,"props":2637,"children":2638},{"style":1215},[2639],{"type":45,"value":1900},{"type":40,"tag":546,"props":2641,"children":2642},{"class":548,"line":1544},[2643],{"type":40,"tag":546,"props":2644,"children":2645},{"style":1215},[2646],{"type":45,"value":1909},{"type":40,"tag":546,"props":2648,"children":2649},{"class":548,"line":1578},[2650],{"type":40,"tag":546,"props":2651,"children":2652},{"style":1215},[2653],{"type":45,"value":1918},{"type":40,"tag":48,"props":2655,"children":2656},{},[2657,2659,2664],{"type":45,"value":2658},"Available step fields for ",{"type":40,"tag":54,"props":2660,"children":2662},{"className":2661},[],[2663],{"type":45,"value":59},{"type":45,"value":1242},{"type":40,"tag":482,"props":2666,"children":2667},{},[2668,2684,2714,2749,2784],{"type":40,"tag":486,"props":2669,"children":2670},{},[2671,2676,2678,2683],{"type":40,"tag":54,"props":2672,"children":2674},{"className":2673},[],[2675],{"type":45,"value":993},{"type":45,"value":2677}," — CSS selector (e.g. ",{"type":40,"tag":54,"props":2679,"children":2681},{"className":2680},[],[2682],{"type":45,"value":2482},{"type":45,"value":170},{"type":40,"tag":486,"props":2685,"children":2686},{},[2687,2692,2694,2700,2701,2706,2707,2713],{"type":40,"tag":54,"props":2688,"children":2690},{"className":2689},[],[2691],{"type":45,"value":1000},{"type":45,"value":2693}," — HTML tag name (e.g. ",{"type":40,"tag":54,"props":2695,"children":2697},{"className":2696},[],[2698],{"type":45,"value":2699},"button",{"type":45,"value":328},{"type":40,"tag":54,"props":2702,"children":2704},{"className":2703},[],[2705],{"type":45,"value":163},{"type":45,"value":328},{"type":40,"tag":54,"props":2708,"children":2710},{"className":2709},[],[2711],{"type":45,"value":2712},"input",{"type":45,"value":170},{"type":40,"tag":486,"props":2715,"children":2716},{},[2717,2722,2723,2728,2730,2735,2736,2741,2743,2748],{"type":40,"tag":54,"props":2718,"children":2720},{"className":2719},[],[2721],{"type":45,"value":45},{"type":45,"value":917},{"type":40,"tag":54,"props":2724,"children":2726},{"className":2725},[],[2727],{"type":45,"value":2538},{"type":45,"value":2729}," — element text (",{"type":40,"tag":54,"props":2731,"children":2733},{"className":2732},[],[2734],{"type":45,"value":1048},{"type":45,"value":328},{"type":40,"tag":54,"props":2737,"children":2739},{"className":2738},[],[2740],{"type":45,"value":2628},{"type":45,"value":2742},", or ",{"type":40,"tag":54,"props":2744,"children":2746},{"className":2745},[],[2747],{"type":45,"value":1121},{"type":45,"value":170},{"type":40,"tag":486,"props":2750,"children":2751},{},[2752,2757,2758,2764,2766,2771,2772,2777,2778,2783],{"type":40,"tag":54,"props":2753,"children":2755},{"className":2754},[],[2756],{"type":45,"value":1013},{"type":45,"value":917},{"type":40,"tag":54,"props":2759,"children":2761},{"className":2760},[],[2762],{"type":45,"value":2763},"href_matching",{"type":45,"value":2765}," — link href (",{"type":40,"tag":54,"props":2767,"children":2769},{"className":2768},[],[2770],{"type":45,"value":1048},{"type":45,"value":328},{"type":40,"tag":54,"props":2773,"children":2775},{"className":2774},[],[2776],{"type":45,"value":2628},{"type":45,"value":2742},{"type":40,"tag":54,"props":2779,"children":2781},{"className":2780},[],[2782],{"type":45,"value":1121},{"type":45,"value":170},{"type":40,"tag":486,"props":2785,"children":2786},{},[2787,2792,2793,2798,2800,2805,2806,2811,2812,2817],{"type":40,"tag":54,"props":2788,"children":2790},{"className":2789},[],[2791],{"type":45,"value":2574},{"type":45,"value":917},{"type":40,"tag":54,"props":2794,"children":2796},{"className":2795},[],[2797],{"type":45,"value":2611},{"type":45,"value":2799}," — page URL (",{"type":40,"tag":54,"props":2801,"children":2803},{"className":2802},[],[2804],{"type":45,"value":1048},{"type":45,"value":328},{"type":40,"tag":54,"props":2807,"children":2809},{"className":2808},[],[2810],{"type":45,"value":2628},{"type":45,"value":2742},{"type":40,"tag":54,"props":2813,"children":2815},{"className":2814},[],[2816],{"type":45,"value":1121},{"type":45,"value":170},{"type":40,"tag":48,"props":2819,"children":2820},{},[2821,2823,2829],{"type":45,"value":2822},"After creation, verify with ",{"type":40,"tag":54,"props":2824,"children":2826},{"className":2825},[],[2827],{"type":45,"value":2828},"matchesAction()",{"type":45,"value":1242},{"type":40,"tag":535,"props":2831,"children":2833},{"className":537,"code":2832,"language":539,"meta":540,"style":540},"SELECT count() as matching_events\nFROM events\nWHERE matchesAction('Clicked checkout button')\n  AND timestamp > now() - INTERVAL 7 DAY\n",[2834],{"type":40,"tag":54,"props":2835,"children":2836},{"__ignoreMap":540},[2837,2845,2852,2860],{"type":40,"tag":546,"props":2838,"children":2839},{"class":548,"line":549},[2840],{"type":40,"tag":546,"props":2841,"children":2842},{},[2843],{"type":45,"value":2844},"SELECT count() as matching_events\n",{"type":40,"tag":546,"props":2846,"children":2847},{"class":548,"line":558},[2848],{"type":40,"tag":546,"props":2849,"children":2850},{},[2851],{"type":45,"value":564},{"type":40,"tag":546,"props":2853,"children":2854},{"class":548,"line":567},[2855],{"type":40,"tag":546,"props":2856,"children":2857},{},[2858],{"type":45,"value":2859},"WHERE matchesAction('Clicked checkout button')\n",{"type":40,"tag":546,"props":2861,"children":2862},{"class":548,"line":27},[2863],{"type":40,"tag":546,"props":2864,"children":2865},{},[2866],{"type":45,"value":581},{"type":40,"tag":89,"props":2868,"children":2870},{"id":2869},"tips",[2871],{"type":45,"value":2872},"Tips",{"type":40,"tag":482,"props":2874,"children":2875},{},[2876,2888,2908,2919],{"type":40,"tag":486,"props":2877,"children":2878},{},[2879,2881,2886],{"type":45,"value":2880},"Always set timestamp filters — ",{"type":40,"tag":54,"props":2882,"children":2884},{"className":2883},[],[2885],{"type":45,"value":59},{"type":45,"value":2887}," is high volume",{"type":40,"tag":486,"props":2889,"children":2890},{},[2891,2893,2899,2901,2906],{"type":45,"value":2892},"Use ",{"type":40,"tag":54,"props":2894,"children":2896},{"className":2895},[],[2897],{"type":45,"value":2898},"LIMIT",{"type":45,"value":2900}," generously when sampling ",{"type":40,"tag":54,"props":2902,"children":2904},{"className":2903},[],[2905],{"type":45,"value":67},{"type":45,"value":2907}," — the strings can be long",{"type":40,"tag":486,"props":2909,"children":2910},{},[2911,2912,2917],{"type":45,"value":99},{"type":40,"tag":54,"props":2913,"children":2915},{"className":2914},[],[2916],{"type":45,"value":827},{"type":45,"value":2918}," operator matches CSS selectors as regex internally;\nprefer materialized columns when possible for performance",{"type":40,"tag":486,"props":2920,"children":2921},{},[2922],{"type":45,"value":2923},"This workflow only applies to posthog-js — other SDKs do not capture elements",{"type":40,"tag":2925,"props":2926,"children":2927},"style",{},[2928],{"type":45,"value":2929},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"items":2931,"total":3040},[2932,2949,2969,2983,3001,3013,3024],{"slug":2933,"name":2933,"fn":2934,"description":2935,"org":2936,"tags":2937,"stars":23,"repoUrl":24,"updatedAt":2948},"account-handover","draft sales account handover notes","Draft structured handover notes for transitioning a PostHog account from one TAM or CSM to another. Use this skill when a TAM needs to hand over an account, prepare a transition briefing, write handover notes, create an account summary for a new owner, or any request involving account transitions between TAMs or CSMs. Triggers on \"hand over this account\", \"transition account to\", \"draft handover notes\", \"account briefing for new TAM\", \"prepare account transition\", or when a TAM names an account and says they're leaving or reassigning it.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2938,2941,2944,2945],{"name":2939,"slug":2940,"type":13},"Communications","communications",{"name":2942,"slug":2943,"type":13},"CRM","crm",{"name":9,"slug":8,"type":13},{"name":2946,"slug":2947,"type":13},"Sales","sales","2026-04-16T05:13:00.172732",{"slug":2950,"name":2950,"fn":2951,"description":2952,"org":2953,"tags":2954,"stars":23,"repoUrl":24,"updatedAt":2968},"auditing-warehouse-data-health","audit PostHog data warehouse health","Audit the health of a PostHog project's data warehouse — find every broken or degraded pipeline item across sources, sync schemas, materialized views, batch exports, and transformations. Use when the user asks \"what's broken in my warehouse?\", \"give me a health check\", \"audit my data pipeline\", \"why are some dashboards stale?\", or wants a one-shot triage summary before deciding where to spend time. Produces a prioritized report of issues grouped by severity and type, with recommended next steps.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2955,2958,2961,2964,2967],{"name":2956,"slug":2957,"type":13},"Audit","audit",{"name":2959,"slug":2960,"type":13},"Data Engineering","data-engineering",{"name":2962,"slug":2963,"type":13},"Data Quality","data-quality",{"name":2965,"slug":2966,"type":13},"Observability","observability",{"name":9,"slug":8,"type":13},"2026-06-21T08:19:05.85849",{"slug":2970,"name":2970,"fn":2971,"description":2972,"org":2973,"tags":2974,"stars":23,"repoUrl":24,"updatedAt":2982},"copying-flags-across-projects","copy feature flags across PostHog projects","Copy a feature flag from one PostHog project to one or more target projects in the same organization. Use when the user wants to duplicate a flag, promote a flag from staging to production, sync flags across projects, or replicate a flag configuration in a different workspace. Covers cohort remapping, scheduled-change handling, encrypted payloads, and the safe defaults (disabled in target, no scheduled changes).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2975,2978,2981],{"name":2976,"slug":2977,"type":13},"Deployment","deployment",{"name":2979,"slug":2980,"type":13},"Feature Flags","feature-flags",{"name":9,"slug":8,"type":13},"2026-05-04T05:56:44.484909",{"slug":2984,"name":2984,"fn":2985,"description":2986,"org":2987,"tags":2988,"stars":23,"repoUrl":24,"updatedAt":3000},"diagnosing-experiment-results","diagnose PostHog experiment results and anomalies","Diagnoses bias, anomalies, and strange-looking results on a specific PostHog experiment. Covers empty \u002F 0-exposure experiments, sample ratio mismatch, identity fragmentation, multi-variant exposure, uneven-split exclusion bias, significance traps (peeking, A\u002FA, Bayesian vs Frequentist), PostHog-vs-SQL discrepancies, and surprises after mid-run edits. Symptom-driven dispatch to the right diagnostic.\nTRIGGER when: user asks 'is my experiment biased?' or 'why 0 exposures?', references the bias banner, says a variant looks strange \u002F wrong \u002F off, sees significance flipping, notices PostHog numbers disagreeing with their SQL, sees an A\u002FA test showing significance, or reports surprises after mid-run edits.\nDO NOT TRIGGER when: creating a new experiment (use creating-experiments), only configuring rollout (use configuring-experiment-rollout) or metrics (use configuring-experiment-analytics), or only asking lifecycle questions (use managing-experiment-lifecycle).",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[2989,2992,2993,2996,2999],{"name":2990,"slug":2991,"type":13},"A\u002FB Testing","a-b-testing",{"name":18,"slug":19,"type":13},{"name":2994,"slug":2995,"type":13},"Data Analysis","data-analysis",{"name":2997,"slug":2998,"type":13},"Debugging","debugging",{"name":9,"slug":8,"type":13},"2026-05-22T06:59:58.103867",{"slug":3002,"name":3002,"fn":3003,"description":3004,"org":3005,"tags":3006,"stars":23,"repoUrl":24,"updatedAt":3012},"diagnosing-missing-recordings","diagnose missing PostHog session recordings","Diagnoses why a session recording is missing or was not captured. Use when a user asks why a session has no replay, why recordings aren't appearing, or wants to troubleshoot session replay capture issues for a specific session ID or across their project. Covers SDK diagnostic signals, project settings, sampling, triggers, ad blockers, and quota\u002Fbilling scenarios.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3007,3008,3009,3010,3011],{"name":18,"slug":19,"type":13},{"name":2997,"slug":2998,"type":13},{"name":21,"slug":22,"type":13},{"name":2965,"slug":2966,"type":13},{"name":9,"slug":8,"type":13},"2026-04-22T05:06:51.989772",{"slug":3014,"name":3014,"fn":3015,"description":3016,"org":3017,"tags":3018,"stars":23,"repoUrl":24,"updatedAt":3023},"diagnosing-sdk-health","diagnose PostHog SDK health","Diagnoses the health of a project's PostHog SDK integrations — which SDKs are out of date and how to fix them. Use when a user asks about PostHog SDK versions, outdated SDKs, upgrade recommendations, \"SDK health\", \"SDK doctor\" (the former name), or when events or features seem off and it might be due to an old SDK.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3019,3020,3021,3022],{"name":18,"slug":19,"type":13},{"name":2997,"slug":2998,"type":13},{"name":2965,"slug":2966,"type":13},{"name":9,"slug":8,"type":13},"2026-04-27T05:46:14.554016",{"slug":3025,"name":3025,"fn":3026,"description":3027,"org":3028,"tags":3029,"stars":23,"repoUrl":24,"updatedAt":3039},"error-tracking-android","track Android errors with PostHog","PostHog error tracking for Android",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3030,3033,3034,3037,3038],{"name":3031,"slug":3032,"type":13},"Android","android",{"name":2997,"slug":2998,"type":13},{"name":3035,"slug":3036,"type":13},"Mobile","mobile",{"name":2965,"slug":2966,"type":13},{"name":9,"slug":8,"type":13},"2026-04-06T18:46:26.982494",110,{"items":3042,"total":3205},[3043,3058,3068,3081,3094,3107,3123,3140,3152,3167,3177,3195],{"slug":3044,"name":3044,"fn":3045,"description":3046,"org":3047,"tags":3048,"stars":3055,"repoUrl":3056,"updatedAt":3057},"analyzing-expensive-users","analyze expensive users in AI observability","Analyze the most expensive users in AI observability and explain why they cost so much. Use when the user asks about top spenders, expensive users, per-user LLM cost, user-level cost drivers, or patterns behind high AI observability spend.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3049,3050,3053,3054],{"name":18,"slug":19,"type":13},{"name":3051,"slug":3052,"type":13},"Cost Optimization","cost-optimization",{"name":2965,"slug":2966,"type":13},{"name":9,"slug":8,"type":13},35568,"https:\u002F\u002Fgithub.com\u002FPostHog\u002Fposthog","2026-07-28T05:34:11.117757",{"slug":3059,"name":3059,"fn":3060,"description":3061,"org":3062,"tags":3063,"stars":3055,"repoUrl":3056,"updatedAt":3067},"auditing-endpoints","audit PostHog project endpoints","Audit every endpoint in a PostHog project for staleness, failed materialisations, and unused materialised versions. Use when the user asks \"what endpoints can I clean up?\", \"are any of my endpoints broken?\", \"which materialised versions are still being called?\", or wants a one-shot cleanup pass over the Endpoints product. Produces a prioritised report grouped by issue type, with recommended actions but does not modify anything without explicit confirmation.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3064,3065,3066],{"name":18,"slug":19,"type":13},{"name":2956,"slug":2957,"type":13},{"name":9,"slug":8,"type":13},"2026-06-08T08:08:33.693989",{"slug":3069,"name":3069,"fn":3070,"description":3071,"org":3072,"tags":3073,"stars":3055,"repoUrl":3056,"updatedAt":3080},"auditing-warehouse-source-health","audit PostHog data warehouse source health","Audit the health of a PostHog project's data warehouse sources and syncs — find every broken or degraded source connection, sync schema, and webhook channel. Use when the user asks \"why are my imports failing?\", \"what's broken with my sources?\", \"why is my warehouse data stale?\", or wants a one-shot triage of source\u002Fsync health before deciding where to dig in. Produces a prioritized report grouped by severity, with recommended next steps. For materialized-view health use `auditing-warehouse-view-health`; for a single failing sync use `diagnosing-failed-warehouse-syncs`.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3074,3075,3078,3079],{"name":2956,"slug":2957,"type":13},{"name":3076,"slug":3077,"type":13},"Data Warehouse","data-warehouse",{"name":2965,"slug":2966,"type":13},{"name":9,"slug":8,"type":13},"2026-06-18T08:22:57.67984",{"slug":3082,"name":3082,"fn":3083,"description":3084,"org":3085,"tags":3086,"stars":3055,"repoUrl":3056,"updatedAt":3093},"auditing-warehouse-view-health","audit PostHog materialized view health","Audit the health of a PostHog project's materialized views (saved queries) — find every failed materialization and flag unused or stale materialized views that cost storage and compute. Use when the user asks \"which of my views are broken?\", \"why is this materialized view failing?\", \"are any of my views wasting compute?\", or wants a one-shot triage of view health. For source\u002Fsync health use `auditing-warehouse-source-health`.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3087,3088,3089,3092],{"name":2956,"slug":2957,"type":13},{"name":3076,"slug":3077,"type":13},{"name":3090,"slug":3091,"type":13},"Performance","performance",{"name":9,"slug":8,"type":13},"2026-06-18T08:25:10.936787",{"slug":3095,"name":3095,"fn":3096,"description":3097,"org":3098,"tags":3099,"stars":3055,"repoUrl":3056,"updatedAt":3106},"authoring-error-tracking-alerts","author PostHog error tracking alerts","Author error tracking alerts that fire when an issue is created, reopened, or starts spiking. Use when the user asks to set up error notifications, route exceptions to Slack\u002Fwebhook\u002FLinear, or evaluate which error events are worth alerting on. Covers trigger-event selection, integration choice, dedup against existing alerts, and shipping with the canonical message body shape.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3100,3103,3104,3105],{"name":3101,"slug":3102,"type":13},"Alerting","alerting",{"name":2997,"slug":2998,"type":13},{"name":2965,"slug":2966,"type":13},{"name":9,"slug":8,"type":13},"2026-06-18T08:24:40.318583",{"slug":3108,"name":3108,"fn":3109,"description":3110,"org":3111,"tags":3112,"stars":3055,"repoUrl":3056,"updatedAt":3122},"authoring-log-alerts","author log alerts in PostHog","Author useful, low-noise log alerts on services in a PostHog project. Use when the user asks to set up alerts for their logs, suggest alerts they should add, or evaluate whether a service is worth monitoring. Covers service triage, baseline characterisation, threshold drafting, back-testing via simulate, and shipping with a notification destination.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3113,3114,3117,3118,3121],{"name":18,"slug":19,"type":13},{"name":3115,"slug":3116,"type":13},"Monitoring","monitoring",{"name":2965,"slug":2966,"type":13},{"name":3119,"slug":3120,"type":13},"Operations","operations",{"name":9,"slug":8,"type":13},"2026-07-18T05:10:54.430898",{"slug":3124,"name":3124,"fn":3125,"description":3126,"org":3127,"tags":3128,"stars":3055,"repoUrl":3056,"updatedAt":3139},"building-workflows","build and edit PostHog workflows","Build, edit, test, enable, and monitor PostHog workflows over MCP. Author the action\u002Fedge graph so it runs and opens cleanly in the visual editor, then change drafts surgically with patch operations. Use when asked to build, set up, automate, change, fix, or debug a workflow, campaign, broadcast, drip sequence, or event-triggered automation in the workflows product.",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3129,3132,3135,3136],{"name":3130,"slug":3131,"type":13},"Automation","automation",{"name":3133,"slug":3134,"type":13},"MCP","mcp",{"name":9,"slug":8,"type":13},{"name":3137,"slug":3138,"type":13},"Workflow Automation","workflow-automation","2026-07-28T05:34:12.167015",{"slug":3141,"name":3141,"fn":3142,"description":3143,"org":3144,"tags":3145,"stars":3055,"repoUrl":3056,"updatedAt":3151},"check-posthog-loading","inspect PostHog SDK loading across URLs","Inspect how the PostHog JavaScript SDK is loaded across a list of URLs. Use to confirm consistent installation across pages, find pages missing the snippet, detect mismatched API keys or hosts between pages, and verify the load method (head snippet vs deferred vs array.js).\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3146,3147,3148,3149,3150],{"name":18,"slug":19,"type":13},{"name":2997,"slug":2998,"type":13},{"name":21,"slug":22,"type":13},{"name":2965,"slug":2966,"type":13},{"name":9,"slug":8,"type":13},"2026-05-07T05:56:19.828048",{"slug":3153,"name":3153,"fn":3154,"description":3155,"org":3156,"tags":3157,"stars":3055,"repoUrl":3056,"updatedAt":3166},"consuming-endpoints-from-client-code","integrate PostHog endpoints into client applications","Wire a PostHog endpoint into a client app or SDK. Covers fetching the OpenAPI spec, generating a typed client with openapi-generator or @hey-api\u002Fopenapi-ts, sending the right auth header, shaping the variables payload (HogQL code_name vs insight breakdown property), handling rate-limit and materialised-endpoint error responses. Use when the user says \"how do I call my endpoint\", \"generate a client for this\", or \"what auth header do I use\".\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3158,3161,3162,3163],{"name":3159,"slug":3160,"type":13},"API Development","api-development",{"name":21,"slug":22,"type":13},{"name":9,"slug":8,"type":13},{"name":3164,"slug":3165,"type":13},"SDK","sdk","2026-06-08T08:08:34.929454",{"slug":3168,"name":3168,"fn":3169,"description":3170,"org":3171,"tags":3172,"stars":3055,"repoUrl":3056,"updatedAt":3176},"copying-endpoints-across-projects","copy PostHog endpoints across projects","Copy a PostHog endpoint (a saved HogQL\u002Finsight query exposed as an API route) to another project in the same organization, or duplicate it under a new name in the same project. Use when the user wants to duplicate an endpoint, promote an endpoint from staging to production, replicate an endpoint's query\u002Fvariables\u002Ffreshness config in another workspace, or clone an endpoint to iterate on it. Unlike feature flags and experiments, endpoints have NO native cross-project copy tool — this skill covers the read-then-recreate flow (endpoint-get then endpoint-create), the active-project switching it requires, name-collision checks, and the safe defaults (land unmaterialised in the target, verify with endpoint-run). Does not cover editing endpoint versions (see managing-endpoint-versions) or authoring a brand-new endpoint from scratch (see creating-an-endpoint).\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3173,3174,3175],{"name":3159,"slug":3160,"type":13},{"name":3119,"slug":3120,"type":13},{"name":9,"slug":8,"type":13},"2026-07-15T05:29:58.442727",{"slug":3178,"name":3178,"fn":3179,"description":3180,"org":3181,"tags":3182,"stars":3055,"repoUrl":3056,"updatedAt":3194},"creating-ai-subscription","schedule recurring AI-generated PostHog reports","Create a recurring AI-generated PostHog report — schedule a free-text prompt to run on a cron, with the LLM-synthesized markdown delivered to email or Slack on each tick. Use when the user wants a recurring AI summary of X on any cadence (daily, weekly, monthly, yearly) rather than a one-off report. (To attach an AI summary to an existing insight\u002Fdashboard subscription instead of a free-text prompt, see `managing-subscriptions` and its `summary_enabled` option.)\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3183,3184,3187,3188,3191],{"name":3130,"slug":3131,"type":13},{"name":3185,"slug":3186,"type":13},"Email","email",{"name":9,"slug":8,"type":13},{"name":3189,"slug":3190,"type":13},"Reporting","reporting",{"name":3192,"slug":3193,"type":13},"Slack","slack","2026-06-09T07:32:27.935712",{"slug":3196,"name":3196,"fn":3197,"description":3198,"org":3199,"tags":3200,"stars":3055,"repoUrl":3056,"updatedAt":3204},"creating-an-endpoint","create PostHog API endpoints","Create a PostHog endpoint with the right shape on the first try — covers query kind choice, name conventions, what to expose as variables (HogQL code_name vs insight breakdown), data_freshness_seconds, and whether to materialise on day one. Use when the user says \"create an endpoint\", \"expose this query as an API\", \"turn this insight into an endpoint\", or asks for help structuring a new endpoint. Steers away from common mistakes: materialising a query with cohort breakdowns or compare mode, inline-only variables on a materialised endpoint, unbounded date ranges, ambiguous names.\n",{"slug":8,"name":9,"logoUrl":10,"githubOrg":8},[3201,3202,3203],{"name":18,"slug":19,"type":13},{"name":3159,"slug":3160,"type":13},{"name":9,"slug":8,"type":13},"2026-06-08T08:08:29.624498",231]