Gestures

 

Get off to a good start

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

 

Tagging

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 examples

  1. Tagging a navigational button:
  2. Tagging a navigational button with chapters:
  3. Tagging a button touch:
 

Gesture class

 

Properties

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>
 

Methods

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
Was this post helpful?
Yes
No
Last update: 05/04/2018