Openpanel-dev / openpanel

All the goodies from both Mixpanel and Plausible combined into one tool.
https://openpanel.dev
GNU Affero General Public License v3.0
2.59k stars 84 forks source link

Question: How do I set a profileId? #35

Closed cspeer closed 1 week ago

cspeer commented 1 week ago

Hi,

I'm using the HTTP API directly. Unfortunately, there is no mention of how to set the user that is responsible for the event. I tried checking out the SDKs js code, but it's only distributed in minified form, so no luck there either 😅 Can you help out?

Thanks, Chris

cspeer commented 1 week ago

Ah, I finally found the source code for the SDK, and it's right here: https://github.com/Openpanel-dev/openpanel/blob/main/packages/sdks/sdk/index.ts#L196-L211

So, according to this, profileId is just another attribute in the event request payload. Maybe this will help someone else, but I think you should still add this crucial piece of information to the API docs :)

Thanks!