-
Notifications
You must be signed in to change notification settings - Fork 0
Gestures 7ff34b
Once your tag is initialised, you can start tagging gestures made by your users.
If you want to use variables, be sure to import ATInternet, Tracker and Gesture classes in your Activity.
Declare a Tracker-type variable in your Activity
package com.atinternet.atinternetdemo;
import android.app.Activity;
import android.os.Bundle;
import com.atinternet.tracker.ATInternet;
import com.atinternet.tracker.Tracker;
public class MainActivity extends Activity {
private Tracker tracker;
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
tracker = ATInternet.getInstance().getDefaultTracker();
}
}To tag a gesture, the tracker exposes a gestures object that offers an add method.
By default, this method adds “touch”-type tagging. You can edit the event type via the action object of the Gesture object, returned by the add method.
The different actions are the following:
- Touch: Sends a hit indicating that a “touch” has occurred
- Navigate: Sends a hit indicating that a navigational item was touched
- Download: Sends a hit indicating that a download was triggered
- Exit: Sends a hit indicating that the user changed the display or closed the application
- Search: Sends a hit indicating that the user “clicked” on a search result item
To send the defined information, you must manually call the method sendNavigation, sendExit, sendDownload, sendTouch or sendSearch of your Gesture object, or call the Tracker‘s dispatch method.
Please note, calling the methods sendNavigation, sendExit, sendDownload, sendTouch and sendSearch modifies the action property of the Gesture object.
- Tagging a navigational button:
@Override
public void onClick(View v) {
tracker.Gestures().add("Go to product detail").sendNavigation();
Intent intent = new Intent(MainActivity.this, SecondActivity.class);
startActivity(intent);
}- Tagging a navigational button with chapters:
@Override
public void onClick(View v) {
tracker.Gestures().add("Go to product detail", "Products", "Cart").sendNavigation();
Intent intent = new Intent(MainActivity.this, SecondActivity.class);
startActivity(intent);
}- Tagging a button touch:
@Override
public void onClick(View v) {
tracker.Gestures().add("Say Hello Everybody").setLevel2(1).sendTouch();
}| Name | Type | Default value | Description |
|---|---|---|---|
| name | String | Empty string | Gets or sets the gesture name |
| chapter1 | String | null | Gets or sets the first chapter |
| chapter2 | String | null | Gets or sets the second chapter |
| chapter3 | String | null | Gets or sets the third chapter |
| action | Enum | Action.Touch | Gets or sets the action type |
| level2 | Int | -1 | Gets or sets the level 2 ID |
| CustomObjects | CustomObjects | null | Class enabling the addition of custom objects on your hits/td> |
| Name | Return type | Description |
|---|---|---|
| sendTouch | void | Sends a hit indicating that a “clickable” element was touched |
| sendNavigation | void | Sends a hit indicating that a navigational item was touched |
| sendDownload | void | Sends a hit indicating that a download was triggered |
| sendExit | void | Sends a hit indicating that the user changed the display or closed the application |
| sendSearch | void | Sends a hit indicating that the user “clicked” on a search result item |
| InternalSearch(String keywordLabel, int resultPageNumber) | InternalSearch | Adds internal search informations |
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