Before I start
Piano Analytics SDKs have been designed for the Piano Analytics solution. Data sent through these SDKs will not be processed within the Analytics Suite 2.
Integrate the library
The first step to use our SDK is to integrate our library in your project. You have multiple ways to do this.
SPM (Swift Package Manager)
Add our SDK's Github repository as an external dependency:
Add our SDK's Github repository as an external dependency in your
github "at-internet/piano-analytics-apple" ~> 3.0
Add our SDK's Cocoapods podname as an external dependency in your
pod "PianoAnalytics/iOS", ">=3.0"
In order to setup your tracking, you need to set the configuration of the library:
pa.setConfiguration(_ config: Configuration);
Here is the minimal configuration required:
Here are the available configurations:
|Global||Custom user agent|
|Global||Backgound delay before considering a session as over (seconds)|
|Privacy||Whether the SDK should ignore (|
|Privacy||Do you want to send events when optout?|
|Privacy||Privacy mode by default|
|Storage||Offline feature encryption mode.|
|Storage||Offline feature storage mode. |
|Storage||Offline feature interval between sent requests|
|Storage||Lifetime Storage Privacy value|
|Storage||Lifetime Storage User value|
|Storage||Lifetime Storage Visitor value|
|Storage||Relative or fixed cookie lifetime value for visitor|
|Visitor Policy||Visitor ID type|
|Visitor Policy||Custom visitor ID|
You can find the iOS changelog directly on GitHub.