The Amp Devcenter Test Developer Hub

Welcome to the Amp Devcenter Test developer hub. You'll find comprehensive guides and documentation to help you start working with Amp Devcenter Test as quickly as possible, as well as support if you get stuck. Let's jump right in!

Get Started    

Disabling Automatic Tracking of Properties

Disabling Tracking on Android

By default the Android SDK will track several user properties such as carrier, city, country, ip_address, language, platform, etc. You can use the provided TrackingOptions interface to customize and disable individual fields.

To use the TrackingOptions interface, you will first need to import the class.

import com.amplitude.api.TrackingOptions;

Before initializing the SDK with your apiKey, create a TrackingOptions instance with your configuration and set it on the SDK instance

TrackingOptions options = new TrackingOptions().disableCity().disableIpAddress().disableLatLng();
Amplitude.getInstance().setTrackingOptions(options);

Each field can be individually disabled and has a corresponding disable method (for example, disableCountry, disableLanguage, etc.). This table describes the different methods:

MethodDescription
disableAdid()Disable tracking of Google ADID
disableCarrier()Disable tracking of device's carrier
disableCity()Disable tracking of user's city
disableCountry()Disable tracking of user's country
disableDeviceBrand()Disable tracking of device brand
disableDeviceModel()Disable tracking of device model
disableDma()Disable tracking of user's dma
disableIpAddress()Disable tracking of user's ip address
disableLanguage()Disable tracking of device's language
disableLatLng()Disable tracking of user's current lattitude and longitude coordinates
disableOsName()Disable tracking of device's OS Name
disableOsVersion()Disable tracking of device's OS Version
disablePlatform()Disable tracking of device's platform
disableRegion()Disable tracking of user's couregiontry
disableVersionName()Disable tracking of your app's version name

Disabling Tracking on iOS

By default the iOS SDK will track several user properties such as carrier, city, country, ip_address, language, platform, etc. You can use the provided AMPTrackingOptions interface to customize and disable individual fields.
Note: Each operation on the AMPTrackingOptions object returns the same instance which allows you to chain multiple operations together.

To use the AMPTrackingOptions interface, you will first need to include the header:

#import "AMPTrackingOptions.h"

Before initializing the SDK with your apiKey, create a AMPTrackingOptions instance with your configuration and set it on the SDK instance

AMPTrackingOptions *options = [[[[AMPTrackingOptions options] disableCity] disableIPAddress] disablePlatform];
[[Amplitude instance] setTrackingOptions:options];

Each field can be individually disabled and has a corresponding disable method (for example, disableCountry, disableLanguage, etc.). This table describes the different methods:

MethodDescription
disableCarrierDisable tracking of device's carrier
disableCityDisable tracking of user's city
disableCountryDisable tracking of user's country
disableDeviceManufacturerDisable tracking of device manufacturer
disableDeviceModelDisable tracking of device model
disableDMADisable tracking of user's DMA
disableIDFADisable tracking of user's IDFA
disableIDFVDisable tracking of user's IDFV
disableIPAddressDisable tracking of user's IP address
disableLanguageDisable tracking of device's language
disableLatLngDisable tracking of user's current lattitude and longitude coordinates
disableOSNameDisable tracking of device's OS Name
disableOSVersionDisable tracking of device's OS Version
disablePlatformDisable tracking of device's platform
disableRegionDisable tracking of user's couregiontry
disableVersionNameDisable tracking of your app's version name

Disabling Tracking on JavaScript

By default, the JS SDK will track a number of properties automatically. You can override this behavior by passing an object called trackingOptions when initializing the SDK, setting the appropriate options to false. These options are listed below:

ParameterDefault Value
citytrue
countrytrue
carriertrue
device_manufacturertrue
device_modeltrue
dmatrue
ip_addresstrue
languagetrue
os_nametrue
os_versiontrue
platformtrue
regiontrue
version_nametrue

Updated 15 days ago


Disabling Automatic Tracking of Properties


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.