Rokt
Datafly Signal delivers conversions to Rokt server-to-server using the Rokt Conversions API. This gives Rokt Ads reliable, closed-loop attribution that is not affected by ad blockers or browser tracking prevention.
Prerequisites
Before configuring Rokt in Signal, you need an active Rokt Ads advertiser account and an API key pair.
Step 1: Get your Rokt Account ID
Your Account ID identifies your advertiser account on every Conversions API request. If you don’t know it, ask your Rokt account manager.
Step 2: Request an API key and secret
The Conversions API uses HTTP Basic authentication with a key pair issued by Rokt:
- Contact your Rokt account manager and request API credentials for the Conversions API.
- Rokt provides a public key (begins with
rpub-) and a secret key (begins withrsec-). - Store both securely. The secret key is shown to you by Rokt and is used as the Basic-auth password.
Rokt does not currently offer self-service API key generation. The key pair is provisioned by your account team.
Step 3: Capture the Rokt Click ID (recommended)
Rokt attributes a conversion to a click most accurately when you pass the Rokt Click ID (rclid). When a visitor arrives from a Rokt placement, Rokt appends rclid to the landing-page URL. Signal captures this automatically and forwards it on every conversion, so no manual work is required as long as your landing pages preserve query parameters.
Configure in Signal
Configuration Fields
| Field | Required | Description |
|---|---|---|
account_id | Yes | Your Rokt advertiser Account ID. |
api_key | Yes | API public key (rpub-…). Used as the Basic-auth username. |
api_secret | Yes | API secret key (rsec-…). Used as the Basic-auth password. |
Management UI Setup
Add the integration
Go to Integrations > Add Integration > Rokt.
Choose a preset
- Default — purchases, sign-ups, and leads
- Retail — purchases (with margin and quantity), refunds, and sign-ups
Enter your credentials
Enter your account_id, api_key, and api_secret.
Select consent categories
Select the consent category that governs advertising (typically advertising or marketing). Conversions are only delivered for visitors who have granted consent in that category.
Save
Click Save.
API Endpoint
POST https://api.rokt.com/v1/conversionsAuthentication is HTTP Basic: Authorization: Basic base64(rpub-…:rsec-…). Conversions are sent as a JSON object with an accountId and an events array. Signal batches multiple conversions into a single request.
Identity Signals
Rokt matches each conversion to a click using one or more identifiers. The more you provide, the higher the match rate. Signal supplies these automatically where the data is available.
| Signal | Field | How Signal sources it |
|---|---|---|
| Rokt Click ID | rclid | Captured from the rclid URL parameter on the Rokt landing page. The strongest match signal. |
| Hashed email | emailsha256 | SHA-256 of the trimmed, lowercased email supplied via datafly.identify(). |
| Hashed phone | mobilesha256 | SHA-256 of the phone in E.164 format supplied via datafly.identify(). |
| IP address | ipAddress | Forwarded from the original browser request. |
| User-Agent | userAgent | Forwarded from the original browser request. |
All PII hashing is performed server-side by Signal before the data leaves your infrastructure. Raw email and phone are never sent to Rokt — only the SHA-256 hashes (emailsha256, mobilesha256).
How to Send User Data
Call datafly.identify() when a user logs in, registers, or completes checkout:
datafly.identify("user-123", {
email: "jane.doe@example.com",
phone: "+44 7700 900123"
});Signal normalises and hashes these fields automatically before sending to Rokt.
Event Mapping
Default preset
| Signal event | Rokt conversionType |
|---|---|
Order Completed | purchase |
Signed Up | signup |
Lead Generated | lead |
Retail preset
| Signal event | Rokt conversionType |
|---|---|
Order Completed | purchase |
Order Refunded | refund |
Signed Up | signup |
All other events are dropped. To customise, edit the integration’s Field Mappings in the Management UI.
Example: Purchase Event
Datafly.js call:
datafly.identify("user-123", { email: "jane.doe@example.com" });
datafly.track("Order Completed", {
order_id: "ORD-789012",
revenue: 99.99,
currency: "USD"
});Rokt Conversions API payload sent by Signal:
{
"accountId": "12345",
"events": [
{
"conversionType": "purchase",
"conversionId": "ORD-789012",
"eventTime": "2026-06-06T10:00:00Z",
"confirmationRef": "ORD-789012",
"value": 99.99,
"currency": "USD",
"rclid": "550e8400e29b41d4a716446655440001",
"emailsha256": "d8a928b2043db77e340b523547bf16cb4aa483f0645fe0a290ed1f20aab76257",
"ipAddress": "203.0.113.50",
"userAgent": "Mozilla/5.0 ..."
}
]
}Testing Your Integration
Trigger a test conversion
Complete a purchase (or fire the mapped event) on your site, ideally arriving via a URL that carries an rclid parameter so the click can be matched.
Confirm delivery in Signal
Open the Event Debugger in the Management UI and confirm the event was delivered to Rokt with a 200 response and an empty unprocessed-records list.
Confirm attribution in Rokt
Check the conversions report in your Rokt Ads dashboard. Newly delivered conversions appear after Rokt processes them. If a conversion shows as unattributed, verify the rclid (or a hashed email/phone) was present on the event.
Deduplication
If you run Rokt’s client-side conversion tag and Signal server-side delivery during a migration, deduplicate to avoid double-counting. Rokt deduplicates conversions that share the same conversionType and confirmationRef, so send identical values for both across the two integrations. Signal maps confirmationRef from your order_id by default, giving you a stable dedup key.
Troubleshooting
| Problem | Solution |
|---|---|
401 Unauthorized | Check the api_key (rpub-…) and api_secret (rsec-…) are correct and belong to the same account. |
400 Bad Request | A required identifier is missing. Ensure at least one of rclid, emailsha256, or mobilesha256 is present — call datafly.identify() with email or phone, or preserve the rclid URL parameter. |
| Conversions delivered but not attributed | The conversion reached Rokt but could not be matched to a click. Capture the rclid on landing pages, and supply hashed email/phone. |
| Wrong account in Rokt | Verify account_id matches the advertiser account whose campaigns you are measuring. |