Please note that screen parameters will overwrite the configuration of global tracking parameters.

Implementation Options

In Tag Integration, under the tab "Screens," you can set screen parameters.

Parameter

Description

classnameSpecify the view controller name for which the following settings apply.
mappingnameSpecify an alternative content ID for this view controller.
autoTracked

Specify whether automatic tracking is enabled for this view controller:

true = activated

false = deactivated

Please be aware that this setting will overwrite the "Track screen automatically" configuration in the "Basis" tab (see "Basis").

In contrast to the global tracking parameters, the screen parameters are only available within the view controller. In the source code of your app, all parameters assigned to a tracker object within a view controller are automatically screen parameters.

Example


import UIKit
import Webtrekk
 
class ProductListViewController: UITableViewController {
  private
 
  override func viewDidAppear(animated: Bool) {
   super .viewDidAppear(animated)
 
   let tracker = WebtrekkTracking.instance().trackerForPage( "Product List" )
 
   tracker.pageProperties.groups = [
     1 : "de" ,
     2 : "home"
   ]
   tracker.trackPageView()
  }
}
CODE

Unlike the global tracking parameters, the activity parameters are only available to you within the scope of the activity. All parameters assigned to a TrackingParameter object within an activity in the source code of your app are automatically activity parameters.

Example

// Example for a tracking call with an object TrackingParameter
 
private Webtrekk webtrekk;
private TrackingParameter tp;
 
[...]
 
@Override
protected void onCreate(Bundle savedInstanceState) {
  super .onCreate(savedInstanceState);
  setContentView(R.layout.activity_main);
 
  webtrekk = Webtrekk.getInstance();
 
  tp = new TrackingParameter();
  tp.add(Parameter.PAGE_CAT, "1" , "de" );
  tp.add(Parameter.PAGE_CAT, "2" , "home" );
}
 
@Override
public void onStart() {
   super .onStart();
   // no track call, because autoTracked is enabled
   // webtrekk.track(tp);
  }
 
  [...]
CODE