Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Event tracking doesn't work in App Extension #1014

Open
Quppi opened this issue Aug 7, 2023 · 1 comment
Open

Event tracking doesn't work in App Extension #1014

Quppi opened this issue Aug 7, 2023 · 1 comment

Comments

@Quppi
Copy link

Quppi commented Aug 7, 2023

Integration Method: Swift Package Manager
Xcode Version: 14.3.1
Library Version: 5.0.2
Platform: iOS / App Extension
Language: Swift
Description: When tracking an event within the App, everything works fine. However if I track an event within an app extension through a shortcut intent, it seems to track the event according to mixpanel logs, but it never shows up in the mixpanel dashboard.
Expected Behavior: event should show up in mixpanel dashboard

Thanks for any help in figuring this out :)

@alexshiply
Copy link

Troubleshooting Event Tracking Issue in App Extension with Swift Package Manager Integration

Integration Details:

Integration Method: Swift Package Manager
Xcode Version: 14.3.1
Library Version: 5.0.2
Platform: iOS / App Extension
Language: Swift
Issue Description:
When attempting to track an event within an app extension through a shortcut intent, the event appears to be tracked according to Mixpanel logs. However, the event is not reflecting in the Mixpanel dashboard.

Expected Behavior:
The tracked event should be visible in the Mixpanel dashboard.

Troubleshooting Steps:

Logging and Debugging:

Ensure that the event tracking code in the app extension is correctly implemented and that there are no errors during execution. Utilize Swift's debugging tools and print statements to log relevant information.
Mixpanel Configuration:

Confirm that the Mixpanel configuration is consistent between the main app and the app extension. Check if the Mixpanel token and initialization code are identical.
App Extension Background Execution:

Verify that the app extension is allowed to run in the background, as events might not be sent if the extension is suspended or terminated before it has a chance to communicate with Mixpanel.
Network Connectivity:

Ensure that the device running the app extension has a stable internet connection. Events might not be sent if there are network issues.
Mixpanel SDK Compatibility:

Check if the version of the Mixpanel SDK (5.0.2) is compatible with both the main app and the app extension. Consider updating to the latest version of the Mixpanel SDK if available.
Shortcut Intent Handling:

Review how the shortcut intent is triggering the event tracking within the app extension. Ensure that the logic for handling shortcut intents is correctly implemented.
Mixpanel Dashboard Filters:

Double-check the Mixpanel dashboard filters to ensure that the event is not being filtered out. Adjust the dashboard settings to show events without any filters.
Permission and Authorization:

Confirm that the app extension has the necessary permissions and authorizations to interact with Mixpanel. This includes any required app groups or entitlements.
Mixpanel SDK Initialization Timing:

Check if the Mixpanel SDK is initialized at the appropriate time in the app extension lifecycle. Initialization should occur before attempting to track events.
Consult Mixpanel Documentation:

Refer to the Mixpanel documentation for any specific considerations or limitations related to using Mixpanel in app extensions.
By systematically reviewing these steps, you should be able to identify and resolve the issue with event tracking in your App Extension. If the problem persists, consider reaching out to Mixpanel support for further assistance.

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

No branches or pull requests

2 participants