Class AdColonyEventTracker


  • public class AdColonyEventTracker
    extends java.lang.Object
    Contains static, public API methods for sending Post Install Events (PIE).
    • 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
      • LOGIN_DEFAULT

        public static final java.lang.String LOGIN_DEFAULT
        Valid values for 'logLogin' method parameter.
        See Also:
        Constant Field Values
    • Constructor Detail

      • AdColonyEventTracker

        public AdColonyEventTracker()
    • 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 purchased
        quantity - Quantity of items purchased
        price - Total price of the items purchased
        currencyCode - The real-world three-letter ISO 4217 (e.g. USD) currency code of the transaction
        store - The store the purchase was made through
        receipt - The receipt number
        description - 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 spent
        quantity - The quantity of the credits spent
        value - The real-world value of the credits spent
        currencyCode - 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 viewed
        contentType - 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 event
        payload - Event passed with any additional parameters required