-
Notifications
You must be signed in to change notification settings - Fork 0
Location
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.
If you want to use variables, be sure to import ATInternet, Tracker, Screen and Location classes in your Activity.
- Tagging a screen with geolocalisation data
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();
}
@Override
protected void onResume() {
super.onResume();
Screen s = tracker.Screens().add("Map");
s.Location(21.03, 177.76);
s.sendView();
}
}- Tagging a screen with geolocalisation data and use of dispatcher
package com.atinternet.atinternetdemo;
import android.app.Activity;
import android.os.Bundle;
import com.atinternet.tracker.ATInternet;
import com.atinternet.tracker.CustomVar;
import com.atinternet.tracker.Tracker;
import java.util.HashMap;
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();
}
@Override
protected void onResume() {
super.onResume();
Screen s = tracker.Screens().add("Map");
// Add location to next screen hit
s.Location(21.03, 177.76);
// Add a custom object
s.CustomObjects().add(new HashMap<String, Object>() {{
put("country", "fr");
}});
// Add a custom variable
s.CustomVars().add(1, "fr", CustomVar.CustomVarType.Screen);
// Track a screen with name Map
s.setLevel2(1);
// Send screen hit
tracker.dispatch();
}
}| Name | Type | Default value | Description |
|---|---|---|---|
| latitude | Double | -1.0 | Gets or sets latitude |
| longitude | Double | -1.0 | Gets or sets longitude |
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