With Trackingplan for iOS you can make sure that your tracking is going as you planned without changing your current analytics stack or code.
Trackingplan will monitor traffic between your app and data destinations and automatically detect any changes in your analytics implementation and warn you about inconsistencies like hit drops, missing properties, rogue events, and more.
Trackingplan is currently available for Web, iOS and Android. More clients will come soon.
Please request your TrackingplanId
at trackingplan.com or write us directly [email protected].
The recommended way to install Trackingplan for iOS is using Swift Package Manager because it makes it simple to install and upgrade.
First, add the Trackingplan dependency using Xcode, like so:
In Xcode, go to File -> Swift Packages -> Add Package Dependency...
If you are asked to choose the project, please choose the one you want to add Trackingplan to.
In the search box please put https://github.com/trackingplan/trackingplan-ios
and click next.
Choose the Version
and leave the default selection for the latest version or customize if needed.
Click finish and you will see the library added to the Swift Package Dependencies section.
Then in your application delegate’s - application(_:didFinishLaunchingWithOptions:)
method, set up the SDK like so:
//
// AppDelegate.swift
// ...
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
// Initialize Trackingplan SDK
Trackingplan.initialize(tpId: "#YourTrackingplanId")
return true
}
And of course, import the SDK:
//
// AppDelegate.swift
// ...
import Trackingplan
All set!
Tags are a pair of key value dictionary that can be set in 2 ways:
You can build predefined tags so it's easy to recognize if you're using an agent such ProcessInfo:
//
// TagsExample.swift
import Trackingplan
...
//Key pair value for tags
func appendTags(value: String, key: String) {
app.launchEnvironment.updateValue(value, forKey: TrackingplanTag.tagName.keyWithName(key))
}
You can set environment in runtime using the tag builder environment app.launchEnvironment.updateValue(value, forKey: TrackingplanTag.environment.rawValue)
Yes, we also sopport installation using Cocoapods.
First, add the Trackingplan dependency to your Podfile, like so:
pod 'Trackingplan', :git => 'https://github.com/trackingplan/trackingplan-ios.git'
Then in your application delegate’s - application(_:didFinishLaunchingWithOptions:)
method, set up the SDK like so:
//
// AppDelegate.swift
// ...
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
// Override point for customization after application launch.
// Initialize Trackingplan SDK
TrackingplanTag.initialize(tpId: "#YourTrackingplanId")
return true
}
And of course, import the SDK:
//
// AppDelegate.swift
// ...
import TrackingplanTag
All set!
Questions? Problems? Need more info? We can help! Contact us here.
Visit www.trackingplan.com
Copyright © 2021 Trackingplan Inc. All Rights Reserved.
link |
Stars: 3 |
Last commit: 1 week ago |
General improvements
Swiftpack is being maintained by Petr Pavlik | @ptrpavlik | @swiftpackco | API | Analytics