Setup KAnalytics¶
KAnalytics comes with three artifacts: kanalytics
, kanalytics-viewer
, and kanalytics-viewer-no-op
.
The kanalytics
artifact is the main library for collecting analytics, while the kanalytics-viewer
artifact is a companion app that helps developers and QA teams manage analytics events in their applications.
The kanalytics-viewer-no-op
artifact is a no-op version of the viewer, which can be used in
production environments where you don't want to include the viewer.
Installation¶
Add kanalytics
artifact in your project to be able to collect analytics events:
build.gradle.kts | |
---|---|
1 2 3 |
|
To view the analytics events, being sent to tracking tools, add the kanalytics-viewer
artifact:
Note: You might want to add this to your non production build type as you don't want to ship the viewer to production.
build.gradle.kts | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 |
|
Snapshots of the development version are available in Sonatype's snapshots repository.
build.gradle.kts | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
|
Setup Quick Actions on iOS¶
The quick actions support on iOS requires some manual setup before you can use it.
Install dependency¶
Export the kanalytics-viewer
to used in your swift project:
ios-framework/build.gradle.kts | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
|
Handle Quick Actions in AppDelegate¶
Add Quick Actions support by implementing the necessary delegate method in your AppDelegate
class:
AppDelegate.swift | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 |
|
For a sample implementation see the sample iOS app.