Package cn.thinkingdata.analytics.inter
Interface ITDAnalytics
-
- All Known Implementing Classes:
TDAnalytics,ThinkingDataAnalytics
public interface ITDAnalytics
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclearSuperProperties()clear common propertiesvoidclose()close and exit sdkvoidflush()report data immediatelyMap<String,Object>getSuperProperties()get super propertiesvoidsetDynamicSuperPropertiesTracker(DynamicSuperPropertiesTracker dynamicSuperPropertiesTracker)set common properties dynamically.voidsetSuperProperties(Map<String,Object> properties)set common properties.voidtrack(String accountId, String distinctId, String eventName, Map<String,Object> properties)report eventvoidtrackFirst(String accountId, String distinctId, String eventName, String firstCheckId, Map<String,Object> properties)first eventvoidtrackOverwrite(String accountId, String distinctId, String eventName, String eventId, Map<String,Object> properties)voidtrackUpdate(String accountId, String distinctId, String eventName, String eventId, Map<String,Object> properties)voidunsetSuperProperties(String key)delete property by keyvoiduserAdd(String accountId, String distinctId, Map<String,Object> properties)to accumulate operations against the propertyvoiduserAppend(String accountId, String distinctId, Map<String,Object> properties)to add user properties of array typevoiduserDelete(String accountId, String distinctId)delete user (not recommended)voiduserSet(String accountId, String distinctId, Map<String,Object> properties)set user properties.voiduserSetOnce(String accountId, String distinctId, Map<String,Object> properties)set user properties.voiduserUniqAppend(String accountId, String distinctId, Map<String,Object> properties)append user properties to array type by unique.voiduserUnset(String accountId, String distinctId, String... properties)clear the user properties of users
-
-
-
Method Detail
-
track
void track(String accountId, String distinctId, String eventName, Map<String,Object> properties) throws InvalidArgumentException
report event- Parameters:
accountId- account IDdistinctId- distinct IDeventName- nameproperties- properties- Throws:
InvalidArgumentException- data error
-
trackFirst
void trackFirst(String accountId, String distinctId, String eventName, String firstCheckId, Map<String,Object> properties) throws InvalidArgumentException
first event- Parameters:
accountId- account IDdistinctId- distinct IDeventName- namefirstCheckId- it is flag of the first eventproperties- properties- Throws:
InvalidArgumentException- data error
-
trackUpdate
void trackUpdate(String accountId, String distinctId, String eventName, String eventId, Map<String,Object> properties) throws InvalidArgumentException
- Parameters:
accountId- account IDdistinctId- distinct IDeventName- nameeventId- event IDproperties- properties- Throws:
InvalidArgumentException- data error
-
trackOverwrite
void trackOverwrite(String accountId, String distinctId, String eventName, String eventId, Map<String,Object> properties) throws InvalidArgumentException
- Parameters:
accountId- account IDdistinctId- distinct IDeventName- event nameeventId- event IDproperties- properties- Throws:
InvalidArgumentException- data error
-
setSuperProperties
void setSuperProperties(Map<String,Object> properties)
set common properties. it will add to event automatically- Parameters:
properties- common properties
-
unsetSuperProperties
void unsetSuperProperties(String key)
delete property by key- Parameters:
key- property name
-
clearSuperProperties
void clearSuperProperties()
clear common properties
-
setDynamicSuperPropertiesTracker
void setDynamicSuperPropertiesTracker(DynamicSuperPropertiesTracker dynamicSuperPropertiesTracker)
set common properties dynamically. not recommend to add the operation which with a lot of computation- Parameters:
dynamicSuperPropertiesTracker- properties
-
userDelete
void userDelete(String accountId, String distinctId) throws InvalidArgumentException
delete user (not recommended)- Parameters:
accountId- account IDdistinctId- distinct ID- Throws:
InvalidArgumentException- data error
-
userAdd
void userAdd(String accountId, String distinctId, Map<String,Object> properties) throws InvalidArgumentException
to accumulate operations against the property- Parameters:
accountId- account IDdistinctId- distinct IDproperties- properties- Throws:
InvalidArgumentException- data error
-
userSetOnce
void userSetOnce(String accountId, String distinctId, Map<String,Object> properties) throws InvalidArgumentException
set user properties. If such property had been set before, this message would be neglected.- Parameters:
accountId- account IDdistinctId- distinct IDproperties- properties- Throws:
InvalidArgumentException- data error
-
userSet
void userSet(String accountId, String distinctId, Map<String,Object> properties) throws InvalidArgumentException
set user properties. would overwrite existing names- Parameters:
accountId- account IDdistinctId- distinct IDproperties- properties- Throws:
InvalidArgumentException- data error
-
userUnset
void userUnset(String accountId, String distinctId, String... properties) throws InvalidArgumentException
clear the user properties of users- Parameters:
accountId- account IDdistinctId- distinct IDproperties- properties- Throws:
InvalidArgumentException- data error
-
userAppend
void userAppend(String accountId, String distinctId, Map<String,Object> properties) throws InvalidArgumentException
to add user properties of array type- Parameters:
accountId- account IDdistinctId- distinct IDproperties- properties- Throws:
InvalidArgumentException- data error
-
userUniqAppend
void userUniqAppend(String accountId, String distinctId, Map<String,Object> properties) throws InvalidArgumentException
append user properties to array type by unique.- Parameters:
accountId- account IDdistinctId- distinct IDproperties- properties- Throws:
InvalidArgumentException- data error
-
flush
void flush()
report data immediately
-
close
void close()
close and exit sdk
-
-