First, import the tracking classes to be able to use them in your source code.
Our tracking functionality is provided via the class "Webtrekk."
It is implemented as "singleton" and has to be initialized once. We recommend doing that in the "application" method of your AppDelegate.
Example
import UIKit
import Webtrekk
@UIApplicationMain
class AppDelegate: NSObject, UIApplicationDelegate {
var window: UIWindow ?
func application(
application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject] ? ) - > Bool {
try !WebtrekkTracking.initTrack()
return true
}
}
CODE
First, import the tracking classes to be able to use them in your source code.
import com.webtrekk.webtrekksdk.Webtrekk;
CODE
Our tracking functionality is provided via the class "Webtrekk."
It is implemented as "singleton" and has to be initialized once. We recommend doing that in the "onCreate" method of your MainActivity.
Example
private Webtrekk webtrekk;
@Override
protected void onCreate(Bundle savedInstanceState) {
super .onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
webtrekk = Webtrekk.getInstance();
webtrekk.initWebtrekk(getApplication());
}
CODE