-
Notifications
You must be signed in to change notification settings - Fork 0
Localisation
If you collect and/or use your users� geolocalisation data, you must inform these users of this data collection, the purpose of its treatment, and any possible data transfers to third parties. You must obtain the consent of the user and provide him/her the means of refusing collection and treatment of this data. You must also declare to the qualified authorities in your country that you are using localisation data in your analyses. If this data can be cross-matched with nominative personal data (measuring identified visitors with imported visitor indicators and DataExplorer subscription), you must also declare to these authorities the exact nature of the cross-matchable data.
You can add geolocalisation data (latitude, longitude) in a screen hit.
Only the two first digits after the decimal separator will be taken into account.
Once your tag is initialised, you can add geolocalisation data to your screen hits.
In the case of a Swift project, be sure to import the Tracker (or TrackerExtension if your target is an extension) module in your ViewController. In the case of an Objective-C project, be sure to import the header SmartTracker-Swift.h
-
Tagging a screen with geolocalisation data
import UIKit
import SmartTracker
class ViewController: UIViewController {
let tracker = ATInternet.sharedInstance.defaultTracker
override func viewDidLoad() {
super.viewDidLoad()
}
override func viewWillAppear(animated: Bool) {
let screen = tracker.screens.add("Map")
screen.location = Location(-21.03, longitude: 177.91)
screen.sendView()
}
}#import "ViewController.h"
#import "SmartTracker/SmartTracker-Swift.h"
@interface ViewController ()
@property (nonatomic, strong) Tracker *tracker;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.tracker = [ATInternet sharedInstance].defaultTracker;
Screen *screen = [self.tracker screens] add:@"Map"];
screen.location = [[Location alloc] initWithLatitude:-21.03 longitude:177.91];
[screen sendView];
}
@end-
Tagging a screen with geolocalisation data and use of dispatcher
import UIKit
import Tracker
class ViewController: UIViewController {
let tracker = ATInternet.sharedInstance.defaultTracker
override func viewDidLoad() {
super.viewDidLoad()
}
override func viewWillAppear(animated: Bool) {
// Track a screen with name Map
let mapScreen = tracker.screens.add("Map")
// Add location to screen hit
mapScreen.location = Location(-21.03, longitude: 177.91)
// Add a custom object
mapScreen.customObjects.add(["country":"fr"])
// Add a custom variable
mapScreen.customVars.add(1, value: "fr", type: CustomVar.CustomVarType.Screen)
// Set a level2 ID
mapScreen.level2 = 1
// Send screen hit
tracker.dispatch()
}
}#import "ViewController.h"
#import "SmartTracker/SmartTracker-Swift.h"
@interface ViewController ()
@property (nonatomic, strong) Tracker *tracker;
@end
@implementation ViewController
- (void)viewDidLoad {
[super viewDidLoad];
self.tracker = [ATInternet sharedInstance].defaultTracker;
// Track a screen with name Map
Screen *screen = [[tracker screens ] add:@"Map"];
// Add location to next screen hit
screen.location = [[Location alloc] initWithLatitude:-21.03 longitude:177.91];
// Add a custom object
[screen.customObjects addDictionary:@{@"country":@"fr"}];
// Add a custom variable
[screen.customVars add:1 value:@"fr" type:CustomVarTypeScreen];
screen.level2 = 1;
// Send screen hit
[screen sendView];
}
@end-
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