Skip to content
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

Mixpanel.alias ignores any custom configuration #101

Open
mskrip opened this issue Apr 19, 2021 · 2 comments
Open

Mixpanel.alias ignores any custom configuration #101

mskrip opened this issue Apr 19, 2021 · 2 comments
Assignees

Comments

@mskrip
Copy link

mskrip commented Apr 19, 2021

When Mixpanel.alias is used it creates it's own default Consumer instance and sends the event through it. This makes it ignore any custom configuration done on the side of a Consumer.

Usecase

The Scaling your server side tracking docs suggest implementing a custom consumer that logs the events into one file/stream and then send the events outside of main thread to not make the event sending synchronous with the application.

But since it's always a good idea to have secrets, such as Mixpanel token, in as fewer places as possible we decided to log the events with a placeholder token and replace it only before they are actually being sent to the Mixpanel servers. This approach makes it so that .alias method is not working at all.

I do get the idea that alias has to be created before any events with the new id are tracked (#7). But the current implementation is a bit too binding and unintuitive from the perspective of the library user.

@seizethedave
Copy link
Contributor

I am collecting snags like this to influence an overhaul of this library. Thank you, this is nasty and will be included.

@seizethedave seizethedave self-assigned this Jun 17, 2021
@dcharbonnier
Copy link

The fix #114

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

No branches or pull requests

3 participants