Guide

Click Tracking Links Links de Click Tracking

Use RELO short links in your ad campaigns. We own the click data, enable fraud detection, and attribute conversions back to the exact click. Usa links cortos de RELO en tus campanas de ads. Nosotros controlamos la data del click, habilitamos deteccion de fraude, y atribuimos conversiones al click exacto.

How Click Tracking Works Como Funciona el Click Tracking

Every RELO tracking link goes through our Click Wrapper at t.relo.mx, a Cloudflare Worker deployed globally across 300+ edge locations. The entire process completes in under 50ms. Cada link de tracking de RELO pasa por nuestro Click Wrapper en t.relo.mx, un Cloudflare Worker desplegado globalmente en 300+ ubicaciones de edge. Todo el proceso se completa en menos de 50ms.

// What happens when a user clicks your link:

GET https://t.relo.mx/c/AbC123

// Step 1: Look up short code in Cloudflare KV
KV.get("AbC123") -> {
  url: "https://samsungshop.onelink.me/6zKq?pid=affiliate_relo...",
  partner_id: 9,
  client_id: 3,
  campaign_id: 4
}

// Step 2: Generate unique click ID (ULID - sortable, includes timestamp)
click_id = "01HXYZ123456789ABCDEFGHIJ"

// Step 3: Capture Cloudflare headers (zero-cost, already available at edge)
ip, country, city, device_type, browser, os, referer, tcp_rtt

// Step 4: Fire click event to Go backbone (async, non-blocking)
POST ingest.relo.mx/postback/click { click_id, partner_id, ... }

// Step 5: Set first-party cookie for web-to-app attribution
Set-Cookie: _relo_cid=01HXYZ...; Domain=.relo.mx; Max-Age=2592000; SameSite=Lax; Secure

// Step 6: 302 redirect to destination with click_id appended
302 -> https://samsungshop.onelink.me/6zKq?pid=...&relo_click_id=01HXYZ...
Key benefit: The redirect always happens, even if the backbone is down. Click data capture is fire-and-forget with a 3-tier failover chain. Beneficio clave: El redirect siempre ocurre, incluso si el backbone esta caido. La captura de datos del click es fire-and-forget con una cadena de failover de 3 niveles.

Getting Your Tracking Link Obteniendo tu Link de Tracking

Option 1: From the Portal Opcion 1: Desde el Portal

Go to Portal → Assets → Links or use the Link Generator tool in the admin dashboard. Your link looks like: Ve a Portal → Assets → Links o usa la herramienta Link Generator en el dashboard de admin. Tu link se ve asi:

https://t.relo.mx/c/AbC123

Option 2: Via API Opcion 2: Via API

Create short links programmatically by calling the Link Generator API: Crea links cortos programaticamente llamando a la API de Link Generator:

POST https://relo-api.quomx.workers.dev/api/partners/9/generate-link
Authorization: Bearer YOUR_TOKEN
Content-Type: application/json

{
  "client_id": 3,
  "product_url": "https://www.samsung.com/mx/smartphones/galaxy-s24/",
  "product_name": "Galaxy S24 Ultra"
}

// Response:
{
  "ios_url": "https://samsungshop.onelink.me/6zKq?pid=affiliate_relo&c=mx_pd_...",
  "android_url": "https://samsungshop.onelink.me/6zKq?pid=affiliate_relo&c=mx_pd_...",
  "params": {
    "pid": "affiliate_relo",
    "c": "mx_pd_affiliate_relo_none_always-on_sub1_banner_none_conversion",
    "af_sub1": "sub1",
    "af_sub3": "mobupps",
    "deep_link_value": "samsungestore://openwebview#url=https://..."
  }
}

Data Captured Per Click Datos Capturados por Click

Every click captures the following fields from Cloudflare edge headers, at zero additional cost: Cada click captura los siguientes campos de los headers de edge de Cloudflare, sin costo adicional:

FieldCampo SourceFuente ExampleEjemplo
click_idULID01HXYZ123456789ABCDEFGHIJ
timestampULID embeddedEmbebido en ULID2026-03-18T15:30:00Z
ipCF-Connecting-IP187.190.42.100
countryCF-IPCountryMX
citycf.cityCiudad de Mexico
regioncf.regionDistrito Federal
latitude / longitudecf.latitude / cf.longitude19.43, -99.13
device_typeUser-Agentmobile
browserUser-AgentChrome 122
osUser-AgentAndroid 14
refererReferer headerhttps://facebook.com
tcp_rttcf.clientTcpRtt45 (ms)
colocf.coloMEX (edge PoP)

CTIT Fraud Detection Deteccion de Fraude CTIT

CTIT (Click-to-Install Time) measures the time between a click and the resulting conversion. This is one of the most effective fraud signals in mobile attribution. CTIT (Click-to-Install Time) mide el tiempo entre un click y la conversion resultante. Esta es una de las senales de fraude mas efectivas en atribucion movil.

Because RELO owns the click timestamp (not relying on the MMP), we can calculate CTIT independently: Como RELO es dueno del timestamp del click (no dependemos del MMP), podemos calcular CTIT independientemente:

// CTIT = conversion_time - our_click_time

Normal CTIT: 30 seconds - 48 hours
  User clicks ad -> browses -> installs -> opens app -> purchases

Suspicious CTIT: < 10 seconds
  Likely click injection: malware fires a click right before
  a legitimate install to "steal" the attribution

Suspicious CTIT: > 7 days
  Stale click being matched to organic install

