Skip to content

Add organization support to Mixpanel#9

Closed
tienlethanh wants to merge 3 commits into
mainfrom
add-mixpanel-org
Closed

Add organization support to Mixpanel#9
tienlethanh wants to merge 3 commits into
mainfrom
add-mixpanel-org

Conversation

@tienlethanh

@tienlethanh tienlethanh commented Sep 23, 2025

Copy link
Copy Markdown
Contributor

Implements nested metadata structure for user and organization tracking in MixpanelPublisher.

  • Add support for organization metadata alongside user metadata
  • Add comprehensive test coverage for all metadata scenarios

Metadata format:

$metadata = [
    'user' => [
             'id' => 'USERID', 
             'properties' => [...]
],
    'organization' => [
             'id' => 'COMPID', 
             'properties' => [...]
]];

@princejohnsantillan

Copy link
Copy Markdown
Member

@tienlethanh implementation looks correct to me. But let's create the publisher class in bw-api land instead. Put it in app\Narratives\Publishers and update the config file to use that MixpanelPublisher instead of the one in this package instead.

'mixpanel' => [
    'class' => \App\Narratives\Publishers\MixpanelPublisher::class,
    'options' => [
        'token' => env('MIXPANEL_PROJECT_TOKEN'),
],

@princejohnsantillan

Copy link
Copy Markdown
Member

This is because implementation is specific to bw-api business logic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants