Get device information

The Adjust SDK contains methods that give you access to device information. Use these methods to add details to your callbacks and improve your reporting.

Adjust device identifier

Adjust generates a unique Adjust Device ID (ADID) for each device. Call the getAdid method to return this ID as a string.

Important:
You can access the ADID only after the Adjust backend tracks an install.
Javascript
Adjust.getAdid((adid) => {
    console.log("Adid = " + adid);
});

iOS ID for Advertisers

The ID for Advertisers (IDFA) is a device-specific identifier for Apple devices. Call the getIdfa method to return this ID as a string.

Javascript
Adjust.getIdfa((idfa) => {
    console.log("IDFA = " + idfa);
});

Google Play Services Advertising ID

The Google Play Services Advertising ID (GPS ADID) is a device-specific identifier for Android devices.

Users can opt out of sharing their Google advertising ID by toggling the "Opt out of Ads Personalization" setting on their device. When a user has enabled this setting, the Adjust SDK returns a string of zeros when trying to read the Google advertising ID.

You can access this value by calling the getGoogleAdId method in a background thread.

To do this, call the method with a string action delegate:

Javascript
Adjust.getGoogleAdId((googleAdId) => {
    console.log("Google Ad Id = " + googleAdId);
});

Amazon Advertiser ID

The Amazon Advertising ID (Amazon Ad ID) is a device-specific identifier for Android devices. Call the getAmazonAdId method to return this ID as a string.

Javascript
Adjust.getAmazonAdId((amazonAdId) => {
    console.log("Amazon Ad Id = " + amazonAdId);
});