-
Notifications
You must be signed in to change notification settings - Fork 0
Level 2s 075027
AT Internet’s SDK offers you the possibility to “separate” your application into different sections (called “level 2s”). These level 2s allow you to better target certain parts of your application in order to zoom in on how these parts are used.
Once your tag is initialised, you can modify the level 2 ID used in the sending of hits.
If you want to use variables, be sure to import ATInternet, Tracker and Context classes in your Activity.
The SDK allows you to modify the level 2 ID that will be sent during a screen hit, a gesture hit… You Can also modify the level 2 ID in a more “global” manner for permanent use.
The tracker possesses a context object which itself possesses a level2 subproperty. By default, this property has a value of 0. By editing this property’s value, the level 2 ID will be added in to future hits.
To disable this feature, simply reset the ID to 0.
In these examples, we’ll consider the addition of level 2 information on screen tagging.
- Setup of a level 2 when a user enters a particular section of the app
@Override
protected void onResume() {
super.onResume();
ATInternet.getInstance().getDefaultTracker().Context().setLevel2(1);
ATInternet.getInstance().getDefaultTracker().Screens().add(this).sendView();
}- Delete tracker’s level 2 by default when screen is changed
@Override
protected void onStop() {
super.onStop();
ATInternet.getInstance().getDefaultTracker().Context().setLevel2(0);
}- Override a level 2 for a hit
package com.atinternet.atinternetdemo;
import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import com.atinternet.tracker.ATInternet;
import com.atinternet.tracker.Tracker;
public class MainActivity extends Activity implements View.OnClickListener {
private Tracker tracker;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
findViewById(R.id.text).setOnClickListener(this);
tracker = ATInternet.getInstance().getDefaultTracker();
}
@Override
protected void onResume() {
super.onResume();
ATInternet.getInstance().getDefaultTracker().Context().setLevel2(1);
ATInternet.getInstance().getDefaultTracker().Screens().add(this).sendView();
}
@Override
public void onClick(View v) {
tracker.Gestures().add("ButtonTouch").setLevel2(2).sendTouch();
}
}Last update: 05/04/2018
-
Data API
- Data flow
- Advice optimizations data flow
- Error codes data flow
- Faq data flow
- General information data flow
- Technical information data flow
- Reporting API v3
- Getting started
- Methods
- Parameters
- Technical information
- REST API
- Campaigns
- Custom variables
- Getting started rest
- Methods rest
- Response structure parameters rest
- Fixed periods
- Parameters compatibility
- Relative periods
- Structure of the response
- “code” parameter
- “columns” parameter
- “evo” parameter
- “filter” parameter
- “include” parameter
- “lng” parameter
- “max-results” parameter
- “page-num” parameter
- “period” parameter
- “period” parameter: “H” v. “He” & “MN” v. “MNe”
- “retention” parameter
- “segmentdesc” parameter
- “segment” parameter
- “sep” parameter
- “sort” parameter
- “space” parameter
- Technical specifications rest
- Data flow
-
Data collection
- Android
- Advanced features
- Campaigns
- Changelog
- Content
- Ecommerce
- Getting started
- Users
- Apple
- Advanced features
- Campaigns
- Changelog
- Content
- Ecommerce
- Getting started
- Users
- General
- Cddc renew staging process
- Changelog
- Craft your hit
- Encoded parameters
- Server side cookie management
- Supported taggings
- Tagging deletion
- Utilisation of dispatch sdks
- JavaScript
- Advanced features
- Campaigns
- Changelog
- Content
- Ecommerce
- Getting started
- Partners javascript
- Users
- Piano Analytics
- Event tagging piano analytics
- Getting started piano analytics
- Piano analytics tagging
- Feeding piano analytics with as2 tagging
- Tagging custom properties sdk
- Android