// Fraud scoring in the Go backbone:
CTIT < 10s   -> fraud_score += 80  (click injection)
CTIT < 2s    -> fraud_score += 120 (definite click spam)
CTIT > 7d    -> fraud_score += 40  (stale attribution)
Why we own the click: If we relied on AppsFlyer's click timestamp, fraudsters could manipulate the reported click time. By capturing our own timestamp at the Cloudflare edge, CTIT calculation is tamper-proof. Por que somos duenos del click: Si dependieramos del timestamp de click de AppsFlyer, los fraudsters podrian manipular el tiempo reportado. Al capturar nuestro propio timestamp en el edge de Cloudflare, el calculo de CTIT es a prueba de manipulacion.

Click-to-Conversion Attribution Flow Flujo de Atribucion Click-a-Conversion

1

User clicks your RELO tracking link Usuario hace click en tu link de tracking RELO

Click Wrapper generates a ULID click_id, stores it in the user's cookie, and records the click in ClickHouse with all metadata (IP, geo, device, partner_id). El Click Wrapper genera un ULID click_id, lo guarda en la cookie del usuario, y registra el click en ClickHouse con todos los metadatos (IP, geo, dispositivo, partner_id).

2

User is redirected to the destination Usuario es redirigido al destino

302 redirect sends the user to the OneLink/Branch URL with relo_click_id appended. The MMP (AppsFlyer/Branch) picks up the click_id for attribution. El redirect 302 envia al usuario a la URL de OneLink/Branch con relo_click_id adjunto. El MMP (AppsFlyer/Branch) toma el click_id para atribucion.

3

User opens the app / lands on the website Usuario abre la app / llega al sitio web

For app installs, AppsFlyer/Branch matches the user via device ID or probabilistic matching. For web, the _relo_cid cookie links the browser session to the original click. Para instalaciones de app, AppsFlyer/Branch matchea al usuario via device ID o matching probabilistico. Para web, la cookie _relo_cid enlaza la sesion del navegador con el click original.

4

Conversion event fires Se dispara el evento de conversion

The purchase event arrives via S2S postback (from AppsFlyer) or via the web pixel. The Go backbone matches click_id in DragonflyDB, calculates CTIT, runs the fraud scorer, and writes the attributed sale to ClickHouse + Supabase. El evento de compra llega via postback S2S (de AppsFlyer) o via el pixel web. El backbone en Go matchea el click_id en DragonflyDB, calcula CTIT, corre el scorer de fraude, y escribe la venta atribuida en ClickHouse + Supabase.

3-Tier Failover Chain Cadena de Failover de 3 Niveles

The click wrapper never blocks the user redirect. Click event capture uses a fire-and-forget pattern with 3 tiers of fallback: El click wrapper nunca bloquea el redirect del usuario. La captura del evento de click usa un patron fire-and-forget con 3 niveles de fallback:

// Tier 1: Primary - Go service on Hetzner (3s timeout)
POST https://ingest.relo.mx/postback/click
  -> Success? Done.
  -> Timeout/Error? Fall through to Tier 2.

// Tier 2: Standby - Warm standby VPS (5s timeout)
POST https://standby.relo.mx/postback/click
  -> Success? Done. Events replayed to primary later.
  -> Timeout/Error? Fall through to Tier 3.

// Tier 3: KV Buffer - Cloudflare KV (always succeeds)
KV.put("click:{click_id}", eventJSON, { expirationTtl: 86400 })
  -> Go service polls KV every 30s and replays buffered events.

// In all cases: the 302 redirect fires immediately.
// User experience is never affected by backend failures.

Integration with Deep Links Integracion con Deep Links

RELO tracking links integrate with both AppsFlyer OneLink and Branch.io deep links. The generated URL includes parameters for: Los links de tracking de RELO se integran tanto con AppsFlyer OneLink como con Branch.io deep links. La URL generada incluye parametros para:

ParameterParametro PurposeProposito ExampleEjemplo
pidMedia sourceFuente de mediosaffiliate_relo
cCampaign name with CIDNombre de campana con CIDmx_pd_affiliate_relo_none_always-on_sub1_...
af_sub1Partner CIDCID del partnersub1
af_sub3Partner nameNombre del partnermobupps
af_adAsset tracking IDID de tracking del assetSAM-MX-A1B2C3
deep_link_valueApp deep linkDeep link de la appsamsungestore://openwebview#url=...
relo_click_idOur click ID for CTITNuestro click ID para CTIT01HXYZ...

Full Example: End to End Ejemplo Completo: De Punta a Punta

// 1. Partner Mobupps creates a link for Galaxy S24 via the portal
//    Link generated: https://t.relo.mx/c/GxS24m

// 2. Mobupps uses this link in a Facebook ad campaign

// 3. User in Mexico City clicks the ad at 3:15 PM
GET https://t.relo.mx/c/GxS24m
  -> click_id: 01J5KR3N7YMQP8X2VFTG4WDHAB
  -> ip: 187.190.42.100, country: MX, city: Ciudad de Mexico
  -> device: iPhone 15 Pro, browser: Safari 17, os: iOS 17
  -> partner_id: 9 (Mobupps), client_id: 3 (Samsung)

// 4. User redirected to Samsung Shop app via OneLink
302 -> https://samsungshop.onelink.me/6zKq?pid=affiliate_relo
       &c=mx_pd_affiliate_relo_none_always-on_sub1_banner_none_conversion
       &relo_click_id=01J5KR3N7YMQP8X2VFTG4WDHAB

// 5. User purchases Galaxy S24 Ultra at 3:22 PM (7 minutes later)
// AppsFlyer fires S2S postback to ingest.relo.mx
// CTIT = 7 min -> normal range -> fraud_score = 0

// 6. Sale attributed to Mobupps, appears in dashboard within 10 min