public final class InviteAttribution
- Object
- 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.
Methods
public String getCode() | The invite code that was matched. |
public String getCampaign() | The campaign the invite belonged to, or null when the server could not be reached to look it up. |
public String getChannel() | The channel the invite was sent through, or null. |
public String getPayload() | The payload the inviter attached, or null. |
public String getMatchType() | How this attribution was established: Invites.MATCH_DIRECT, Invites.MATCH_REFERRER or Invites.MATCH_APP_CLIP. |
public double getConfidence() | How much to trust this attribution, from 0 to 1. |
public boolean isDeferred() | Whether this attribution explains the install itself, as opposed to a link opened by someone who already had the application. |
public long getClickTimestamp() | When the link was tapped, in milliseconds since the epoch, or 0 when nothing observed it. |
public long getResolvedTimestamp() | When this attribution was resolved, in milliseconds since the epoch. |
public Map<String, String> getParameters() | The custom parameters the inviter attached. |
public String toString() | Returns a string representation of the object. |
Inherited methods
Method details
getCode
public String getCode()Returns
getCampaign
public String getCampaign()Returns
getChannel
public String getChannel()Returns
getPayload
public String getPayload()Returns
getMatchType
public String getMatchType()Invites.MATCH_DIRECT,
Invites.MATCH_REFERRER or Invites.MATCH_APP_CLIP.Returns
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
isDeferred
public boolean isDeferred()Returns
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
getResolvedTimestamp
public long getResolvedTimestamp()Returns
getParameters
public Map<String, String> getParameters()Returns
toString
public String toString()