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 tracking fires with disabled analytics #1772

Closed
jhermsmeier opened this Issue Oct 14, 2017 · 7 comments

Comments

Projects
None yet
4 participants
@jhermsmeier
Copy link
Contributor

commented Oct 14, 2017

  • Etcher version: v1.1.2
  • Operating system and architecture: any
  • Image flashed: any
  • Do you see any meaningful error information in the DevTools?

screen shot 2017-10-14 at 18 02 59

As can be seen here, two events are tracked and sent to Mixpanel at application startup, even though the analytics setting is disabled.

Connects To: #1770

@ValdikSS

This comment has been minimized.

Copy link

commented Nov 25, 2017

Not fixed in 1.2.0.

@jviotti

This comment has been minimized.

Copy link
Member

commented Nov 26, 2017

Hi @ValdikSS ,

Thanks for reviving this thread. I thought we sent a fix for this ticket already, and that we simply forgot to close the issue with the corresponding PR. @jhermsmeier do you remember where I can find that PR?

@ValdikSS I gave this another go using the v1.2.0 on my Mac but couldn't reproduce the issue anymore. I disabled analytics, opened Etcher, and no request was sent to api.mixpanel.com:

screen shot 2017-11-26 at 12 17 56 pm

How are you analyzing this? Could it be that the DevTools Network monitor is not fast enough to log certain requests you found somewhere else? Let me know so we can track this down!

@ValdikSS

This comment has been minimized.

Copy link

commented Nov 26, 2017

How are you analyzing this?

Start Etcher, enter Devmode, press F5.

jviotti added a commit that referenced this issue Nov 26, 2017

fix(GUI): ensure settings are loaded before bootstrapping application
We load localStorage settings into the Redux store in an asynchronous
way. This means that user settings might not be loaded by the time the
application starts, resulting in Mixpanel sending a few tracking events
before Etcher realises that the user opted out from anonoymous analytics
and error reporting.

In order to fix that, we remove `ng-app` and we manually bootstrap the
Angular.js application *after* the local settings are loaded.

Change-Type: patch
Changelog-Entry: Don't send initial Mixpanel events before "Anonymous Tracking" settings are loaded.
Fixes: #1772
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti

This comment has been minimized.

Copy link
Member

commented Nov 26, 2017

Thanks for the clarification @ValdikSS. I was able to get to the same conclusion by using WireShark. I sent an initial PR (https://github.com/resin-io/etcher/pull/1879/files) that ensures that local settings are loaded before bootstrapping the application, but looks like the Mixpanel library still sends some initial events during its own startup that we have to find a way to shutdown. This will probably need to be done in Corvus.

jviotti added a commit that referenced this issue Nov 26, 2017

fix(GUI): ensure settings are loaded before bootstrapping application
We load localStorage settings into the Redux store in an asynchronous
way. This means that user settings might not be loaded by the time the
application starts, resulting in Mixpanel sending a few tracking events
before Etcher realises that the user opted out from anonoymous analytics
and error reporting.

In order to fix that, we remove `ng-app` and we manually bootstrap the
Angular.js application *after* the local settings are loaded.

Change-Type: patch
Changelog-Entry: Don't send initial Mixpanel events before "Anonymous Tracking" settings are loaded.
Fixes: #1772
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>

jviotti added a commit to balena-io-modules/resin-corvus that referenced this issue Nov 26, 2017

fix(mixpanel): prevent strange /decide/ HTTP call
See: balena-io/etcher#1772
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti

This comment has been minimized.

Copy link
Member

commented Nov 26, 2017

I fixed one last mysterious /decide/ call from the Mixpanel library here: balena-io-modules/resin-corvus#35

jviotti added a commit to balena-io-modules/resin-corvus that referenced this issue Nov 26, 2017

fix(mixpanel): delay init() call to first tracking event
The `.init()` function call causes an HTTP request to
`api.mixpanel.com`, without taking `shouldReport()` into consideration.
For this reason, we delay initializing the client to the moment where we
need to send a first tracking event.

See: balena-io/etcher#1772
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
@jviotti

This comment has been minimized.

Copy link
Member

commented Nov 26, 2017

I fixed the last remaining edge case: balena-io-modules/resin-corvus#36.

Thanks for the heads up @ValdikSS! I definitely wouldn't have noticed that this was still the case without a packet sniffer or by refreshing the application through DevTools.

This fix will land in the next release (probably v1.2.1) very soon, and apologies for not allocating more time to properly fix this!

@ValdikSS

This comment has been minimized.

Copy link

commented Nov 26, 2017

Great, thanks.

@lurch lurch added this to the v1.2.1 milestone Dec 4, 2017

jviotti added a commit to balena-io-modules/resin-corvus that referenced this issue Dec 4, 2017

fix(mixpanel): prevent strange /decide/ HTTP call
See: balena-io/etcher#1772
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>

jviotti added a commit to balena-io-modules/resin-corvus that referenced this issue Dec 4, 2017

fix(mixpanel): delay init() call to first tracking event
The `.init()` function call causes an HTTP request to
`api.mixpanel.com`, without taking `shouldReport()` into consideration.
For this reason, we delay initializing the client to the moment where we
need to send a first tracking event.

See: balena-io/etcher#1772
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>

jviotti added a commit to balena-io-modules/resin-corvus that referenced this issue Dec 4, 2017

fix(mixpanel): delay init() call to first tracking event
The `.init()` function call causes an HTTP request to
`api.mixpanel.com`, without taking `shouldReport()` into consideration.
For this reason, we delay initializing the client to the moment where we
need to send a first tracking event.

See: balena-io/etcher#1772
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>

jviotti added a commit that referenced this issue Dec 4, 2017

upgrade: `resin-corvus` to v1.0.0-beta.31
This version contains a couple of patches to ensure that the Mixpanel
library doesn't send any HTTP request to api.mixpanel.com unless the
user enabled analytics.

- balena-io-modules/resin-corvus#35
- balena-io-modules/resin-corvus#36

See: #1772
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>

jviotti added a commit that referenced this issue Dec 5, 2017

upgrade: `resin-corvus` to v1.0.0-beta.31 (#1902)
This version contains a couple of patches to ensure that the Mixpanel
library doesn't send any HTTP request to api.mixpanel.com unless the
user enabled analytics.

- balena-io-modules/resin-corvus#35
- balena-io-modules/resin-corvus#36

See: #1772
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>

@jviotti jviotti closed this in #1879 Dec 5, 2017

jviotti added a commit that referenced this issue Dec 5, 2017

fix(GUI): ensure settings are loaded before bootstrapping application (
…#1879)

We load localStorage settings into the Redux store in an asynchronous
way. This means that user settings might not be loaded by the time the
application starts, resulting in Mixpanel sending a few tracking events
before Etcher realises that the user opted out from anonoymous analytics
and error reporting.

In order to fix that, we remove `ng-app` and we manually bootstrap the
Angular.js application *after* the local settings are loaded.

Change-Type: patch
Changelog-Entry: Don't send initial Mixpanel events before "Anonymous Tracking" settings are loaded.
Fixes: #1772
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.