CleanInsightsSDK Documentation Beta

Class Insights

open class Insights: NSObject, Codable
Insights Insights Codable Codable Insights->Codable NSObject NSObject Insights->NSObject

Conforms To

Codable
NSObject

Initializers

init(_:​_:​)

public init(_ conf: Configuration, _ store: Store)

Create an Insights object according to configuration with all data from the store which is due for offloading to the server.

Parameters

conf Configuration

The current configuration.

store Store

The current measurement and consents store.

Properties

idsite

let idsite: Int

Matomo site ID.

lang

let lang: String?

Preferred user languages as an HTTP Accept header.

ua

let ua: String?

User Agent string.

visits

let visits: [Visit]

Visit data points.

events

let events: [Event]

Event data points.

is​Empty

var isEmpty: Bool

Methods

clean(store:​)

public func clean(store: Store)

Removes all visits and events from the given Store, which are also available in here.

This should be called, when all Insights were offloaded at the server successfully.

Parameters

store Store

The store where the Visits and Events in here came from.