Package com.adcolony.sdk
Class AdColonyEventTracker
- java.lang.Object
-
- com.adcolony.sdk.AdColonyEventTracker
-
public class AdColonyEventTracker extends java.lang.ObjectContains static, public API methods for sending Post Install Events (PIE).
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCUSTOM_EVENT_1static java.lang.StringCUSTOM_EVENT_2static java.lang.StringCUSTOM_EVENT_3static java.lang.StringCUSTOM_EVENT_4static java.lang.StringCUSTOM_EVENT_5static java.lang.StringLOGIN_DEFAULTValid values for 'logLogin' method parameter.static java.lang.StringLOGIN_FACEBOOKstatic java.lang.StringLOGIN_GOOGLEstatic java.lang.StringLOGIN_LINKEDINstatic java.lang.StringLOGIN_OPENIDstatic java.lang.StringLOGIN_TWITTERstatic java.lang.StringREGISTRATION_CUSTOMstatic java.lang.StringREGISTRATION_DEFAULTstatic java.lang.StringREGISTRATION_FACEBOOKstatic java.lang.StringREGISTRATION_GOOGLEstatic java.lang.StringREGISTRATION_LINKEDINstatic java.lang.StringREGISTRATION_OPENIDstatic java.lang.StringREGISTRATION_TWITTERstatic java.lang.StringSOCIAL_SHARING_CUSTOMstatic java.lang.StringSOCIAL_SHARING_FACEBOOKstatic java.lang.StringSOCIAL_SHARING_FLICKRstatic java.lang.StringSOCIAL_SHARING_FOURSQUAREstatic java.lang.StringSOCIAL_SHARING_GOOGLEstatic java.lang.StringSOCIAL_SHARING_INSTAGRAMstatic java.lang.StringSOCIAL_SHARING_LINKEDINstatic java.lang.StringSOCIAL_SHARING_PINTERESTstatic java.lang.StringSOCIAL_SHARING_SNAPCHATstatic java.lang.StringSOCIAL_SHARING_TUMBLRstatic java.lang.StringSOCIAL_SHARING_TWITTERstatic java.lang.StringSOCIAL_SHARING_VIMEOstatic java.lang.StringSOCIAL_SHARING_VINEstatic java.lang.StringSOCIAL_SHARING_YOUTUBE
-
Constructor Summary
Constructors Constructor Description AdColonyEventTracker()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidlogAchievementUnlocked(java.lang.String description)Log an event when a user unlocks an achievement, e.g.static voidlogActivated()Log an event when the user activates the app of their account.static voidlogAddToCart(java.lang.String itemId)Log an event when the user adds an item(s) to a shopping cart.static voidlogAddToWishlist(java.lang.String itemId)Log an event when the user adds an item(s) to their wishlist.static voidlogAdImpression()Log an event when an ad impression has occurred.static voidlogAppOpen()Log an event when the app has opened.static voidlogAppRated()Log an event when the user has rated your application.static voidlogCheckoutInitiated()Log an event when a user has added items to their cart, but have not yet completed the checkout process.static voidlogContentView(java.lang.String contentId, java.lang.String contentType)Log a content view event.static voidlogCreditsSpent(java.lang.String name, java.lang.Integer quantity, java.lang.Double value, java.lang.String currencyCode)Log a credits spent event, e.g.static voidlogCustomEvent(java.lang.String event, java.lang.String description)Log a custom event.static voidlogEvent(java.lang.String eventName)Logs events that do not have a predefined method within this class.static voidlogEvent(java.lang.String eventName, java.util.HashMap<java.lang.String,java.lang.String> payload)Logs events that do not have a predefined method within this class.static voidlogInvite()Log an invite when a user invites friends to install or re-engage in your app or service.static voidlogLevelAchieved(java.lang.Integer levelAchieved)Log a level achieved event.static voidlogLogin(java.lang.String method)Log a login event if the user has successfully logged in.static voidlogPaymentInfoAdded()Log an event when the user has added payment information.static voidlogRegistrationCompleted(java.lang.String method, java.lang.String description)Log a 'registration completed' event, e.g.static voidlogReservation()Log a reservation event when a user has completed a reservation.static voidlogSearch(java.lang.String searchString)Log a search event when a user has completed a search.static voidlogSocialSharingEvent(java.lang.String network, java.lang.String description)Log a social sharing event, e.g.static voidlogTransaction(java.lang.String itemId, java.lang.Integer quantity, java.lang.Double price, java.lang.String currencyCode, java.lang.String receipt, java.lang.String store, java.lang.String description)Report a transaction/purchase event.static voidlogTutorialCompleted()Log an event when the user completes a tutorial.
-
-
-
Field Detail
-
SOCIAL_SHARING_FACEBOOK
public static final java.lang.String SOCIAL_SHARING_FACEBOOK
- See Also:
- Constant Field Values
-
SOCIAL_SHARING_TWITTER
public static final java.lang.String SOCIAL_SHARING_TWITTER
- See Also:
- Constant Field Values
-
SOCIAL_SHARING_GOOGLE
public static final java.lang.String SOCIAL_SHARING_GOOGLE
- See Also:
- Constant Field Values
-
SOCIAL_SHARING_LINKEDIN
public static final java.lang.String SOCIAL_SHARING_LINKEDIN
- See Also:
- Constant Field Values
-
SOCIAL_SHARING_PINTEREST
public static final java.lang.String SOCIAL_SHARING_PINTEREST
- See Also:
- Constant Field Values
-
SOCIAL_SHARING_YOUTUBE
public static final java.lang.String SOCIAL_SHARING_YOUTUBE
- See Also:
- Constant Field Values
-
SOCIAL_SHARING_INSTAGRAM
public static final java.lang.String SOCIAL_SHARING_INSTAGRAM
- See Also:
- Constant Field Values
-
SOCIAL_SHARING_TUMBLR
public static final java.lang.String SOCIAL_SHARING_TUMBLR
- See Also:
- Constant Field Values
-
SOCIAL_SHARING_FLICKR
public static final java.lang.String SOCIAL_SHARING_FLICKR
- See Also:
- Constant Field Values
-
SOCIAL_SHARING_VIMEO
public static final java.lang.String SOCIAL_SHARING_VIMEO
- See Also:
- Constant Field Values
-
SOCIAL_SHARING_FOURSQUARE
public static final java.lang.String SOCIAL_SHARING_FOURSQUARE
- See Also:
- Constant Field Values
-
SOCIAL_SHARING_VINE
public static final java.lang.String SOCIAL_SHARING_VINE
- See Also:
- Constant Field Values
-
SOCIAL_SHARING_SNAPCHAT
public static final java.lang.String SOCIAL_SHARING_SNAPCHAT
- See Also:
- Constant Field Values
-
SOCIAL_SHARING_CUSTOM
public static final java.lang.String SOCIAL_SHARING_CUSTOM
- See Also:
- Constant Field Values
-
REGISTRATION_DEFAULT
public static final java.lang.String REGISTRATION_DEFAULT
- See Also:
- Constant Field Values
-
REGISTRATION_FACEBOOK
public static final java.lang.String REGISTRATION_FACEBOOK
- See Also:
- Constant Field Values
-
REGISTRATION_TWITTER
public static final java.lang.String REGISTRATION_TWITTER
- See Also:
- Constant Field Values
-
REGISTRATION_GOOGLE
public static final java.lang.String REGISTRATION_GOOGLE
- See Also:
- Constant Field Values
-
REGISTRATION_LINKEDIN
public static final java.lang.String REGISTRATION_LINKEDIN
- See Also:
- Constant Field Values
-
REGISTRATION_OPENID
public static final java.lang.String REGISTRATION_OPENID
- See Also:
- Constant Field Values
-
REGISTRATION_CUSTOM
public static final java.lang.String REGISTRATION_CUSTOM
- See Also:
- Constant Field Values
-
CUSTOM_EVENT_1
public static final java.lang.String CUSTOM_EVENT_1
- See Also:
- Constant Field Values
-
CUSTOM_EVENT_2
public static final java.lang.String CUSTOM_EVENT_2
- See Also:
- Constant Field Values
-
CUSTOM_EVENT_3
public static final java.lang.String CUSTOM_EVENT_3
- See Also:
- Constant Field Values
-
CUSTOM_EVENT_4
public static final java.lang.String CUSTOM_EVENT_4
- See Also:
- Constant Field Values
-
CUSTOM_EVENT_5
public static final java.lang.String CUSTOM_EVENT_5
- See Also:
- Constant Field Values
-
LOGIN_DEFAULT
public static final java.lang.String LOGIN_DEFAULT
Valid values for 'logLogin' method parameter.- See Also:
- Constant Field Values
-
LOGIN_FACEBOOK
public static final java.lang.String LOGIN_FACEBOOK
- See Also:
- Constant Field Values
-
LOGIN_TWITTER
public static final java.lang.String LOGIN_TWITTER
- See Also:
- Constant Field Values
-
LOGIN_GOOGLE
public static final java.lang.String LOGIN_GOOGLE
- See Also:
- Constant Field Values
-
LOGIN_LINKEDIN
public static final java.lang.String LOGIN_LINKEDIN
- See Also:
- Constant Field Values
-
LOGIN_OPENID
public static final java.lang.String LOGIN_OPENID
- See Also:
- Constant Field Values
-
-
Method Detail
-
logTransaction
public static void logTransaction(java.lang.String itemId, java.lang.Integer quantity, java.lang.Double price, java.lang.String currencyCode, java.lang.String receipt, java.lang.String store, java.lang.String description)Report a transaction/purchase event. You can also provide additional information about the transaction like the quantity, price and currency code.- Parameters:
itemId- Identifier of item purchasedquantity- Quantity of items purchasedprice- Total price of the items purchasedcurrencyCode- The real-world three-letter ISO 4217 (e.g. USD) currency code of the transactionstore- The store the purchase was made throughreceipt- The receipt numberdescription- Description of the purchased product
-
logCreditsSpent
public static void logCreditsSpent(java.lang.String name, java.lang.Integer quantity, java.lang.Double value, java.lang.String currencyCode)Log a credits spent event, e.g. when a user applies credits to purchase something of value. You can also provide additional information about the transaction like the name, quantity, real-world value and currency code.- Parameters:
name- The type of credits the user has spentquantity- The quantity of the credits spentvalue- The real-world value of the credits spentcurrencyCode- The real-world three-letter ISO 4217 (e.g. USD) currency code of the transaction.
-
logAdImpression
public static void logAdImpression()
Log an event when an ad impression has occurred.
-
logAppOpen
public static void logAppOpen()
Log an event when the app has opened.
-
logPaymentInfoAdded
public static void logPaymentInfoAdded()
Log an event when the user has added payment information.
-
logAchievementUnlocked
public static void logAchievementUnlocked(java.lang.String description)
Log an event when a user unlocks an achievement, e.g. 'complete 200 deliveries'. You can also add a description of the achievement.- Parameters:
description- Description of the event
-
logLevelAchieved
public static void logLevelAchieved(java.lang.Integer levelAchieved)
Log a level achieved event. You can also add the level achieved by the user.- Parameters:
levelAchieved- The level achieved by the user
-
logAppRated
public static void logAppRated()
Log an event when the user has rated your application.
-
logActivated
public static void logActivated()
Log an event when the user activates the app of their account.
-
logTutorialCompleted
public static void logTutorialCompleted()
Log an event when the user completes a tutorial.
-
logSocialSharingEvent
public static void logSocialSharingEvent(java.lang.String network, java.lang.String description)Log a social sharing event, e.g. 'user shared an achievement on Facebook'. You can also provide a description of the social sharing event and denote the network on which the event was shared.- Parameters:
network- Associated Social Network (requires the SOCIAL_SHARING_* constants defined within this class)description- Description of the social sharing event - must be less than 512 characters
-
logRegistrationCompleted
public static void logRegistrationCompleted(java.lang.String method, java.lang.String description)Log a 'registration completed' event, e.g. when a user has finished the registration process. You can also denote the registration method used: Facebook, Google, etc.- Parameters:
method- The registration method used (requires the REGISTRATION_* constants defined within this class)description- Description describing the registration event. Passing a null value is allowed. Should only pass this in if you are passing in REGISTRATION_CUSTOM for the method. Will be ignored otherwise. Max 512 characters
-
logCustomEvent
public static void logCustomEvent(java.lang.String event, java.lang.String description)Log a custom event. Currently, publishers are allowed up to 5 custom events and are required to keep track of what each CUSTOM_EVENT_* corresponds to on their end.- Parameters:
event- The name of the custom event (requires the CUSTOM_EVENT_* constants defined within this class)description- The description of the custom event
-
logAddToCart
public static void logAddToCart(java.lang.String itemId)
Log an event when the user adds an item(s) to a shopping cart. You can also add the product identifier for the item purchased.- Parameters:
itemId- Identifier of item added to cart
-
logAddToWishlist
public static void logAddToWishlist(java.lang.String itemId)
Log an event when the user adds an item(s) to their wishlist. You can also add the product identifier for the item(s) added to the wishlist.- Parameters:
itemId- Identifier of item added to wishlist
-
logCheckoutInitiated
public static void logCheckoutInitiated()
Log an event when a user has added items to their cart, but have not yet completed the checkout process.
-
logContentView
public static void logContentView(java.lang.String contentId, java.lang.String contentType)Log a content view event. You can also log the content ID and content type viewed.- Parameters:
contentId- Identifier of content viewedcontentType- Type of content viewed
-
logInvite
public static void logInvite()
Log an invite when a user invites friends to install or re-engage in your app or service.
-
logLogin
public static void logLogin(java.lang.String method)
Log a login event if the user has successfully logged in.- Parameters:
method- The login method used (requires the LOGIN_* constants defined within this class)
-
logReservation
public static void logReservation()
Log a reservation event when a user has completed a reservation.
-
logSearch
public static void logSearch(java.lang.String searchString)
Log a search event when a user has completed a search.- Parameters:
searchString- Search terms, keywords, or queries
-
logEvent
public static void logEvent(java.lang.String eventName)
Logs events that do not have a predefined method within this class.- Parameters:
eventName- Name of the event
-
logEvent
public static void logEvent(java.lang.String eventName, java.util.HashMap<java.lang.String,java.lang.String> payload)Logs events that do not have a predefined method within this class.- Parameters:
eventName- Name of the eventpayload- Event passed with any additional parameters required
-
-