Follow

Identity Lookup Syntax

The identity lookup configuration is a comma-separated list of expressions, telling TROPHiT how to extract identity information from your tracker's attribution data. During redemption, TROPHiT tries to extract the identity from all attribution data provided by the integration, using those expressions, in the order they are specified on the list. Once an expression is considered matched (more on this below), TROPHiT will consider it to be the extracted identity and will not continue to process subsequent expressions on the list.

An expression can be one of the following:

  • A simple placeholder: a name of some attribution data property, surrounded by curly brackets: {property_name}. This expression is matched if the property is non-empty. If the property is empty or does not exist, the expression is resolved to an empty value and is not considered matched. For example:
    For AppsFlyer users, the expression {customer_user_id} would resolve to AppsFlyer's customer_user_id attribution property

  • A sub-placeholder: in case attribution properties have sub-elements, either as JSON properties or URL parameters, you can use this placeholder to lookup an identity inside a sub-element at any "depth". Use dot notation to specify sub-properties while still surrounding everything in curly brackets: {property_name.sub_name.sub_name....}. This expression is matched if the sub-property exists at the specified "path" and is non-empty. For example:

    Consider an AppsFlyer event whose data contains a "link" with value "myapp://?view=main&user=1234". AppsFlyer passes such event data as in attribution property:

    "event_value": {"data": {"link": "myapp://?view=main&user=1234"}}


    An expression like {event_value.data.link.user} would be resolved to 1234 in this case.

  • A composite expression: any combination of two or more simple or sub placeholder expressions:
    {one}{two}...
    Such an expression is matched if and only if at least one of the included expressions are matched. For example, if {one} is resolved to 1234 and {two} is resolved to 5678, then the entire expression is resolved to 13245678 as the user identity. If both {one} and {two} are not matched, then the entire expression is not matched.

    You can also add literals in-between expressions, e.g. {one}|{two}. In this case, the identity would be resolved to 1234|5678. Note literals do not affect matching: if both {one} and {two} are empty, then the entire expression is resolved to literals only: "|", which is not considered matched because as described earlier, a match only happens if at least {one} or {two} are matched.

Here are some noteworthy attribution properties commonly used in expressions by the default integration instructions of TROPHiT. For detailed information about attribution data structure, refer to your app's Integration page in your TROPHiT dashboard.

  • AppsFlyer's {customer_user_id}: corresponds to the SDK's setCustomerUserId value
  • Adjust's {user_id}: corresponds to the SDK's custom "user_id" parameter
  • Tune's {user_id}: corresponds to the SDK's setUserId value
  • Kochava's {identity_link}: corresponds to the SDK's identity link
  • TROPHiT's {$userId}: corresponds to the TROPHiT SDK setUserId parameter (only applicable when using server-side 'Other' tracker integration or client-side integration)

As an example, let's explain TROPHiT's out-of-the-box Player lookup configuration for AppsFlyer:
{customer_user_id},{$userId}

  • TROPHiT first looks up the user identity as set by AppsFlyer's SDK using the setCustomerUserId method. This applies to server-side integrations of TROPHiT, which receives this information.
  • The second expression resolves $userId, which is a special property set through TROPHiT's server-side integration for 'Other' (aka generic) trackers or client-side SDK using the setUserId method.
  • Therefore, this single lookup configuration would successfully resolve user IDs regardless of how TROPHiT was integrated.

0 Comments

Please sign in to leave a comment.
Powered by Zendesk