Class InviteAttribution

java.lang.Object
com.codename1.analytics.invite.InviteAttribution

public final class InviteAttribution extends Object

The invite that caused this install or open. Immutable; delivered to an InviteListener.

Read getMatchType() before acting on this. A deterministic match came through the store or from a code the user entered and is exact. A Invites.MATCH_FINGERPRINT match is a statistical guess made on the server, because the App Store carries no referrer of its own, and it is occasionally wrong. Do not pay a referral bounty on a probabilistic match without saying so.

  • Method Details

    • getCode

      public String getCode()

      The invite code that was matched.

      Returns

      the code, never null

    • getCampaign

      public String getCampaign()

      The campaign the invite belonged to, or null when the server could not be reached to look it up.

      Returns

      the campaign

    • getChannel

      public String getChannel()

      The channel the invite was sent through, or null.

      Returns

      the channel

    • getPayload

      public String getPayload()

      The payload the inviter attached, or null.

      Returns

      the payload

    • getMatchType

      public String getMatchType()

      How this attribution was established: Invites.MATCH_DIRECT, Invites.MATCH_REFERRER or Invites.MATCH_FINGERPRINT.

      Returns

      the match type, never null

    • getConfidence

      public double getConfidence()

      How much to trust this attribution, from 0 to 1. Both deterministic match types report 1; a fingerprint match reports the server's score.

      Returns

      the confidence

    • isDeferred

      public boolean isDeferred()

      Whether this attribution explains the install itself, as opposed to a link opened by someone who already had the application.

      Returns

      true when the invite caused the install

    • getClickTimestamp

      public long getClickTimestamp()

      When the link was clicked, in milliseconds since the epoch, or 0 when unknown.

      Returns

      the click time

    • getResolvedTimestamp

      public long getResolvedTimestamp()

      When this attribution was resolved, in milliseconds since the epoch.

      Returns

      the resolution time

    • getParameters

      public Map<String,String> getParameters()

      The custom parameters the inviter attached.

      Returns

      an unmodifiable, insertion ordered map, never null

    • toString

      public String toString()
      Description copied from class: Object
      Returns a string representation of the object. In general, the toString method returns a string that "textually represents" this object. The result should be a concise but informative representation that is easy for a person to read. It is recommended that all subclasses override this method. The toString method for class Object returns a string consisting of the name of the class of which the object is an instance, the at-sign character `@', and the unsigned hexadecimal representation of the hash code of the object. In other words, this method returns a string equal to the value of: getClass().getName() + '@' + Integer.toHexString(hashCode())
      Overrides:
      toString in class Object