Client library for tracking user events for later analysis
Tracks for iOS is a client library used to help track events inside of an application. This project solely is responsible for collecting the events, storing them locally, and on a schedule send them out to the Automattic servers. Realistically this library is only useful for Automattic-based projects but the idea is to share what we've made.
You can install the Tracks component in your app via Swift Package Manager:
.package(url: "https://github.com/Automattic/Automattic-Tracks-iOS", from: "0.10.0")
You can import the entire library, using import AutomatticTracks
. Or, you can import just one particular part of the library:
// Reporting events to the internal 'Tracks' service
import AutomatticTracksEvents
// Uploading app logs and crash logs to internal monitoring tools
import AutomatticRemoteLogging
// Running experiments using the internal 'ExPlat' tool
import AutomatticExperiments
// Displaying crash logs in your app
import AutomatticCrashLoggingUI
Tracks can also be installed via CocoaPods, though we encourage users to use Swift Package Manager instead. To install via Cocoapods:
pod 'Automattic-Tracks-iOS'
TracksService
.eventNamePrefix
. As an Automattician you will know how to get a prefix allowed.Check out the TracksDemo project for more information on how to track events.
ExPlat.configure(platform:oauthToken:userAgent:anonId:)
to configure the experiment platform. (If you are using TracksService
, it will make this call for you when you create the Tracks service.)Explat.shared.register(experiments:)
.ExPlat.shared.experiment("my_experiment_name")
to determine which variant of an experiment should be used.EventLogging
using init(dataSource:delegate:)
.enqueueLogForUpload(log:)
to schedule log files for uploading.Tracks logs about some of its activity. By default, this logging will just go to the console. If you'd like to include this logging in your own logging solution, you can create and assign a logging delegate conforming to TracksLoggingDelegate
:
TracksLogging.delegate = MyLoggingHandler()
git checkout -b my-new-feature
git commit -am 'Add some feature'
git push origin my-new-feature
Original source: https://github.com/Automattic/Automattic-Tracks-iOS
Created by initially: Aaron Douglas @astralbodies
Automattic-Tracks-iOS is available under the GPLv2 license. See the LICENSE file for more info.
link |
Stars: 38 |
Last commit: 1 week ago |
releaseName
value is now the Sentry default of package@version+build
(e.g. c[email protected]+1.2.3.4) instead of only providing the CFBundleVersionKey
[#267]Full Changelog: https://github.com/Automattic/Automattic-Tracks-iOS/compare/2.4.0...3.0.0
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics