Skip to content

Commit b16a55f

Browse files
committed
chore: Some more small improvements
1 parent c2ff7d5 commit b16a55f

File tree

1 file changed

+20
-6
lines changed

1 file changed

+20
-6
lines changed

contents/docs/product-analytics/dashboards.mdx

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export const dashboardfiltersDark = "https://res.cloudinary.com/dmukukwp6/video/
2727

2828
Dashboards are the easiest way to track all your most important product and performance metrics.
2929

30-
Unlike [notebooks](/docs/notebooks), which are ideal of adhoc analysis of specific issues, dashboards are designed for tracking common metrics over time.
30+
Unlike [notebooks](/docs/notebooks), which are ideal for adhoc analysis of specific issues, dashboards are designed for tracking common metrics over time.
3131

3232
You can create a new dashboard from scratch, but we also offer numerous [dashboard templates](/templates) for tracking things like [website metrics](/templates/website-dashboard), [product health metrics](/templates/health-dashboard), and [metrics for large language models](/docs/llm-analytics).
3333

@@ -187,11 +187,25 @@ resource "posthog_dashboard" "team_metrics" {
187187
### Example: Creating an insight
188188

189189
```hcl
190-
resource "posthog_insight" "weekly_signups" {
191-
name = "Weekly signups"
192-
description = "Tracks sign up volume per week"
193-
dashboards = [posthog_dashboard.team_metrics.id]
194-
tags = ["managed-by:terraform"]
190+
resource "posthog_insight" "pageview_count" {
191+
derived_name = "Pageview count"
192+
query_json = jsonencode({
193+
"kind": "InsightVizNode",
194+
"source": {
195+
"kind": "TrendsQuery",
196+
"series": [
197+
{
198+
"kind": "EventsNode",
199+
"name": "$pageview",
200+
"event": "$pageview",
201+
"math": "total"
202+
}
203+
],
204+
"trendsFilter": {},
205+
"version": 2
206+
}
207+
})
208+
tags = ["managed-by:terraform"]
195209
}
196210
```
197211

0 commit comments

Comments
 (0)