• iOS
  • watchOS
  • tvOS

Get off to a good start

Once your tag is initialised, you can start tagging your screens.

In the case of a Swift project, be sure to import the Tracker (or TrackerExtension if your target is an extension) module in your ViewController. In the case of an Objective-C project, be sure to import the headers Tracker-Swift.h or SmartTracker-Swift.h

Declare a Tracker (or AutoTracker)  variable in your ViewController



To tag a screen, the tracker exposes a screens property.

Two solutions are available to tag a screen:

  • Define one or several tagging and send the hit(s) at the desired moment
  • Send screen tagging directly

To do this, the screens property of the Tracker class offers an add method.
This method enables the addition of screen tagging which can be sent at the desired moment (e.g. viewDidLoad, viewWillAppear …).

The add method sends back a Screen-type object. To send the defined information, you must manually call the sendView method of your Screen method, or call the Tracker’s dispatch method.


Tagging examples

  1. Tagging a screen:

  2. Tagging a screen with a level 2:

  3. Tagging a screen with chapters:

  4. Tagging a screen with the addition of a custom object:

  5. Tagging a screen with use of dispatcher:

  6. Tagging a screen with a name defined via a CustomObject (the name will be treated via DataManager)

  7. Tagging a basket :


Screen Class

Name Type Default value Description
name String Empty string Gets or sets the screen name
chapter1 String? nil Gets or sets the first chapter
chapter2 String? nil Gets or sets the second chapter
chapter3 String? nil Gets or sets the third chapter
action Enum Action.View Gets or sets the action type
level2 Int? nil Gets or sets the level 2 ID
isBasketScreen Bool false Indicates that the screen displays the content of a cart (in the case where the SalesTracker option is used)
customObjects CustomObjects CustomObjects Allows you to associate information by passing a dictionary
customVars CustomVars CustomVars Allows you to associate information with a user’s activity while s/he is using your application
aisle Aisle nil Allows you to tag your product “aisles” or sections.
customTreeStructure CustomTreeStructure nil Allow you to create a custom tree structure for your application.


PublisherImpressions Allows you to tag third-party campaigns on your app


SelfPromotionImpressions Allows you to tag self-promotional items on your site
location Location nil Allows you to add geolocalisation data (latitude, longitude) in a screen hit
campaign Campaign nil Allows you to tag different types of campaigns
internalSearch InternalSearch nil Allows you to tag your application’s internal search engine
order Order nil Allows you to tag orders placed by your users while using your application
cart Cart nil Allows you to tag your application’s basket or cart, as well as its contents


Name Return Description
sendView void Send screen hit
Was this post helpful?
Last update: 13/03/2018