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

Fix integration event when opted out #819

Merged

Conversation

argenisf
Copy link
Contributor

Add a check for the integration event to only be sent when the library has not been initialized in the opted out state or the user has already opted out

Add a check for the integration event to only be sent when the library has not been initialized in the opted out state or the user has already opted out
Copy link
Collaborator

@zihejia zihejia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@zihejia zihejia merged commit a74f1d7 into mixpanel:master Sep 13, 2023
1 check passed
@zihejia zihejia added the bug label Sep 14, 2023
@carstenhag
Copy link

Thanks for making the change. I really wonder why this is not tested though. Are there no integration tests? Things like this are easy to break and to get wrong.
I expected there to be a good test case around the very basics of opt in/opt out.

@jaredmixpanel
Copy link
Collaborator

@carstenhag There are opt out tests: https://github.com/mixpanel/mixpanel-android/blob/master/src/androidTest/java/com/mixpanel/android/mpmetrics/OptOutTest.java

They just didn't cover the integration event, which is tracked directly via HTTP API, it doesn't use the tracking queue mechanism. Also worth pointing out that the integration event doesn't track anything about your end user to your project. Effectively it captures data about you (Mixpanel's user) and sends it to an internal Mixpanel project. Specifically it just tells us that a given Mixpanel project token has been used to initialize an SDK.

@carstenhag
Copy link

@jaredmixpanel Thanks for your answer. I see tests regarding the general opt out, but not for the integration event.

The argument "the integration event doesn't track anything about your end user to your project" is true. We as the company don't get any info.

But to privacy-aware users, journalists & courts this distinction probably does not matter. If we as the company use Mixpanel and you send data to yourself, without an opt in, it's still wrong.
I'm happy this was fixed, but as a developer I am still curious about the test situation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants