You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .claude-plugin/plugin.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
{
2
2
"name": "posthog",
3
3
"description": "Access PostHog analytics, feature flags, experiments, error tracking, and insights directly from your AI coding tool. Optionally capture Claude Code sessions to PostHog LLM Analytics.",
Copy file name to clipboardExpand all lines: skills/designing-email-templates/SKILL.md
+10Lines changed: 10 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,16 @@ Marketing emails must include an unsubscribe link — render it with the built-i
31
31
32
32
(`{{ unsubscribe_url_one_click }}` is also available for one-click list-unsubscribe flows.)
33
33
34
+
## Click tracking and opt-out
35
+
36
+
Every link is automatically rewritten through a click-tracking redirect. This breaks mobile universal links / app deeplinks, which only resolve when the href stays on their own domain. To keep a link untracked, mark its anchor (use an `html` block) with `clicktracking="off"` or `data-ph-no-track`:
37
+
38
+
```html
39
+
<ahref="https://app.example.com/deeplink"data-ph-no-track>Open in app</a>
40
+
```
41
+
42
+
The marker must be on the `<a>` tag itself, not a child element. Opted-out links get no click metrics.
Copy file name to clipboardExpand all lines: skills/exploring-apm-traces/SKILL.md
+7-5Lines changed: 7 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,13 +43,13 @@ posthog:apm-trace-get
43
43
}
44
44
```
45
45
46
-
The response is `{ results: [span, span, …] }` — a flat list of every span in the trace.
46
+
The response is `{ results: [span, span, …], _posthogUrl: "…" }` — a flat list of every span in the trace.
47
47
The list can be very large for fan-out request flows; when it exceeds the inline limit, Claude Code auto-persists it to a file.
48
48
49
49
From the result you get:
50
50
51
51
- Every span with `name`, `service_name`, `kind`, `status_code`, `parent_span_id`, `duration_nano`, `is_root_span`
52
-
- The `_posthogUrl` — **always include this in your response** so the user can click through to the UI
52
+
- The `_posthogUrl` — a deep link to this trace in the tracing UI; **always include this in your response** so the user can click through
53
53
54
54
### Step 2 — Parse large results with scripts
55
55
@@ -148,9 +148,11 @@ Each span carries an `attributes` map (span-level OTel attributes like `http.met
148
148
149
149
## Constructing UI links
150
150
151
-
`apm-trace-get`and `query-apm-spans` return `_posthogUrl` — **always surface this to the user** so they can verify in the PostHog UI.
151
+
`apm-trace-get`returns a `_posthogUrl` deep link that opens the trace in the tracing UI — **always surface this to the user** so they can verify in the PostHog UI.
152
152
153
-
When presenting findings, include the relevant PostHog URL.
153
+
`query-apm-spans` does not return `_posthogUrl`.
154
+
To link a trace found via the query tool, feed its `trace_id` to `apm-trace-get` and surface the `_posthogUrl` from that response.
155
+
Never hand-construct PostHog URLs.
154
156
155
157
## Finding traces
156
158
@@ -237,7 +239,7 @@ results (array of span dicts)
237
239
## Tips
238
240
239
241
- Always set `dateRange` on `query-apm-spans` — queries without a time range are slow. Default is `-1h`; widen only when needed.
240
-
- Always include the `_posthogUrl` in your response so the user can click through.
242
+
- Always include the `_posthogUrl`from `apm-trace-get`in your response so the user can click through to the trace.
241
243
- Span-level attributes **are** in the `apm-trace-get` / `query-apm-spans` payload (each span's `attributes` map). Resource attributes are not — use `apm-attributes-list` (type `resource`) and `apm-attribute-values-list` for those.
242
244
-`is_root_span` is the cheap way to find the trace entry — don't string-match `00000000…`.
243
245
- For aggregates (p95 by operation, slowest children of a span), use `apm-spans-aggregate` for a flat view or `apm-spans-tree` for parent→child edges — don't reach for SQL.
0 commit comments