Skip to main content

Integrate Loop’s API for Mobile App Data Collection

Learn how to integrate Loop’s API to collect and send real-time mobile app data for audience segmentation, activation and analytics.

J
Written by Juan Sebastian Franco
Updated over 3 months ago

The Loop Mobile API allows you to send real-time mobile app data to Loop for audience segmentation, analytics, and activation. This guide focuses on integrating your Android or iOS app with the API.

Step 1: Create a Mobile App Source in Loop

Before integrating, you must create a mobile app source in Loop:

  1. Navigate to Sources in the Loop platform.

  2. Click Create New.

  3. Select Mobile App.

  4. Choose the appropriate platform (Android or iOS).

  5. Set a name and description to help identify the source.

  6. Save your source; Loop will generate a source hash needed for API authentication. You can find this hash in the source details after saving.

Step 2: Build an API call

API Endpoint

Send requests to:

https://api.retargetly.com/mobile

Example Query String Request

https://api.retargetly.com/mobile?app=com.example.app&appn=Example%20App&ct=us&device=Pixel6&et=custom&ip=192.168.1.1&lan=en&mf=Google&source_hash=XYZ123&uid=abcdef-1234-5678&device_type=android

API Parameters

Parameter

Description

Type

Required parameter

Example

app

Package name of the app

String

com.example.app

ct

Country code (ISO)

String

us

device

Device model identifier

String

Pixel6

et

Event type (always custom)

String

custom

ip

Device IP address

String

192.168.1.1

source_hash

Unique hash for authentication

String

XYZ123

uid

User ID (Advertising ID for Android, IDFA for iOS)

String

abcdef-1234-5678

device_type

Mobile OS

String

android / ios

appn

App name

String

Example App

apps

List of installed apps (comma-separated)

String

Facebook,Instagram,WhatsApp

lan

Device language (ISO)

String

en

mf

Device manufacturer

String

Google

value[...]

Custom key-value pairs (hashed PII supported)

String

value[ml_sh2]=31c5543c1734d25c7206f5fd591525d0295bec6fe84ff82f946a34fe970a1e66

Step 3: Sending Data to the API

  1. Construct the query string with the required and optional parameters.

  2. Ensure that sensitive PII data is hashed using SHA-256 or SHA-512.

  3. Send the request to the Loop Mobile API endpoint.

  4. Monitor the response for any errors.

Step 4: Best Practices & Troubleshooting

Ensure all required fields are included in each request.
Use secure encryption (SHA-256/SHA-512) for personal data like emails and phone numbers.
Monitor API response codes to detect integration issues.
Validate country and device parameters before sending requests.

If you encounter errors, check your source hash, query structure, and required parameters.

Did this answer your question?