User ID

 

Foreword

AT Internet’s SDK allows you to choose from three types of user ID in order to track your visitors. You can also choose to use a custom ID. You’ll be able to find this ID in the idclient variable present in hits.

 

Get off to a good start

The choice of type of ID to use is first made in the Tag Composer setup interface. It is also possible to modify this parameter directly in your application’s code. The different types are:

We recommend you to read the official Android best practices regarding the use of identifiers

  • UUID

The SDK generates a unique ID (called UUID) for a user when s/he uses the application for the first time. It will then always be used, unless you change the type of ID, or unless the user deletes the application from his/her phone.

  • ANDROID ID

The SDK retrieves this ID provided by Android. This ID is unique for each telephone (read more about exceptions). It will then always be used, unless you change ID type.

The SDK uses this ID as the default ID type.

  • ADVERTISING ID

The advertising ID is provided by Google, for an Android device. It is unique, but can be reset by the user. It is also subject to the user’s choice to disable ad tracking, in which case the user cannot be identified.
To use the advertising ID in your application, you must integrate, at the very least, the Google Mobile Ads module from Google Play Services, by following this procedure: https://developer.android.com/google/play-services/setup.html.

With this identification mode, the user will be considered by default as an opt-out and therefore excluded from the analyses if he has activated the limited ad tracking.

Since version 2.11.2, the AT Internet SDK allows you to modify this behavior with the configuration key ignoreLimitedAdTracking. When this configuration is active and the user has enabled limited ad tracking, the identification mode automatically switches to UUID.

  • Custom ID

With our SDK, you can force the use of a custom type of customer ID.

 

Tagging examples

For versions prior to 2.12.1, the SDK automatically switches to the Advertising ID if the format of predefined types is not respected: “androidId”, “advertisingId”, “UUID” (case sensitive).

Since version 2.12.1, the SDK automatically switches to the unique identifier (UUID) if the format of the predefined types is not respected: “androidId”, “advertisingId”, “UUID” (not case sensitive).

  1. Selecting Android ID as ID type
    • Using the method setConfig()
      ATInternet.getInstance().getDefaultTracker().setConfig("identifier", "androidId", new SetConfigCallback() {
                              @Override
                              public void setConfigEnd() {
                                  Log.d(null, "SDK is now using Android ID as visitor identifier");
                              }
                          });
    • Using the method setIdentifierType()
      ATInternet.getInstance().getDefaultTracker().setIdentifierType(Tracker.IdentifierType.androidId, new SetConfigCallback() {
                              @Override
                              public void setConfigEnd() {
                                  Log.d(null, "SDK is now using Android ID as visitor identifier");
                              }
                          });
  2. Selecting Advertising ID as ID type
    • Using the method setConfig()
      ATInternet.getInstance().getDefaultTracker().setConfig("identifier", "advertisingId", new SetConfigCallback() {
                              @Override
                              public void setConfigEnd() {
                                  Log.d(null, "SDK is now using Advertising ID as visitor identifier");
                              }
                          });
    • Using the method setIdentifierType()
      ATInternet.getInstance().getDefaultTracker().setIdentifierType(Tracker.IdentifierType.advertisingId, new SetConfigCallback() {
                              @Override
                              public void setConfigEnd() {
                                  Log.d(null, "SDK is now using Advertising ID as visitor identifier");
                              }
                          });
    • Activation of the configuration related to limited advertising tracking
      ATInternet.getInstance().getDefaultTracker().setIgnoreLimitedAdTrackingEnabled(true, null, true);
  3. Selecting UUID as ID type
    • Using the method setConfig()
      ATInternet.getInstance().getDefaultTracker().setConfig("identifier", "UUID", new SetConfigCallback() {
                              @Override
                              public void setConfigEnd() {
                                  Log.d(null, "SDK is now using UUID as visitor identifier");
                              }
                          });
    • Using the method setIdentifierType()
      ATInternet.getInstance().getDefaultTracker().setIdentifierType(Tracker.IdentifierType.UUID, new SetConfigCallback() {
                              @Override
                              public void setConfigEnd() {
                                  Log.d(null, "SDK is now using UUID as visitor identifier");
                              }
                          });
  4. Selecting a custom ID
    ATInternet.getInstance().getDefaultTracker().setParam("idclient", "123ABC");
 

Was this post helpful?

Last update: 12/06/2019