Disable COPPA (Children's Online Privacy Protection Act) restrictions on IDFA, IDFV, city, IP address and location tracking.
Enable COPPA (Children's Online Privacy Protection Act) restrictions on IDFA, IDFV, city, IP address and location tracking.
This can be used by any customer that does not want to collect IDFA, IDFV, city, IP address and location tracking.
Enable/disable message logging by the SDK.
whether to enable message logging by the SDK.
Fetches the deviceId, a unique identifier shared between multiple users using the same app on the same device.
the deviceId.
Fetches the sessionId, a timestamp used for log session event.
the sessionId.
Set or update properties of particular groups
Send an identify call containing user property operations to Amplitude servers.
Tracks an event. Events are saved locally. Uploads are batched to occur every 30 events or every 30 seconds (whichever comes first), as well as on app close.
The name of the event you wish to track.
The event's properties.
Extra untyped parameters for use in middleware.
Log revenue data.
Note: price is a required field to log revenue events. If quantity is not specified then defaults to 1.
Regenerate the DeviceId
Use the Advertising ID on Android if available from Google Play Services. Must be called before init.
Use the App Set ID (fall back to this if useAdvertisingIdForDeviceId
is used) for device ID.
Must be called before init.
Sets a custom device id. Note: only do this if you know what you are doing!
The device id.
Sets event upload max batch size. This controls the maximum number of events sent with each upload request.
the event upload max batch size
Sets event upload period millis. The SDK will attempt to batch upload unsent events every eventUploadPeriodMillis milliseconds, or if the unsent event count exceeds the event upload threshold.
the event upload period millis
Sets event upload threshold. The SDK will attempt to batch upload unsent events every eventUploadPeriodMillis milliseconds, or if the unsent event count exceeds the event upload threshold.
the event upload threshold
Adds a user to a group or groups. You need to specify a groupType and groupName(s).
Set log callback, it can help read and collect error message from sdk. The call back function like the following format (tag: string, message: string) => { //implement your own logic }
Sets the logging level. Logging messages will only appear if they are the same severity level or higher than the set log level.
the log level
Sets the minimum cutoff time in millisseconds for sessions to be considered distinct. The default time is 5 minutes.
Enables tracking opt out.
If the user wants to opt out of all tracking, use this method to enable opt out for them. Once opt out is enabled, no events will be saved locally or sent to the server.
Calling this method again with enabled set to false will turn tracking back on for the user.
Sets tracking plan information.
Plan object
Customize the destination for server url.
Set Amplitude Server Zone, switch to zone related configuration, including dynamic configuration. If updateServerUrl is true, including server url as well. Recommend to keep updateServerUrl to be true for alignment.
amplitude serverZone, US or EU, default is US
if update server url when update server zone, recommend setting true
Dynamically adjust server URL
If your app has its own login system that you want to track users with, you can set the userId.
Adds properties that are tracked on the user level. Note: Property keys must be [String] objects and values must be serializable.
Whether to automatically log start and end session events corresponding to the start and end of a user's session.
Upload all unsent events.
Generated using TypeDoc
Clears all properties that are tracked on the user level.
Note: This operation is irreversible!!