Class InviteAttribution
The invite that caused this install or open. Immutable; delivered to an
InviteListener.
getMatchType() says how the invite was identified, and every answer is
exact:
Invites.MATCH_DIRECT-- the link opened an app that was already installed.Invites.MATCH_REFERRER-- the code travelled through Google Play and came back verbatim.Invites.MATCH_APP_CLIP-- an iOS App Clip was launched by the invite link, so it received the code exactly, and handed it to the app the person then installed.
Nothing here is matched, estimated or guessed, so a referral bounty can be paid on any of them. An earlier design added a statistical match for iOS, because the App Store carries no referrer of its own; App Clips made it unnecessary and it is gone, along with the profile of the visitor it needed.
-
Method Summary
Modifier and TypeMethodDescriptionThe campaign the invite belonged to, or null when the server could not be reached to look it up.The channel the invite was sent through, or null.longWhen the link was tapped, in milliseconds since the epoch, or 0 when nothing observed it.getCode()The invite code that was matched.doubleHow much to trust this attribution, from 0 to 1.How this attribution was established:Invites.MATCH_DIRECT,Invites.MATCH_REFERRERorInvites.MATCH_APP_CLIP.The custom parameters the inviter attached.The payload the inviter attached, or null.longWhen this attribution was resolved, in milliseconds since the epoch.booleanWhether this attribution explains the install itself, as opposed to a link opened by someone who already had the application.toString()Returns a string representation of the object.
-
Method Details
-
getCode
The invite code that was matched.
Returns
the code, never null
-
getCampaign
The campaign the invite belonged to, or null when the server could not be reached to look it up.
Returns
the campaign
-
getChannel
The channel the invite was sent through, or null.
Returns
the channel
-
getPayload
The payload the inviter attached, or null.
Returns
the payload
-
getMatchType
How this attribution was established:
Invites.MATCH_DIRECT,Invites.MATCH_REFERRERorInvites.MATCH_APP_CLIP.Returns
the match type, never null
-
getConfidence
public double getConfidence()How much to trust this attribution, from 0 to 1.
Always 1. Every match type is exact now, so there is nothing left for this to discount -- it survives because an application that branched on it should keep compiling and keep taking the same branch.
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 tapped, in milliseconds since the epoch, or 0 when nothing observed it.
Zero is a real answer and not rare. The tap is observed by whichever side of the exchange saw it: the invite redirect for a link that reached it, or the App Clip for an iOS invocation, which iOS resolves from the association file without ever reaching the redirect. An install whose tap neither side recorded has no time to report, so compare against 0 before subtracting it from anything.
Returns
the click time, or 0
-
getResolvedTimestamp
public long getResolvedTimestamp()When this attribution was resolved, in milliseconds since the epoch.
Returns
the resolution time
-
getParameters
-
toString
Description copied from class:ObjectReturns 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())
-