Analytics S2S
Overview
For server-to-server integration with Liftoff, fill out the following template with the relevant user and event information by replacing each macro with its value, and then use the completed URL to send this information back to Liftoff with a GET request. This is similar, if not identical, to the information passed in the MMP integration.
Authentication
Add the following header to your requests:
"Authorization": "Bearer API_KEY"
Your API_KEY can be found in the developer page within the customer dashboard.
Macros
Postback URL Template:
https://analytics.liftoff.io/v2/events?test_mode=1&liftoff_app_id={liftoff_app_id}&...
The following macros are required and must be completed for every postback:
{liftoff_app_id} | Liftoff-specific app id (found in the developer page within the customer dashboard) |
---|---|
{client_ip} | The device's IP address. For the most accurate data, we recommend using IPv6 whenever it's available. |
{event_name} | The name of the event that the postback corresponds to, e.g. "install", "purchase". For installs, it should be "install". Please do not use programmatically generated strings as event names; instead, use hard-coded strings such as "signup" that describe a general point in your application's user flow. |
{event_timestamp} | The timestamp that the event occurred at, in milliseconds since epoch (e.g. "1600297099000"). Liftoff will default to the current timestamp if this parameter is omitted or contains an invalid value. |
{language} | The language of the device (2-letter ISO-639-1 language code) or the user's most preferred language for iOS. |
{device_model} | The device model utsname.machine (e.g. "iPhone12,5") |
{platform} | "android" or "ios" |
At least one of the following macros is required, and we recommend sending as many as possible.
{user_id} | A persistent identifier for the user in the current app. This is not the IDFA and cannot be used to track the user across apps. |
---|---|
{idfv} | For iOS devices, the Identifier For Vendor is a persistent unique identifier for a user across apps from a single vendor. |
{device_id} | The iOS ID for Advertising for iOS (if available). The Google Advertising ID for Android. |
The following macros are optional, but please include if you support them:
{user_agent} | The device user agent (e.g. "Mozilla/5.0 (iPhone; CPU iPhone OS 11_4 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/11.0 Mobile/15E148 Safari/604.1") |
---|---|
{app_version} | The version of your app this event was triggered in |
{bundle_id} | The bundle ID of your app (e.g. "com.acme.ios") |
{os_version} | The version of OS the user is running |
{revenue} | Non-zero for events which have a transaction amount associated with them. This allows us to optimize directly for revenue in. |
{currency_code} | 3-letter ISO 4217 currency code for the associated revenue (e.g. "USD"). A full list of currency codes can be found here. |
{is_first_event} | Whether this is the first time this event name has been triggered for this user (e.g. "true" for a user's first in-app-purchase, but "false” for their second) |
{install_timestamp} | The timestamp of the corresponding install, in milliseconds since epoch (e.g. "1600297099000"). Note that this is not the same as the time the event occurred at |
{test_mode} | If the parameter is provided ("test_mode=1") then the event is sent to the test harness dashboard. Omit this parameter in production. There is a rate limit on test mode requests to keep the dashboard from becoming filled with too many test requests. If you find yourself running into the rate limit in testing, contact your AM. |
Verify that it's working
Verify the integration by previewing the postbacks sent to Liftoff using the testing harness dashboard (link is displayed in the developer page within the customer dashboard). Contact your AM if you have any questions.