@utdk/posthog 1.0.0-20260712.5-dev.e2949a6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +373 -0
- package/README.md +172 -0
- package/docs/account_relationship_definitions.md +194 -0
- package/docs/accounts.md +380 -0
- package/docs/actions.md +274 -0
- package/docs/activity_logs.md +144 -0
- package/docs/advanced_activity_logs.md +101 -0
- package/docs/agent_platform.md +2525 -0
- package/docs/ai-observability.md +514 -0
- package/docs/alerts.md +444 -0
- package/docs/annotations.md +200 -0
- package/docs/batch_exports.md +2118 -0
- package/docs/business_knowledge.md +468 -0
- package/docs/code-invites.md +72 -0
- package/docs/cohorts.md +412 -0
- package/docs/comments.md +321 -0
- package/docs/conversations.md +695 -0
- package/docs/custom_property_definitions.md +442 -0
- package/docs/custom_property_sources.md +194 -0
- package/docs/customer_analytics.md +442 -0
- package/docs/customer_journeys.md +380 -0
- package/docs/customer_profile_configs.md +380 -0
- package/docs/dashboard_templates.md +258 -0
- package/docs/dashboards.md +1896 -0
- package/docs/data_color_themes.md +380 -0
- package/docs/data_modeling_jobs.md +264 -0
- package/docs/data_warehouse.md +928 -0
- package/docs/dataset_items.md +382 -0
- package/docs/datasets.md +382 -0
- package/docs/desktop_file_system.md +753 -0
- package/docs/desktop_file_system_shortcut.md +244 -0
- package/docs/docs.md +72 -0
- package/docs/early_access_feature.md +194 -0
- package/docs/elements.md +510 -0
- package/docs/endpoints.md +1030 -0
- package/docs/engineering_analytics.md +712 -0
- package/docs/environments.md +881 -0
- package/docs/error_tracking.md +5108 -0
- package/docs/evaluation_runs.md +78 -0
- package/docs/evaluations.md +446 -0
- package/docs/event_definitions.md +425 -0
- package/docs/event_filter.md +280 -0
- package/docs/event_schemas.md +163 -0
- package/docs/events.md +208 -0
- package/docs/experiment_holdouts.md +194 -0
- package/docs/experiment_saved_metrics.md +194 -0
- package/docs/experiments.md +1088 -0
- package/docs/exports.md +256 -0
- package/docs/external_data_schemas.md +752 -0
- package/docs/external_data_sources.md +2296 -0
- package/docs/feature_flags.md +808 -0
- package/docs/field_notes.md +206 -0
- package/docs/file_system.md +880 -0
- package/docs/file_system_shortcut.md +444 -0
- package/docs/flag_value.md +46 -0
- package/docs/groups.md +514 -0
- package/docs/groups_types.md +349 -0
- package/docs/health_issues.md +386 -0
- package/docs/heatmap_screenshots.md +72 -0
- package/docs/heatmaps.md +136 -0
- package/docs/hog_flows.md +1576 -0
- package/docs/hog_function_templates.md +101 -0
- package/docs/hog_functions.md +974 -0
- package/docs/ingestion_warnings_v2.md +40 -0
- package/docs/insight_variables.md +380 -0
- package/docs/insights.md +1722 -0
- package/docs/integrations.md +1954 -0
- package/docs/js-snippet.md +104 -0
- package/docs/live_debugger_breakpoints.md +264 -0
- package/docs/llm_analytics.md +3373 -0
- package/docs/llm_prompts.md +442 -0
- package/docs/llm_skills.md +952 -0
- package/docs/logs.md +2446 -0
- package/docs/managed_viewsets.md +140 -0
- package/docs/marketing_analytics.md +518 -0
- package/docs/max.md +772 -0
- package/docs/max_tools.md +70 -0
- package/docs/mcp_analytics.md +712 -0
- package/docs/mcp_server_installations.md +970 -0
- package/docs/mcp_servers.md +78 -0
- package/docs/mcp_tools.md +82 -0
- package/docs/messaging_templates.md +444 -0
- package/docs/metrics.md +462 -0
- package/docs/notebooks.md +838 -0
- package/docs/object_media_previews.md +228 -0
- package/docs/organizations.md +2958 -0
- package/docs/persons.md +1514 -0
- package/docs/platform_features.md +700 -0
- package/docs/plugin_configs.md +70 -0
- package/docs/product_enablement.md +39 -0
- package/docs/product_tours.md +357 -0
- package/docs/project_secret_api_keys.md +444 -0
- package/docs/property_access_controls.md +200 -0
- package/docs/property_definitions.md +244 -0
- package/docs/query.md +560 -0
- package/docs/quota_limits.md +40 -0
- package/docs/reminders.md +194 -0
- package/docs/replay.md +1020 -0
- package/docs/reverse_proxy.md +200 -0
- package/docs/sandbox-custom-images.md +209 -0
- package/docs/sandbox-environments.md +168 -0
- package/docs/saved.md +392 -0
- package/docs/saved_query_column_annotations.md +224 -0
- package/docs/scheduled_changes.md +200 -0
- package/docs/schema_property_groups.md +194 -0
- package/docs/sdk_health.md +40 -0
- package/docs/session_group_summaries.md +200 -0
- package/docs/session_recordings.md +260 -0
- package/docs/session_summaries.md +200 -0
- package/docs/sessions.md +132 -0
- package/docs/signals.md +1428 -0
- package/docs/single_session_summaries.md +72 -0
- package/docs/streamlit_apps.md +456 -0
- package/docs/subscriptions.md +634 -0
- package/docs/surveys.md +731 -0
- package/docs/taggers.md +446 -0
- package/docs/task-automations.md +200 -0
- package/docs/task-runs.md +654 -0
- package/docs/task_channels.md +136 -0
- package/docs/task_mentions.md +40 -0
- package/docs/tasks.md +776 -0
- package/docs/tracing.md +1186 -0
- package/docs/uploaded_media.md +44 -0
- package/docs/user_home_settings.md +72 -0
- package/docs/user_interview_topics.md +1288 -0
- package/docs/user_interviews.md +444 -0
- package/docs/users.md +1267 -0
- package/docs/vision.md +2022 -0
- package/docs/visual_review.md +816 -0
- package/docs/warehouse_column_annotations.md +224 -0
- package/docs/warehouse_column_statistics.md +80 -0
- package/docs/warehouse_dag.md +40 -0
- package/docs/warehouse_model_paths.md +70 -0
- package/docs/warehouse_saved_queries.md +1056 -0
- package/docs/warehouse_saved_query_folders.md +318 -0
- package/docs/warehouse_tables.md +584 -0
- package/docs/warehouse_view_link.md +456 -0
- package/docs/warehouse_view_links.md +456 -0
- package/docs/web_analytics.md +136 -0
- package/docs/web_analytics_achievements.md +200 -0
- package/docs/web_experiments.md +194 -0
- package/docs/web_vitals.md +74 -0
- package/docs/wizard.md +170 -0
- package/index.ts +22 -0
- package/metadata.ts +41419 -0
- package/openapi.json +297382 -0
- package/overlay.yaml +23 -0
- package/package.json +34 -0
- package/provenance.json +24 -0
- package/research.json +80 -0
- package/types/index.ts +17547 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# Managed Viewsets
|
|
2
|
+
|
|
3
|
+
## Operations
|
|
4
|
+
|
|
5
|
+
### `posthog.environmentsManagedViewsetsRetrieve`
|
|
6
|
+
|
|
7
|
+
- **HTTP**: `GET /api/environments/{environment_id}/managed_viewsets/{kind}/`
|
|
8
|
+
- **What it does**: Get all views associated with a specific managed viewset.
|
|
9
|
+
GET /api/environments/{team_id}/managed_viewsets/{kind}/
|
|
10
|
+
- **OpenAPI operationId**: `environments_managed_viewsets_retrieve`
|
|
11
|
+
- **Path params**: `kind`
|
|
12
|
+
- **Query params**: None
|
|
13
|
+
- **Response codes**: `200`
|
|
14
|
+
- **Transport options**: None
|
|
15
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
16
|
+
|
|
17
|
+
**Inputs**
|
|
18
|
+
|
|
19
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
20
|
+
- Client transport options: None
|
|
21
|
+
|
|
22
|
+
**Outputs**
|
|
23
|
+
|
|
24
|
+
- Client return type: `unknown`
|
|
25
|
+
- OpenAPI response codes: `200`
|
|
26
|
+
|
|
27
|
+
```ts
|
|
28
|
+
import posthog from "@utdk/posthog";
|
|
29
|
+
|
|
30
|
+
type EnvironmentsManagedViewsetsRetrieveInput = Parameters<typeof posthog.environmentsManagedViewsetsRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
31
|
+
type EnvironmentsManagedViewsetsRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsManagedViewsetsRetrieve>>;
|
|
32
|
+
|
|
33
|
+
const result: EnvironmentsManagedViewsetsRetrieveOutput = await posthog.environmentsManagedViewsetsRetrieve();
|
|
34
|
+
|
|
35
|
+
// Result shape (from schema): unknown
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### `posthog.environmentsManagedViewsetsUpdate`
|
|
39
|
+
|
|
40
|
+
- **HTTP**: `PUT /api/environments/{environment_id}/managed_viewsets/{kind}/`
|
|
41
|
+
- **What it does**: Enable or disable a managed viewset by kind.
|
|
42
|
+
PUT /api/environments/{team_id}/managed_viewsets/{kind}/ with body {"enabled": true/false}
|
|
43
|
+
- **OpenAPI operationId**: `environments_managed_viewsets_update`
|
|
44
|
+
- **Path params**: `kind`
|
|
45
|
+
- **Query params**: None
|
|
46
|
+
- **Response codes**: `200`
|
|
47
|
+
- **Transport options**: None
|
|
48
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
49
|
+
|
|
50
|
+
**Inputs**
|
|
51
|
+
|
|
52
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
53
|
+
- Client transport options: None
|
|
54
|
+
|
|
55
|
+
**Outputs**
|
|
56
|
+
|
|
57
|
+
- Client return type: `unknown`
|
|
58
|
+
- OpenAPI response codes: `200`
|
|
59
|
+
|
|
60
|
+
```ts
|
|
61
|
+
import posthog from "@utdk/posthog";
|
|
62
|
+
|
|
63
|
+
type EnvironmentsManagedViewsetsUpdateInput = Parameters<typeof posthog.environmentsManagedViewsetsUpdate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
64
|
+
type EnvironmentsManagedViewsetsUpdateOutput = Awaited<ReturnType<typeof posthog.environmentsManagedViewsetsUpdate>>;
|
|
65
|
+
|
|
66
|
+
const result: EnvironmentsManagedViewsetsUpdateOutput = await posthog.environmentsManagedViewsetsUpdate();
|
|
67
|
+
|
|
68
|
+
// Result shape (from schema): unknown
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
### `posthog.managedViewsetsRetrieve`
|
|
72
|
+
|
|
73
|
+
- **HTTP**: `GET /api/projects/{project_id}/managed_viewsets/{kind}/`
|
|
74
|
+
- **What it does**: Get all views associated with a specific managed viewset.
|
|
75
|
+
GET /api/environments/{team_id}/managed_viewsets/{kind}/
|
|
76
|
+
- **OpenAPI operationId**: `managed_viewsets_retrieve`
|
|
77
|
+
- **Path params**: `kind`
|
|
78
|
+
- **Query params**: None
|
|
79
|
+
- **Response codes**: `200`
|
|
80
|
+
- **Transport options**: None
|
|
81
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
82
|
+
|
|
83
|
+
**Inputs**
|
|
84
|
+
|
|
85
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
86
|
+
- Client transport options: None
|
|
87
|
+
|
|
88
|
+
**Outputs**
|
|
89
|
+
|
|
90
|
+
- Client return type: `unknown`
|
|
91
|
+
- OpenAPI response codes: `200`
|
|
92
|
+
|
|
93
|
+
```ts
|
|
94
|
+
import posthog from "@utdk/posthog";
|
|
95
|
+
|
|
96
|
+
type ManagedViewsetsRetrieveInput = Parameters<typeof posthog.managedViewsetsRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
97
|
+
type ManagedViewsetsRetrieveOutput = Awaited<ReturnType<typeof posthog.managedViewsetsRetrieve>>;
|
|
98
|
+
|
|
99
|
+
const result: ManagedViewsetsRetrieveOutput = await posthog.managedViewsetsRetrieve();
|
|
100
|
+
|
|
101
|
+
// Result shape (from schema): unknown
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
### `posthog.managedViewsetsUpdate`
|
|
105
|
+
|
|
106
|
+
- **HTTP**: `PUT /api/projects/{project_id}/managed_viewsets/{kind}/`
|
|
107
|
+
- **What it does**: Enable or disable a managed viewset by kind.
|
|
108
|
+
PUT /api/environments/{team_id}/managed_viewsets/{kind}/ with body {"enabled": true/false}
|
|
109
|
+
- **OpenAPI operationId**: `managed_viewsets_update`
|
|
110
|
+
- **Path params**: `kind`
|
|
111
|
+
- **Query params**: None
|
|
112
|
+
- **Response codes**: `200`
|
|
113
|
+
- **Transport options**: None
|
|
114
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
115
|
+
|
|
116
|
+
**Inputs**
|
|
117
|
+
|
|
118
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
119
|
+
- Client transport options: None
|
|
120
|
+
|
|
121
|
+
**Outputs**
|
|
122
|
+
|
|
123
|
+
- Client return type: `unknown`
|
|
124
|
+
- OpenAPI response codes: `200`
|
|
125
|
+
|
|
126
|
+
```ts
|
|
127
|
+
import posthog from "@utdk/posthog";
|
|
128
|
+
|
|
129
|
+
type ManagedViewsetsUpdateInput = Parameters<typeof posthog.managedViewsetsUpdate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
130
|
+
type ManagedViewsetsUpdateOutput = Awaited<ReturnType<typeof posthog.managedViewsetsUpdate>>;
|
|
131
|
+
|
|
132
|
+
const result: ManagedViewsetsUpdateOutput = await posthog.managedViewsetsUpdate();
|
|
133
|
+
|
|
134
|
+
// Result shape (from schema): unknown
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
<!-- prompt-hash:
|
|
139
|
+
8c3694991a4c289225f05a4e8f1e098cc74d085a088d7dffd82f00d93797b7f8
|
|
140
|
+
-->
|
|
@@ -0,0 +1,518 @@
|
|
|
1
|
+
# Marketing Analytics
|
|
2
|
+
|
|
3
|
+
## Operations
|
|
4
|
+
|
|
5
|
+
### `posthog.environmentsMarketingAnalyticsConversionGoalsRetrieve`
|
|
6
|
+
|
|
7
|
+
- **HTTP**: `GET /api/environments/{environment_id}/marketing_analytics/conversion_goals/`
|
|
8
|
+
- **What it does**: List conversion goals
|
|
9
|
+
- **OpenAPI operationId**: `environments_marketing_analytics_conversion_goals_retrieve`
|
|
10
|
+
- **Path params**: None
|
|
11
|
+
- **Query params**: None
|
|
12
|
+
- **Response codes**: `200`
|
|
13
|
+
- **Transport options**: None
|
|
14
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
15
|
+
|
|
16
|
+
**Inputs**
|
|
17
|
+
|
|
18
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
19
|
+
- Client transport options: None
|
|
20
|
+
|
|
21
|
+
**Outputs**
|
|
22
|
+
|
|
23
|
+
- Client return type: `{ goals: ({ id: string; name: string; kind: string; target_label: string; last_30d_count: number; integrated_count: number | null; events_without_utm_source: number | null; events_with_unmatched_utm_source: number | nul...`
|
|
24
|
+
- OpenAPI response codes: `200`
|
|
25
|
+
|
|
26
|
+
```ts
|
|
27
|
+
import posthog from "@utdk/posthog";
|
|
28
|
+
|
|
29
|
+
type EnvironmentsMarketingAnalyticsConversionGoalsRetrieveInput = Parameters<typeof posthog.environmentsMarketingAnalyticsConversionGoalsRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
30
|
+
type EnvironmentsMarketingAnalyticsConversionGoalsRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsMarketingAnalyticsConversionGoalsRetrieve>>;
|
|
31
|
+
|
|
32
|
+
const result: EnvironmentsMarketingAnalyticsConversionGoalsRetrieveOutput = await posthog.environmentsMarketingAnalyticsConversionGoalsRetrieve();
|
|
33
|
+
|
|
34
|
+
// Result shape (from schema): { goals: ({ id: string; name: string; kind: string; target_label: string; last_30d_count: number; integrated_count: number | null; events_without_utm_source: number | null; events_with_unmatched_utm_source: number | nul...
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### `posthog.environmentsMarketingAnalyticsDataSourcesRetrieve`
|
|
38
|
+
|
|
39
|
+
- **HTTP**: `GET /api/environments/{environment_id}/marketing_analytics/data_sources/`
|
|
40
|
+
- **What it does**: List marketing data sources
|
|
41
|
+
- **OpenAPI operationId**: `environments_marketing_analytics_data_sources_retrieve`
|
|
42
|
+
- **Path params**: None
|
|
43
|
+
- **Query params**: `source_type`
|
|
44
|
+
- **Response codes**: `200`
|
|
45
|
+
- **Transport options**: None
|
|
46
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
47
|
+
|
|
48
|
+
**Inputs**
|
|
49
|
+
|
|
50
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
51
|
+
- Client transport options: None
|
|
52
|
+
|
|
53
|
+
**Outputs**
|
|
54
|
+
|
|
55
|
+
- Client return type: `{ integrations: ({ source_type: string; is_native: boolean; display_name: string; connected: boolean; last_sync_at: string | null; last_sync_status: string; last_error: string | null; rows_last_24h: number; rows_last_7d...`
|
|
56
|
+
- OpenAPI response codes: `200`
|
|
57
|
+
|
|
58
|
+
```ts
|
|
59
|
+
import posthog from "@utdk/posthog";
|
|
60
|
+
|
|
61
|
+
type EnvironmentsMarketingAnalyticsDataSourcesRetrieveInput = Parameters<typeof posthog.environmentsMarketingAnalyticsDataSourcesRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
62
|
+
type EnvironmentsMarketingAnalyticsDataSourcesRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsMarketingAnalyticsDataSourcesRetrieve>>;
|
|
63
|
+
|
|
64
|
+
const result: EnvironmentsMarketingAnalyticsDataSourcesRetrieveOutput = await posthog.environmentsMarketingAnalyticsDataSourcesRetrieve();
|
|
65
|
+
|
|
66
|
+
// Result shape (from schema): { integrations: ({ source_type: string; is_native: boolean; display_name: string; connected: boolean; last_sync_at: string | null; last_sync_status: string; last_error: string | null; rows_last_24h: number; rows_last_7d...
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
### `posthog.environmentsMarketingAnalyticsDiagnoseRetrieve`
|
|
70
|
+
|
|
71
|
+
- **HTTP**: `GET /api/environments/{environment_id}/marketing_analytics/diagnose/`
|
|
72
|
+
- **What it does**: Diagnose marketing analytics
|
|
73
|
+
- **OpenAPI operationId**: `environments_marketing_analytics_diagnose_retrieve`
|
|
74
|
+
- **Path params**: None
|
|
75
|
+
- **Query params**: `attribution_lookback_days`, `include_conversion_goals`, `source_type`
|
|
76
|
+
- **Response codes**: `200`
|
|
77
|
+
- **Transport options**: None
|
|
78
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
79
|
+
|
|
80
|
+
**Inputs**
|
|
81
|
+
|
|
82
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
83
|
+
- Client transport options: None
|
|
84
|
+
|
|
85
|
+
**Outputs**
|
|
86
|
+
|
|
87
|
+
- Client return type: `{ integrations: ({ integration_key: string; source_type: string; display_name: string; overall_status: string; diagnosis: string; data_source?: { source_type: string; is_native: boolean; display_name: string; connected:...`
|
|
88
|
+
- OpenAPI response codes: `200`
|
|
89
|
+
|
|
90
|
+
```ts
|
|
91
|
+
import posthog from "@utdk/posthog";
|
|
92
|
+
|
|
93
|
+
type EnvironmentsMarketingAnalyticsDiagnoseRetrieveInput = Parameters<typeof posthog.environmentsMarketingAnalyticsDiagnoseRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
94
|
+
type EnvironmentsMarketingAnalyticsDiagnoseRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsMarketingAnalyticsDiagnoseRetrieve>>;
|
|
95
|
+
|
|
96
|
+
const result: EnvironmentsMarketingAnalyticsDiagnoseRetrieveOutput = await posthog.environmentsMarketingAnalyticsDiagnoseRetrieve();
|
|
97
|
+
|
|
98
|
+
// Result shape (from schema): { integrations: ({ integration_key: string; source_type: string; display_name: string; overall_status: string; diagnosis: string; data_source?: { source_type: string; is_native: boolean; display_name: string; connected:...
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
### `posthog.environmentsMarketingAnalyticsExplainConversionGoalRetrieve`
|
|
102
|
+
|
|
103
|
+
- **HTTP**: `GET /api/environments/{environment_id}/marketing_analytics/explain_conversion_goal/`
|
|
104
|
+
- **What it does**: Explain a conversion goal
|
|
105
|
+
- **OpenAPI operationId**: `environments_marketing_analytics_explain_conversion_goal_retrieve`
|
|
106
|
+
- **Path params**: None
|
|
107
|
+
- **Query params**: `date_from`, `date_to`, `goal_id`
|
|
108
|
+
- **Response codes**: `200`
|
|
109
|
+
- **Transport options**: None
|
|
110
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
111
|
+
|
|
112
|
+
**Inputs**
|
|
113
|
+
|
|
114
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
115
|
+
- Client transport options: None
|
|
116
|
+
|
|
117
|
+
**Outputs**
|
|
118
|
+
|
|
119
|
+
- Client return type: `{ goal_id: string; goal_name: string; kind: string; period: { date_from: string | null; date_to: string | null }; total_count: number; integrated_count: number | null; events_without_utm_source: number | null; events_wi...`
|
|
120
|
+
- OpenAPI response codes: `200`
|
|
121
|
+
|
|
122
|
+
```ts
|
|
123
|
+
import posthog from "@utdk/posthog";
|
|
124
|
+
|
|
125
|
+
type EnvironmentsMarketingAnalyticsExplainConversionGoalRetrieveInput = Parameters<typeof posthog.environmentsMarketingAnalyticsExplainConversionGoalRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
126
|
+
type EnvironmentsMarketingAnalyticsExplainConversionGoalRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsMarketingAnalyticsExplainConversionGoalRetrieve>>;
|
|
127
|
+
|
|
128
|
+
const result: EnvironmentsMarketingAnalyticsExplainConversionGoalRetrieveOutput = await posthog.environmentsMarketingAnalyticsExplainConversionGoalRetrieve();
|
|
129
|
+
|
|
130
|
+
// Result shape (from schema): { goal_id: string; goal_name: string; kind: string; period: { date_from: string | null; date_to: string | null }; total_count: number; integrated_count: number | null; events_without_utm_source: number | null; events_wi...
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### `posthog.environmentsMarketingAnalyticsSuggestConversionGoalsRetrieve`
|
|
134
|
+
|
|
135
|
+
- **HTTP**: `GET /api/environments/{environment_id}/marketing_analytics/suggest_conversion_goals/`
|
|
136
|
+
- **What it does**: Suggest conversion goals
|
|
137
|
+
- **OpenAPI operationId**: `environments_marketing_analytics_suggest_conversion_goals_retrieve`
|
|
138
|
+
- **Path params**: None
|
|
139
|
+
- **Query params**: `min_count`, `top_n`
|
|
140
|
+
- **Response codes**: `200`
|
|
141
|
+
- **Transport options**: None
|
|
142
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
143
|
+
|
|
144
|
+
**Inputs**
|
|
145
|
+
|
|
146
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
147
|
+
- Client transport options: None
|
|
148
|
+
|
|
149
|
+
**Outputs**
|
|
150
|
+
|
|
151
|
+
- Client return type: `{ candidates: ({ event_name: string; last_30d_count: number; distinct_users_30d: number; pct_with_utm_source: number; pct_with_utm_campaign: number; top_utm_sources: (unknown[])[]; is_already_a_goal: boolean; suggestion...`
|
|
152
|
+
- OpenAPI response codes: `200`
|
|
153
|
+
|
|
154
|
+
```ts
|
|
155
|
+
import posthog from "@utdk/posthog";
|
|
156
|
+
|
|
157
|
+
type EnvironmentsMarketingAnalyticsSuggestConversionGoalsRetrieveInput = Parameters<typeof posthog.environmentsMarketingAnalyticsSuggestConversionGoalsRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
158
|
+
type EnvironmentsMarketingAnalyticsSuggestConversionGoalsRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsMarketingAnalyticsSuggestConversionGoalsRetrieve>>;
|
|
159
|
+
|
|
160
|
+
const result: EnvironmentsMarketingAnalyticsSuggestConversionGoalsRetrieveOutput = await posthog.environmentsMarketingAnalyticsSuggestConversionGoalsRetrieve();
|
|
161
|
+
|
|
162
|
+
// Result shape (from schema): { candidates: ({ event_name: string; last_30d_count: number; distinct_users_30d: number; pct_with_utm_source: number; pct_with_utm_campaign: number; top_utm_sources: (unknown[])[]; is_already_a_goal: boolean; suggestion...
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### `posthog.environmentsMarketingAnalyticsSuggestUtmMappingsRetrieve`
|
|
166
|
+
|
|
167
|
+
- **HTTP**: `GET /api/environments/{environment_id}/marketing_analytics/suggest_utm_mappings/`
|
|
168
|
+
- **What it does**: Suggest UTM source mappings
|
|
169
|
+
- **OpenAPI operationId**: `environments_marketing_analytics_suggest_utm_mappings_retrieve`
|
|
170
|
+
- **Path params**: None
|
|
171
|
+
- **Query params**: `lookback_days`, `min_event_count`
|
|
172
|
+
- **Response codes**: `200`
|
|
173
|
+
- **Transport options**: None
|
|
174
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
175
|
+
|
|
176
|
+
**Inputs**
|
|
177
|
+
|
|
178
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
179
|
+
- Client transport options: None
|
|
180
|
+
|
|
181
|
+
**Outputs**
|
|
182
|
+
|
|
183
|
+
- Client return type: `{ source_suggestions: ({ raw_utm_source: string; suggested_target: string; suggested_target_display_name: string; reason: string })[]; campaign_suggestions: ({ integration: string; integration_display_name: string; sugg...`
|
|
184
|
+
- OpenAPI response codes: `200`
|
|
185
|
+
|
|
186
|
+
```ts
|
|
187
|
+
import posthog from "@utdk/posthog";
|
|
188
|
+
|
|
189
|
+
type EnvironmentsMarketingAnalyticsSuggestUtmMappingsRetrieveInput = Parameters<typeof posthog.environmentsMarketingAnalyticsSuggestUtmMappingsRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
190
|
+
type EnvironmentsMarketingAnalyticsSuggestUtmMappingsRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsMarketingAnalyticsSuggestUtmMappingsRetrieve>>;
|
|
191
|
+
|
|
192
|
+
const result: EnvironmentsMarketingAnalyticsSuggestUtmMappingsRetrieveOutput = await posthog.environmentsMarketingAnalyticsSuggestUtmMappingsRetrieve();
|
|
193
|
+
|
|
194
|
+
// Result shape (from schema): { source_suggestions: ({ raw_utm_source: string; suggested_target: string; suggested_target_display_name: string; reason: string })[]; campaign_suggestions: ({ integration: string; integration_display_name: string; sugg...
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
### `posthog.environmentsMarketingAnalyticsTestMappingCreate`
|
|
198
|
+
|
|
199
|
+
- **HTTP**: `POST /api/environments/{environment_id}/marketing_analytics/test_mapping/`
|
|
200
|
+
- **OpenAPI operationId**: `environments_marketing_analytics_test_mapping_create`
|
|
201
|
+
- **Path params**: None
|
|
202
|
+
- **Query params**: None
|
|
203
|
+
- **Response codes**: `200`
|
|
204
|
+
- **Transport options**: None
|
|
205
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
206
|
+
|
|
207
|
+
**Inputs**
|
|
208
|
+
|
|
209
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
210
|
+
- Client transport options: None
|
|
211
|
+
|
|
212
|
+
**Outputs**
|
|
213
|
+
|
|
214
|
+
- Client return type: `unknown`
|
|
215
|
+
- OpenAPI response codes: `200`
|
|
216
|
+
|
|
217
|
+
```ts
|
|
218
|
+
import posthog from "@utdk/posthog";
|
|
219
|
+
|
|
220
|
+
type EnvironmentsMarketingAnalyticsTestMappingCreateInput = Parameters<typeof posthog.environmentsMarketingAnalyticsTestMappingCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
221
|
+
type EnvironmentsMarketingAnalyticsTestMappingCreateOutput = Awaited<ReturnType<typeof posthog.environmentsMarketingAnalyticsTestMappingCreate>>;
|
|
222
|
+
|
|
223
|
+
const result: EnvironmentsMarketingAnalyticsTestMappingCreateOutput = await posthog.environmentsMarketingAnalyticsTestMappingCreate();
|
|
224
|
+
|
|
225
|
+
// Result shape (from schema): unknown
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### `posthog.environmentsMarketingAnalyticsUtmAuditRetrieve`
|
|
229
|
+
|
|
230
|
+
- **HTTP**: `GET /api/environments/{environment_id}/marketing_analytics/utm_audit/`
|
|
231
|
+
- **What it does**: Run UTM audit
|
|
232
|
+
- **OpenAPI operationId**: `environments_marketing_analytics_utm_audit_retrieve`
|
|
233
|
+
- **Path params**: None
|
|
234
|
+
- **Query params**: `date_from`, `date_to`
|
|
235
|
+
- **Response codes**: `200`
|
|
236
|
+
- **Transport options**: None
|
|
237
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
238
|
+
|
|
239
|
+
**Inputs**
|
|
240
|
+
|
|
241
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
242
|
+
- Client transport options: None
|
|
243
|
+
|
|
244
|
+
**Outputs**
|
|
245
|
+
|
|
246
|
+
- Client return type: `{ total_campaigns: number; campaigns_with_issues: number; campaigns_without_issues: number; total_spend_at_risk: number; results: ({ campaign_name: string; campaign_id: string; source_name: string; spend: number; clicks...`
|
|
247
|
+
- OpenAPI response codes: `200`
|
|
248
|
+
|
|
249
|
+
```ts
|
|
250
|
+
import posthog from "@utdk/posthog";
|
|
251
|
+
|
|
252
|
+
type EnvironmentsMarketingAnalyticsUtmAuditRetrieveInput = Parameters<typeof posthog.environmentsMarketingAnalyticsUtmAuditRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
253
|
+
type EnvironmentsMarketingAnalyticsUtmAuditRetrieveOutput = Awaited<ReturnType<typeof posthog.environmentsMarketingAnalyticsUtmAuditRetrieve>>;
|
|
254
|
+
|
|
255
|
+
const result: EnvironmentsMarketingAnalyticsUtmAuditRetrieveOutput = await posthog.environmentsMarketingAnalyticsUtmAuditRetrieve();
|
|
256
|
+
|
|
257
|
+
// Result shape (from schema): { total_campaigns: number; campaigns_with_issues: number; campaigns_without_issues: number; total_spend_at_risk: number; results: ({ campaign_name: string; campaign_id: string; source_name: string; spend: number; clicks...
|
|
258
|
+
```
|
|
259
|
+
|
|
260
|
+
### `posthog.marketingAnalyticsConversionGoalsRetrieve`
|
|
261
|
+
|
|
262
|
+
- **HTTP**: `GET /api/projects/{project_id}/marketing_analytics/conversion_goals/`
|
|
263
|
+
- **What it does**: List conversion goals
|
|
264
|
+
- **OpenAPI operationId**: `marketing_analytics_conversion_goals_retrieve`
|
|
265
|
+
- **Path params**: None
|
|
266
|
+
- **Query params**: None
|
|
267
|
+
- **Response codes**: `200`
|
|
268
|
+
- **Transport options**: None
|
|
269
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
270
|
+
|
|
271
|
+
**Inputs**
|
|
272
|
+
|
|
273
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
274
|
+
- Client transport options: None
|
|
275
|
+
|
|
276
|
+
**Outputs**
|
|
277
|
+
|
|
278
|
+
- Client return type: `{ goals: ({ id: string; name: string; kind: string; target_label: string; last_30d_count: number; integrated_count: number | null; events_without_utm_source: number | null; events_with_unmatched_utm_source: number | nul...`
|
|
279
|
+
- OpenAPI response codes: `200`
|
|
280
|
+
|
|
281
|
+
```ts
|
|
282
|
+
import posthog from "@utdk/posthog";
|
|
283
|
+
|
|
284
|
+
type MarketingAnalyticsConversionGoalsRetrieveInput = Parameters<typeof posthog.marketingAnalyticsConversionGoalsRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
285
|
+
type MarketingAnalyticsConversionGoalsRetrieveOutput = Awaited<ReturnType<typeof posthog.marketingAnalyticsConversionGoalsRetrieve>>;
|
|
286
|
+
|
|
287
|
+
const result: MarketingAnalyticsConversionGoalsRetrieveOutput = await posthog.marketingAnalyticsConversionGoalsRetrieve();
|
|
288
|
+
|
|
289
|
+
// Result shape (from schema): { goals: ({ id: string; name: string; kind: string; target_label: string; last_30d_count: number; integrated_count: number | null; events_without_utm_source: number | null; events_with_unmatched_utm_source: number | nul...
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
### `posthog.marketingAnalyticsDataSourcesRetrieve`
|
|
293
|
+
|
|
294
|
+
- **HTTP**: `GET /api/projects/{project_id}/marketing_analytics/data_sources/`
|
|
295
|
+
- **What it does**: List marketing data sources
|
|
296
|
+
- **OpenAPI operationId**: `marketing_analytics_data_sources_retrieve`
|
|
297
|
+
- **Path params**: None
|
|
298
|
+
- **Query params**: `source_type`
|
|
299
|
+
- **Response codes**: `200`
|
|
300
|
+
- **Transport options**: None
|
|
301
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
302
|
+
|
|
303
|
+
**Inputs**
|
|
304
|
+
|
|
305
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
306
|
+
- Client transport options: None
|
|
307
|
+
|
|
308
|
+
**Outputs**
|
|
309
|
+
|
|
310
|
+
- Client return type: `{ integrations: ({ source_type: string; is_native: boolean; display_name: string; connected: boolean; last_sync_at: string | null; last_sync_status: string; last_error: string | null; rows_last_24h: number; rows_last_7d...`
|
|
311
|
+
- OpenAPI response codes: `200`
|
|
312
|
+
|
|
313
|
+
```ts
|
|
314
|
+
import posthog from "@utdk/posthog";
|
|
315
|
+
|
|
316
|
+
type MarketingAnalyticsDataSourcesRetrieveInput = Parameters<typeof posthog.marketingAnalyticsDataSourcesRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
317
|
+
type MarketingAnalyticsDataSourcesRetrieveOutput = Awaited<ReturnType<typeof posthog.marketingAnalyticsDataSourcesRetrieve>>;
|
|
318
|
+
|
|
319
|
+
const result: MarketingAnalyticsDataSourcesRetrieveOutput = await posthog.marketingAnalyticsDataSourcesRetrieve();
|
|
320
|
+
|
|
321
|
+
// Result shape (from schema): { integrations: ({ source_type: string; is_native: boolean; display_name: string; connected: boolean; last_sync_at: string | null; last_sync_status: string; last_error: string | null; rows_last_24h: number; rows_last_7d...
|
|
322
|
+
```
|
|
323
|
+
|
|
324
|
+
### `posthog.marketingAnalyticsDiagnoseRetrieve`
|
|
325
|
+
|
|
326
|
+
- **HTTP**: `GET /api/projects/{project_id}/marketing_analytics/diagnose/`
|
|
327
|
+
- **What it does**: Diagnose marketing analytics
|
|
328
|
+
- **OpenAPI operationId**: `marketing_analytics_diagnose_retrieve`
|
|
329
|
+
- **Path params**: None
|
|
330
|
+
- **Query params**: `attribution_lookback_days`, `include_conversion_goals`, `source_type`
|
|
331
|
+
- **Response codes**: `200`
|
|
332
|
+
- **Transport options**: None
|
|
333
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
334
|
+
|
|
335
|
+
**Inputs**
|
|
336
|
+
|
|
337
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
338
|
+
- Client transport options: None
|
|
339
|
+
|
|
340
|
+
**Outputs**
|
|
341
|
+
|
|
342
|
+
- Client return type: `{ integrations: ({ integration_key: string; source_type: string; display_name: string; overall_status: string; diagnosis: string; data_source?: { source_type: string; is_native: boolean; display_name: string; connected:...`
|
|
343
|
+
- OpenAPI response codes: `200`
|
|
344
|
+
|
|
345
|
+
```ts
|
|
346
|
+
import posthog from "@utdk/posthog";
|
|
347
|
+
|
|
348
|
+
type MarketingAnalyticsDiagnoseRetrieveInput = Parameters<typeof posthog.marketingAnalyticsDiagnoseRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
349
|
+
type MarketingAnalyticsDiagnoseRetrieveOutput = Awaited<ReturnType<typeof posthog.marketingAnalyticsDiagnoseRetrieve>>;
|
|
350
|
+
|
|
351
|
+
const result: MarketingAnalyticsDiagnoseRetrieveOutput = await posthog.marketingAnalyticsDiagnoseRetrieve();
|
|
352
|
+
|
|
353
|
+
// Result shape (from schema): { integrations: ({ integration_key: string; source_type: string; display_name: string; overall_status: string; diagnosis: string; data_source?: { source_type: string; is_native: boolean; display_name: string; connected:...
|
|
354
|
+
```
|
|
355
|
+
|
|
356
|
+
### `posthog.marketingAnalyticsExplainConversionGoalRetrieve`
|
|
357
|
+
|
|
358
|
+
- **HTTP**: `GET /api/projects/{project_id}/marketing_analytics/explain_conversion_goal/`
|
|
359
|
+
- **What it does**: Explain a conversion goal
|
|
360
|
+
- **OpenAPI operationId**: `marketing_analytics_explain_conversion_goal_retrieve`
|
|
361
|
+
- **Path params**: None
|
|
362
|
+
- **Query params**: `date_from`, `date_to`, `goal_id`
|
|
363
|
+
- **Response codes**: `200`
|
|
364
|
+
- **Transport options**: None
|
|
365
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
366
|
+
|
|
367
|
+
**Inputs**
|
|
368
|
+
|
|
369
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
370
|
+
- Client transport options: None
|
|
371
|
+
|
|
372
|
+
**Outputs**
|
|
373
|
+
|
|
374
|
+
- Client return type: `{ goal_id: string; goal_name: string; kind: string; period: { date_from: string | null; date_to: string | null }; total_count: number; integrated_count: number | null; events_without_utm_source: number | null; events_wi...`
|
|
375
|
+
- OpenAPI response codes: `200`
|
|
376
|
+
|
|
377
|
+
```ts
|
|
378
|
+
import posthog from "@utdk/posthog";
|
|
379
|
+
|
|
380
|
+
type MarketingAnalyticsExplainConversionGoalRetrieveInput = Parameters<typeof posthog.marketingAnalyticsExplainConversionGoalRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
381
|
+
type MarketingAnalyticsExplainConversionGoalRetrieveOutput = Awaited<ReturnType<typeof posthog.marketingAnalyticsExplainConversionGoalRetrieve>>;
|
|
382
|
+
|
|
383
|
+
const result: MarketingAnalyticsExplainConversionGoalRetrieveOutput = await posthog.marketingAnalyticsExplainConversionGoalRetrieve();
|
|
384
|
+
|
|
385
|
+
// Result shape (from schema): { goal_id: string; goal_name: string; kind: string; period: { date_from: string | null; date_to: string | null }; total_count: number; integrated_count: number | null; events_without_utm_source: number | null; events_wi...
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
### `posthog.marketingAnalyticsSuggestConversionGoalsRetrieve`
|
|
389
|
+
|
|
390
|
+
- **HTTP**: `GET /api/projects/{project_id}/marketing_analytics/suggest_conversion_goals/`
|
|
391
|
+
- **What it does**: Suggest conversion goals
|
|
392
|
+
- **OpenAPI operationId**: `marketing_analytics_suggest_conversion_goals_retrieve`
|
|
393
|
+
- **Path params**: None
|
|
394
|
+
- **Query params**: `min_count`, `top_n`
|
|
395
|
+
- **Response codes**: `200`
|
|
396
|
+
- **Transport options**: None
|
|
397
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
398
|
+
|
|
399
|
+
**Inputs**
|
|
400
|
+
|
|
401
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
402
|
+
- Client transport options: None
|
|
403
|
+
|
|
404
|
+
**Outputs**
|
|
405
|
+
|
|
406
|
+
- Client return type: `{ candidates: ({ event_name: string; last_30d_count: number; distinct_users_30d: number; pct_with_utm_source: number; pct_with_utm_campaign: number; top_utm_sources: (unknown[])[]; is_already_a_goal: boolean; suggestion...`
|
|
407
|
+
- OpenAPI response codes: `200`
|
|
408
|
+
|
|
409
|
+
```ts
|
|
410
|
+
import posthog from "@utdk/posthog";
|
|
411
|
+
|
|
412
|
+
type MarketingAnalyticsSuggestConversionGoalsRetrieveInput = Parameters<typeof posthog.marketingAnalyticsSuggestConversionGoalsRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
413
|
+
type MarketingAnalyticsSuggestConversionGoalsRetrieveOutput = Awaited<ReturnType<typeof posthog.marketingAnalyticsSuggestConversionGoalsRetrieve>>;
|
|
414
|
+
|
|
415
|
+
const result: MarketingAnalyticsSuggestConversionGoalsRetrieveOutput = await posthog.marketingAnalyticsSuggestConversionGoalsRetrieve();
|
|
416
|
+
|
|
417
|
+
// Result shape (from schema): { candidates: ({ event_name: string; last_30d_count: number; distinct_users_30d: number; pct_with_utm_source: number; pct_with_utm_campaign: number; top_utm_sources: (unknown[])[]; is_already_a_goal: boolean; suggestion...
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
### `posthog.marketingAnalyticsSuggestUtmMappingsRetrieve`
|
|
421
|
+
|
|
422
|
+
- **HTTP**: `GET /api/projects/{project_id}/marketing_analytics/suggest_utm_mappings/`
|
|
423
|
+
- **What it does**: Suggest UTM source mappings
|
|
424
|
+
- **OpenAPI operationId**: `marketing_analytics_suggest_utm_mappings_retrieve`
|
|
425
|
+
- **Path params**: None
|
|
426
|
+
- **Query params**: `lookback_days`, `min_event_count`
|
|
427
|
+
- **Response codes**: `200`
|
|
428
|
+
- **Transport options**: None
|
|
429
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
430
|
+
|
|
431
|
+
**Inputs**
|
|
432
|
+
|
|
433
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
434
|
+
- Client transport options: None
|
|
435
|
+
|
|
436
|
+
**Outputs**
|
|
437
|
+
|
|
438
|
+
- Client return type: `{ source_suggestions: ({ raw_utm_source: string; suggested_target: string; suggested_target_display_name: string; reason: string })[]; campaign_suggestions: ({ integration: string; integration_display_name: string; sugg...`
|
|
439
|
+
- OpenAPI response codes: `200`
|
|
440
|
+
|
|
441
|
+
```ts
|
|
442
|
+
import posthog from "@utdk/posthog";
|
|
443
|
+
|
|
444
|
+
type MarketingAnalyticsSuggestUtmMappingsRetrieveInput = Parameters<typeof posthog.marketingAnalyticsSuggestUtmMappingsRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
445
|
+
type MarketingAnalyticsSuggestUtmMappingsRetrieveOutput = Awaited<ReturnType<typeof posthog.marketingAnalyticsSuggestUtmMappingsRetrieve>>;
|
|
446
|
+
|
|
447
|
+
const result: MarketingAnalyticsSuggestUtmMappingsRetrieveOutput = await posthog.marketingAnalyticsSuggestUtmMappingsRetrieve();
|
|
448
|
+
|
|
449
|
+
// Result shape (from schema): { source_suggestions: ({ raw_utm_source: string; suggested_target: string; suggested_target_display_name: string; reason: string })[]; campaign_suggestions: ({ integration: string; integration_display_name: string; sugg...
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
### `posthog.marketingAnalyticsTestMappingCreate`
|
|
453
|
+
|
|
454
|
+
- **HTTP**: `POST /api/projects/{project_id}/marketing_analytics/test_mapping/`
|
|
455
|
+
- **OpenAPI operationId**: `marketing_analytics_test_mapping_create`
|
|
456
|
+
- **Path params**: None
|
|
457
|
+
- **Query params**: None
|
|
458
|
+
- **Response codes**: `200`
|
|
459
|
+
- **Transport options**: None
|
|
460
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
461
|
+
|
|
462
|
+
**Inputs**
|
|
463
|
+
|
|
464
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
465
|
+
- Client transport options: None
|
|
466
|
+
|
|
467
|
+
**Outputs**
|
|
468
|
+
|
|
469
|
+
- Client return type: `unknown`
|
|
470
|
+
- OpenAPI response codes: `200`
|
|
471
|
+
|
|
472
|
+
```ts
|
|
473
|
+
import posthog from "@utdk/posthog";
|
|
474
|
+
|
|
475
|
+
type MarketingAnalyticsTestMappingCreateInput = Parameters<typeof posthog.marketingAnalyticsTestMappingCreate> extends [infer T, ...unknown[]] ? T : undefined;
|
|
476
|
+
type MarketingAnalyticsTestMappingCreateOutput = Awaited<ReturnType<typeof posthog.marketingAnalyticsTestMappingCreate>>;
|
|
477
|
+
|
|
478
|
+
const result: MarketingAnalyticsTestMappingCreateOutput = await posthog.marketingAnalyticsTestMappingCreate();
|
|
479
|
+
|
|
480
|
+
// Result shape (from schema): unknown
|
|
481
|
+
```
|
|
482
|
+
|
|
483
|
+
### `posthog.marketingAnalyticsUtmAuditRetrieve`
|
|
484
|
+
|
|
485
|
+
- **HTTP**: `GET /api/projects/{project_id}/marketing_analytics/utm_audit/`
|
|
486
|
+
- **What it does**: Run UTM audit
|
|
487
|
+
- **OpenAPI operationId**: `marketing_analytics_utm_audit_retrieve`
|
|
488
|
+
- **Path params**: None
|
|
489
|
+
- **Query params**: `date_from`, `date_to`
|
|
490
|
+
- **Response codes**: `200`
|
|
491
|
+
- **Transport options**: None
|
|
492
|
+
- **TypeScript**: [Client interface](../types.ts)
|
|
493
|
+
|
|
494
|
+
**Inputs**
|
|
495
|
+
|
|
496
|
+
- Client input type: `{ [key: string]: unknown }`
|
|
497
|
+
- Client transport options: None
|
|
498
|
+
|
|
499
|
+
**Outputs**
|
|
500
|
+
|
|
501
|
+
- Client return type: `{ total_campaigns: number; campaigns_with_issues: number; campaigns_without_issues: number; total_spend_at_risk: number; results: ({ campaign_name: string; campaign_id: string; source_name: string; spend: number; clicks...`
|
|
502
|
+
- OpenAPI response codes: `200`
|
|
503
|
+
|
|
504
|
+
```ts
|
|
505
|
+
import posthog from "@utdk/posthog";
|
|
506
|
+
|
|
507
|
+
type MarketingAnalyticsUtmAuditRetrieveInput = Parameters<typeof posthog.marketingAnalyticsUtmAuditRetrieve> extends [infer T, ...unknown[]] ? T : undefined;
|
|
508
|
+
type MarketingAnalyticsUtmAuditRetrieveOutput = Awaited<ReturnType<typeof posthog.marketingAnalyticsUtmAuditRetrieve>>;
|
|
509
|
+
|
|
510
|
+
const result: MarketingAnalyticsUtmAuditRetrieveOutput = await posthog.marketingAnalyticsUtmAuditRetrieve();
|
|
511
|
+
|
|
512
|
+
// Result shape (from schema): { total_campaigns: number; campaigns_with_issues: number; campaigns_without_issues: number; total_spend_at_risk: number; results: ({ campaign_name: string; campaign_id: string; source_name: string; spend: number; clicks...
|
|
513
|
+
```
|
|
514
|
+
|
|
515
|
+
|
|
516
|
+
<!-- prompt-hash:
|
|
517
|
+
8c3694991a4c289225f05a4e8f1e098cc74d085a088d7dffd82f00d93797b7f8
|
|
518
|
+
-->
|