AnalyticsReporting
public class AnalyticsReporting : ActionDispatchObserver
This class observes action execution and passes the analytics data to your analytics subsystem for any Actions that support analytics.
This allows internal or third party frameworks that use Flint to expose functionality that you also track with analytics, without them directly linking to the analytics package.
To use Analytics reporting, you need to make sure AnalyticsFeature.isEnabled is set to true,
and you need to set an implementation of AnalyticsProvider
to the AnalyticsFeature.provider
property before Flint
setup
is called. By default this includes just a default console analytics provider.
AnalyticsFeature.provider = MyGoogleAnalyticsProvider()
See
AnalyticsProvider
for the protocol to conform to, to wire up your actual analytics service such as Mixpanel,
Google Analytics or preferably, your own back end.
-
Initialise the reporting with your own analytics provider instance that actually logs the data.
Declaration
Swift
public init(provider: AnalyticsProvider)
-
Undocumented
Declaration
Swift
public func actionWillBegin<FeatureType, ActionType>(_ request: ActionRequest<FeatureType, ActionType>) where FeatureType : FeatureDefinition, ActionType : Action
-
Undocumented
Declaration
Swift
public func actionDidComplete<FeatureType, ActionType>(_ request: ActionRequest<FeatureType, ActionType>, outcome: ActionPerformOutcome) where FeatureType : FeatureDefinition, ActionType : Action