-
Notifications
You must be signed in to change notification settings - Fork 393
Update PostHog Destination docs #6976
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 1 commit
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,23 +3,23 @@ title: PostHog Destination | |
rewrite: true | ||
id: 5ece242d61055a0b1bb2e103 | ||
--- | ||
[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. | ||
[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. | ||
|
||
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]). | ||
|
||
## Getting Started | ||
You can find out more about the destination in their [Segment documentation](https://posthog.com/docs/libraries/segment){:target="_blank"}. | ||
|
||
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). | ||
|
||
## Getting Started | ||
stayseesong marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
1. From the Destinations catalog page in the Segment App, click **Add Destination**. | ||
2. Search for "PostHog" in the Destinations Catalog, and select the PostHog destination. | ||
3. Choose which Source should send data to the PostHog destination. | ||
4. Go to your [PostHog set up page](https://app.posthog.com/setup){:target="_blank"}, and copy the **API key**. | ||
5. Enter the PostHog API Key that you copied in the PostHog destination settings in Segment. | ||
6. Enter your PostHog instance URL as the address to your instance **without any trailing slash**, for example: | ||
- `https://app.posthog.com` if you use PostHog Cloud US | ||
- `https://eu.posthog.com` if you use PostHog Cloud EU | ||
- `https://posthog-example.herokuapp.com` if you self-host on Heroku | ||
4. Go to your [PostHog project settings](https://us.posthog.com/settings/project#variables){:target="_blank"}, and copy the **project API key**. | ||
5. Enter the project API Key that you copied in the PostHog destination settings in Segment. | ||
6. Enter your PostHog instance address **without any trailing slash**, for example: | ||
stayseesong marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
- `https://us.i.posthog.com` if you use PostHog US Cloud | ||
- `https://eu.i.posthog.com` if you use PostHog EU Cloud | ||
- Your self-hosted URL if you self-host | ||
|
||
## Page | ||
|
||
|
@@ -53,7 +53,7 @@ analytics.identify('userId123', { | |
}); | ||
``` | ||
|
||
Segment sends Identify calls to PostHog as an `identify` event. Data from Identify calls appears in PostHog under the **People** tab. | ||
Segment sends Identify calls to PostHog as an `$identify` event. Data from Identify calls appears in PostHog under the **People** tab. | ||
|
||
|
||
## Track | ||
|
@@ -64,7 +64,7 @@ If you aren't familiar with the Segment Spec, take a look at the [Track method d | |
analytics.track('Login Button Clicked') | ||
``` | ||
|
||
Segment sends Track calls to PostHog as a `track` event. | ||
Segment sends Track calls to PostHog using the event name you provide. | ||
|
||
## Alias | ||
|
||
|
@@ -74,4 +74,24 @@ If you aren't familiar with the Segment Spec, take a look at the [Alias method d | |
analytics.alias('507f191e81') | ||
``` | ||
|
||
Segment sends Alias calls to PostHog as an `alias` event. | ||
Segment sends Alias calls to PostHog as an `$create_alias` event. | ||
stayseesong marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
## Group | ||
|
||
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: | ||
|
||
```js | ||
analytics.group("0e8c78ea9d97a7b8185e8632", { | ||
name: "Initech", | ||
industry: "Technology", | ||
employees: 329, | ||
}); | ||
``` | ||
|
||
Segment sends Group calls to PostHog as an `$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. | ||
stayseesong marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
||
```js | ||
analytics.track('user_signed_up', { | ||
$groups: { company: 'Initech' } | ||
}) | ||
``` |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.