This repository was archived by the owner on May 5, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
User ID in a WebView
Benjamin Diolez edited this page May 5, 2026
·
1 revision
If your application must use a WebView and you wish to identify the user, you can retrieve the customer ID in order to then pass it in a URL parameter of your WebView. By doing so, you can use this ID with JavaScript code, for example.
As this method is asynchronous, you must implement the callback when the data is exploitable.
package com.atinternet.atinternetdemo;
import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import com.atinternet.tracker.ATInternet;
import com.atinternet.tracker.Tracker;
import com.atinternet.tracker.UserIdCallback;
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();
tracker.getUserId(new UserIdCallback() {
@Override
public void receiveUserId(String id) {
Log.d(null, "Current idclient is : " + id);
// Start your Web view here
}
});
}
}Since 2.3.0, equivalent sync method is available (Warning : it’s required to send a first hit before using it. On the contrary, a warning is sent by the SDK)
@Override
protected void onResume() {
super.onResume();
tracker.getUserIdSync();
}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