-
Notifications
You must be signed in to change notification settings - Fork 0
Gestures 88b499
Once your tag is initialised, you can start tagging gestures made by your users.
In the case of a Swift project, be sure to import the Tracker (or tvOSTracker/watchOSTracker if your target is a tvOS or watchOS device) module in your ViewController. In the case of an Objective-C project, be sure to import the headers or Tracker-Swift.h (or Tracker-Swift.h with Cocoapods).
Declare a Tracker type variable in your ViewController.
import UIKit
import Tracker
class ViewController: UIViewController {
let tracker: Tracker = ATInternet.sharedInstance.defaultTracker
override func viewDidLoad() {
super.viewDidLoad()
}
override func didReceiveMemoryWarning() {
super.didReceiveMemoryWarning()
// Dispose of any resources that can be recreated.
}
}#import "Tracker/Tracker-Swift.h"
@interface ViewController ()
@property (nonatomic, strong) Tracker *tracker;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.tracker = [ATInternet sharedInstance].defaultTracker;
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
@endTo tag a gesture, the tracker exposes a gestures property that offers an add method.
By default, this method adds �touch�-type tagging. You can edit the event type via the action property 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 func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?){
tracker.gestures.add("Go to product detail").sendNavigation()
}- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
[[self.tracker.gestures add:@"Go to product detail"] sendNavigation];
}-
Tagging a navigational button with chapters:
override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?){
tracker.gestures.add("Go to product detail", chapter1: "Products", chapter2: "Cart").sendNavigation()
}- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
[[self.tracker.gestures add:@"Go to product detail" chapter1:@"Products" chapter2:@"Cart"] sendNavigation];
}-
Tagging a button touch:
@IBAction func sayHelloHAL(sender: UIButton) {
let sayHello = tracker.gestures.add("Say Hello HAL")
sayHello.level2 = 1
sayHello.sendTouch()
}- (IBAction)sayHelloHAL:(UIButton *)sender {
Gesture *sayHello = [self.tracker.gestures add:@"Say Hello HAL"];
sayHello.level2 = 1;
[sayHello sendTouch];
}-
Tagging a touch with a name defined via a CustomObject (the name will be treated via DataManager)
@IBAction func sayHelloHAL(sender: UIButton) {
let touch = tracker.gestures.add()
touch.customObjects.add(["touchName": "Say Hello HAL"])
touch.sendTouch()
}- (IBAction)sayHelloHAL:(UIButton *)sender {
Gesture *gesture = [[tracker gestures] add:@"Click"];
[gesture.customObjects addDictionary:@{@"touchName": @"Say Hello HAL"}];
[gesture sendTouch];
}-
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