Custom Object

  • iOS
  • watchOS
  • tvOS
 

Foreword

The SDK allows the addition of all sorts of information to the stc variable via dictionaries or JSON feeds. Custom objects can be added to any type of tagging, and can then be treated via the Data Manager tool.

 

Get off to a good start

Once your tag is initialised, you can add your custom objects to your hits.

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 TrackerSmart-Swift.h or Tracker-Swift.h in case of a Cocoapods integration

 

Tagging

To add a custom object to your hits, the Screen object exposes object a customObjects property possessing an add method. This method allows for the addition of a custom object that will be added to the next hit sent.

 

Tagging examples

  1. Tagging a screen with addition of a “simple” custom object


    JSON result in stc variable  :
  2. Tagging a screen with addition of a “complex” custom object


    JSON result in stc variable  :
  3. Tagging navigation with the addition of a custom object

  4. Tagging an ad with the addition of a custom object

 

CustomObject class

 

Properties

Name Type Default value Description
json String {} Gets or sets the object in JSON format
Was this post helpful?
Yes
No
Last update: 01/12/2016