Custom screen and application variables

Foreword

Custom application variables allow you to associate information with a user’s activity while s/he is using your application.

Custom screen variables focus on a view in particular, and allow you, notably, to tag the fields of an entry form.

Get off to a good start

Once your tag is initialised, you can add your custom variables to your screen hit.

In the case of a Swift project, be sure to import the SmartTracker (or tvOSTracker/watchOSTracker if your target is an Apple TV or an Apple Watch) module in your ViewController. In the case of an Objective-C project, be sure to import the headers SmartTracker-Swift.h or Tracker-Swift.h in case of Cocoapods integration.

Tagging

The Screen object makes available a CustomVars-type object that exposes an addmethod. This method accepts three parameters:

varId: index of the indicator

value: value of the indicator, character string in the format:

text: [lorem]

decimal: “,” or “.” separator, two characters maximum after the separator