Analytics events

An event has a name and a dictionary of additional parameters. Event parameters are of standard, JSON-friendly types.

All Nutrient event names are prefixed with pspdf_ and use underscore_case.

You can find the complete list of Nutrient events and parameters in the PSPDFAnalyticsEvents.h header and in the list below.

Custom events

The Nutrient events pipeline can also be used to deliver custom events.

Extend the PDFAnalytics.EventName type with your custom events:

extension PDFAnalyticsEventName {
static var someCustomAction = PDFAnalyticsEventName(rawValue: "some_custom_action")
}

Then use the PDFAnalytics object to deliver them:

PSPDFKit.SDK.shared.analytics.logEvent(.someCustomAction)

The event in the above example will be dispatched to all registered [PDFAnalyticsClient][] instances.