LINE Ads
Datafly Signal delivers events to LINE Ads server-to-server using the LINE Conversion API v1. Instead of relying on the browser-side LINE Tag (which is increasingly blocked by ad-blockers and browser tracking prevention), Signal sends page views and conversions directly from your first-party endpoint to LINE, with hashed email and phone, the LINE click ID, and IP/user-agent for identity matching.
Prerequisites
- A LINE Ads account with a LINE Tag created in LINE Business Manager.
- The Conversion API enabled for that Tag, which gives you:
- the LINE Tag ID (used in the API URL path), and
- a Conversion API access token (sent as an HTTP header).
- Datafly.js deployed on your site, sending events to your Signal collector endpoint.
Configuration
In LINE Business Manager, open your Tag, enable the Conversion API, and copy the LINE Tag ID and access token.
| Field | Required | Description |
|---|---|---|
| LINE Tag ID | Yes | Identifies your Tag; used in the API URL path. |
| Conversion API Access Token | Yes | Issued in Business Manager; sent as the X-Line-TagAccessToken header. Must belong to the Tag ID above. |
| Channel ID | No | Only required if you match on LINE User IDs (line_uid). The numeric Channel ID of the provider that issues those UIDs. |
Configure in Signal
- In Signal, add the LINE Ads integration to your pipeline.
- Paste the LINE Tag ID and Conversion API Access Token.
- Choose the Default preset (page views plus core conversions) and map your site events to the LINE events you care about.
- Save and deploy the pipeline.
API Endpoint
POST https://conversion-api.tr.line.me/v1/{line_tag_id}/events
X-Line-TagAccessToken: <access token>
Content-Type: application/jsonThe request body is a JSON array of event objects. A successful request returns HTTP 202 Accepted.
Identity Signals
LINE matches each event to a LINE user using whichever of these Signal provides. The more you send, the higher your match rate.
| LINE field | Source in Signal | Notes |
|---|---|---|
user.email | email trait | SHA-256 hashed (trimmed + lowercased) before sending. |
user.phone | phone trait | Normalised to E.164 then SHA-256 hashed. |
user.click_id | ldtag_cl URL parameter | The LINE click ID, captured by Datafly.js on landing. |
user.browser_id | anonymous_id | Signal’s first-party pseudonymous identifier. |
web.ip_address, web.user_agent | Request context | Used by LINE for probabilistic fallback matching. |
Conversions are deduplicated by LINE for 30 days on event_name + deduplication_key. Signal sets deduplication_key from the event’s message_id, so retries never double-count.
Event Mapping
Signal uses GA4-style snake_case event names and maps them to LINE event types and names. page becomes event_type: page_view; conversions use event_type: conversion with a descriptive event_name (Conversion is LINE’s default purchase conversion; other names are tracked as custom conversions).
| Signal event | LINE event_name | LINE event_type |
|---|---|---|
page | PageView | page_view |
Order Completed | Conversion | conversion |
Product Added | AddToCart | conversion |
Product Viewed | ViewItemDetail | conversion |
Products Searched | Search | conversion |
Lead Generated | Lead | conversion |
Signed Up | CompleteRegistration | conversion |
Example
A purchase tracked with Datafly.js:
datafly.track("Order Completed", {
order_id: "ORD-1024",
revenue: 4980,
currency: "JPY",
product_ids: ["SKU-1", "SKU-2"],
});Resulting LINE Conversion API request body:
[
{
"event": {
"source_type": "web",
"event_type": "conversion",
"event_name": "Conversion",
"deduplication_key": "01J9X2K7Q8M3...",
"event_timestamp": 1749200000
},
"user": {
"email": "8f4e9c...c1",
"phone": "a17b2d...9f",
"click_id": "Cl1abc...",
"browser_id": "df-9a8b7c6d"
},
"web": {
"url": "https://shop.example.jp/thanks",
"referrer": "https://shop.example.jp/checkout",
"title": "Thank you",
"ip_address": "203.0.113.10",
"user_agent": "Mozilla/5.0 ..."
},
"custom": {
"value": 4980,
"currency": "JPY",
"item_ids": ["SKU-1", "SKU-2"]
}
}
]Consent
When the visitor has not granted marketing consent (context.consent.canonical.marketing is false), the event is dropped before delivery, so no data reaches LINE. Configure your consent categories in Signal Settings so this maps correctly for your CMP.
Testing
- Enable test mode in your pipeline so events carry
test_flag: true. - Trigger a conversion on your site (or replay one from the Event Debugger).
- In LINE Business Manager, open the Tag’s Conversion API status panel — accepted test events appear there shortly after delivery.
- Confirm Signal logged an HTTP 202 response for the delivery.
Troubleshooting
- 401 Unauthorized — the access token is wrong or not associated with this LINE Tag ID. Re-issue it in Business Manager.
- 400 Bad Request — a malformed field; LINE rejects the whole request. Check
event_timestampand that at least oneusermatching field is present. - Events accepted but no conversions attributed — user matching failed. Add more identity signals (hashed email/phone, the LINE click ID) and confirm Datafly.js is capturing the
ldtag_clparameter on ad landing pages. - Conversions appear at the wrong time —
event_timestampis the time LINE accepts the event for attribution. Send events promptly and in order. - LINE User ID matching not working —
line_uidmatching also requires the Channel ID to be configured; without it, fall back to email/phone/click_id matching.