Skip to content

SwiftfulThinking/SwiftfulLoggingMixpanel

Repository files navigation

Mixpanel for SwiftfulLogging ✅

Add Mixpanel support to a Swift application through SwiftfulLogging framework.

See documentation in the parent repo: https://github.com/SwiftfulThinking/SwiftfulLogging

Example configuration:

// Example
#if DEBUG
let logger = LogManager(services: [ConsoleService()])
#else
let logger = LogManager(services: [MixpanelService()])
#endif

Example actions:

You may call identifyUser every app launch.

logger.trackEvent(eventName: String)
logger.trackScreenView(eventName: String)
logger.identifyUser(userId: String, name: String?, email: String?)
logger.addUserProperties(dict: [String: Any])
logger.deleteUserProfile()

TODO

  • Add alias support?

About

Mixpanel for SwiftfulLogging

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages