Closed c128128 closed 2 years ago
hi @c128128 , this is per design. Could you check your project setting if the Automatically collect common mobile events
toggle is off? If so, it will stop tracking common mobile events so you will see those events not being able to send to Mixpanel anymore. Versions prior to 3.1.3
contain a bug that does not respect this setting from the server.
I'm closing this issue now, please feel free to reopen if you have any questions.
@zihejia The Automatically collect common mobile events
is off, and I think you have a race.
Ex:
SDK
is doing request to get the Automatically collect common mobile events
from server.2
is coming back.SDK
is deleting my recorded events.3
hi @c128128 , because the Automatically collect common mobile events
is off, your automatic events will be removed but it won't remove your regular events. The reason you see this is because First App Open
is tracked before we have a chance to check whether your Automatically collect common mobile events
is off or not(can't move it earlier, to avoid more problems).
You can also choose not to rely on the server toggle Automatically collect common mobile events
by setting trackAutomaticEvents
param like so Mixpanel.initialize(token: "your project token", trackAutomaticEvents: false)
. In that way you won't see this deletion happening.
You can also choose not to rely on the server toggle Automatically collect common mobile events by setting trackAutomaticEvents param like so Mixpanel.initialize(token: "your project token", trackAutomaticEvents: false). In that way you won't see this deletion happening.
I've done this. And my events get deleted. The deleted events from my report are mine and not trackAutomaticEvents
, that's why I am reporting this.
hi @c128128 , it should only remove Mixpanel automatic events prefix with $ae_
, as long as your event name does not start with $ae_
, there is no way they get deleted. Let me know if there is something I missed.
https://github.com/mixpanel/mixpanel-swift/blob/cb6c5d648e42987e1285897a3f856ff7e24270a9/Sources/MixpanelPersistence.swift#L91
Hmm.. I will check tomorrow and let you know. But for sure that something introduced in 3.1.3 is deleting my events.
@zihejia Checked! And looks like the problem is somewhere else, unfortunately I have no time to debug it. I have created a demo project here https://github.com/c128128/MixpanelBug, check main.swift
FWIW, I just updated to 3.1.3 and I suspect I'm missing a lot of events based on some of my KPI's dropping in half. I downloaded my app and created a new account and watched the events come in and did not see a lot of events I would expect.
I came to the Issues list to see if there is an open issue and found this. I'll keep digging into this but there might be a real bug here.
hi @c128128 , thanks for providing the sample app, that would help a lot. I will get back to you shortly.
hi @c128128 @BrightChad . We did find the issue and fix it in v3.1.4. It was caused by the delete SQL command being incorrectly executed. Sorry about the inconvenience! I've verified the sample app with the fix and it works as expected. I'm closing this issue now, feel free to reopen if you have any other issues.
Thanks for the quick turn. I didn't have time to isolate the bug on my app but will update to this release right now and test it out.
UPDATE: ran through onboarding sequence again (which was missing events) and it worked. It was only one test pass but I used the same steps as before.
Looks like with version
3.1.3
a new bug was introduced.Some events are deleted and never sent to server.
A little diving into your
SDK
get me here https://github.com/mixpanel/mixpanel-swift/blob/cb6c5d648e42987e1285897a3f856ff7e24270a9/Sources/MixpanelInstance.swift#L1416From bellow logs, 2 events are inserted and then deleted but never flushed.
Tested also with
3.1.2
and it works as expected.