Skip to content

Commit dad30ec

Browse files
authored
Merge pull request #6976 from ivanagas/patch-1
Update PostHog Destination docs
2 parents 28c3226 + 4b3578a commit dad30ec

File tree

1 file changed

+33
-13
lines changed
  • src/connections/destinations/catalog/posthog

1 file changed

+33
-13
lines changed

src/connections/destinations/catalog/posthog/index.md

Lines changed: 33 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@ title: PostHog Destination
33
rewrite: true
44
id: 5ece242d61055a0b1bb2e103
55
---
6-
[PostHog](https://posthog.com/?utm_source=segmentio&utm_medium=docs&utm_campaign=partners){:target="_blank"} is a self-hosted, open-source analytics product. Get the same powerful features as other product analytics software but keep full control over your data.
6+
[PostHog](https://posthog.com/?utm_source=segmentio&utm_medium=docs&utm_campaign=partners){:target="_blank"} is an open-source suite of product and data tools including product analytics, session replays, feature flags, A/B testing, surveys, and more.
77

8-
This destination is maintained by PostHog. For any issues with the destination, check out the [PostHog users slack](https://posthog.com/slack){:target="_blank"} or [contact the PostHog Support team](mailto:[email protected]).
9-
10-
## Getting Started
8+
You can find out more about the destination in [PostHog's Segment documentation](https://posthog.com/docs/libraries/segment){:target="_blank"}.
119

10+
This destination is maintained by PostHog. For any issues with the destination, ask a question in the [PostHog community](https://posthog.com/questions){:target="_blank"} or [contact the PostHog support team in-app](https://us.posthog.com/#panel=support).
1211

12+
## Getting started
1313

1414
1. From the Destinations catalog page in the Segment App, click **Add Destination**.
1515
2. Search for "PostHog" in the Destinations Catalog, and select the PostHog destination.
1616
3. Choose which Source should send data to the PostHog destination.
17-
4. Go to your [PostHog set up page](https://app.posthog.com/setup){:target="_blank"}, and copy the **API key**.
18-
5. Enter the PostHog API Key that you copied in the PostHog destination settings in Segment.
19-
6. Enter your PostHog instance URL as the address to your instance **without any trailing slash**, for example:
20-
- `https://app.posthog.com` if you use PostHog Cloud US
21-
- `https://eu.posthog.com` if you use PostHog Cloud EU
22-
- `https://posthog-example.herokuapp.com` if you self-host on Heroku
17+
4. Go to your [PostHog project settings](https://us.posthog.com/settings/project#variables){:target="_blank"}, and copy the **project API key**.
18+
5. Enter the project API Key that you copied in the PostHog destination settings in Segment.
19+
6. Enter your PostHog instance address *without any trailing slash*, for example:
20+
- `https://us.i.posthog.com` if you use PostHog US Cloud
21+
- `https://eu.i.posthog.com` if you use PostHog EU Cloud
22+
- Your self-hosted URL if you self-host
2323

2424
## Page
2525

@@ -53,7 +53,7 @@ analytics.identify('userId123', {
5353
});
5454
```
5555

56-
Segment sends Identify calls to PostHog as an `identify` event. Data from Identify calls appears in PostHog under the **People** tab.
56+
Segment sends Identify calls to PostHog as an `$identify` event. Data from Identify calls appears in PostHog under the **People** tab.
5757

5858

5959
## Track
@@ -64,7 +64,7 @@ If you aren't familiar with the Segment Spec, take a look at the [Track method d
6464
analytics.track('Login Button Clicked')
6565
```
6666

67-
Segment sends Track calls to PostHog as a `track` event.
67+
Segment sends Track calls to PostHog using the event name you provide.
6868

6969
## Alias
7070

@@ -74,4 +74,24 @@ If you aren't familiar with the Segment Spec, take a look at the [Alias method d
7474
analytics.alias('507f191e81')
7575
```
7676

77-
Segment sends Alias calls to PostHog as an `alias` event.
77+
Segment sends Alias calls to PostHog as a `$create_alias` event.
78+
79+
## Group
80+
81+
If you aren't familiar with the Segment Spec, take a look at the [Group method documentation](/docs/connections/spec/group/) to learn about what it does. An example call would look like:
82+
83+
```js
84+
analytics.group("0e8c78ea9d97a7b8185e8632", {
85+
name: "Initech",
86+
industry: "Technology",
87+
employees: 329,
88+
});
89+
```
90+
91+
Segment sends Group calls to PostHog as a `$groupidentify` event. This creates or updates a group with the group type `segment_group` in PostHog. To create or update a group with a different group type, call `track` with a `$group` property.
92+
93+
```js
94+
analytics.track('user_signed_up', {
95+
$groups: { company: 'Initech' }
96+
})
97+
```

0 commit comments

Comments
 (0)