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.

FieldRequiredDescription
LINE Tag IDYesIdentifies your Tag; used in the API URL path.
Conversion API Access TokenYesIssued in Business Manager; sent as the X-Line-TagAccessToken header. Must belong to the Tag ID above.
Channel IDNoOnly required if you match on LINE User IDs (line_uid). The numeric Channel ID of the provider that issues those UIDs.

Configure in Signal

  1. In Signal, add the LINE Ads integration to your pipeline.
  2. Paste the LINE Tag ID and Conversion API Access Token.
  3. Choose the Default preset (page views plus core conversions) and map your site events to the LINE events you care about.
  4. 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/json

The 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 fieldSource in SignalNotes
user.emailemail traitSHA-256 hashed (trimmed + lowercased) before sending.
user.phonephone traitNormalised to E.164 then SHA-256 hashed.
user.click_idldtag_cl URL parameterThe LINE click ID, captured by Datafly.js on landing.
user.browser_idanonymous_idSignal’s first-party pseudonymous identifier.
web.ip_address, web.user_agentRequest contextUsed 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 eventLINE event_nameLINE event_type
pagePageViewpage_view
Order CompletedConversionconversion
Product AddedAddToCartconversion
Product ViewedViewItemDetailconversion
Products SearchedSearchconversion
Lead GeneratedLeadconversion
Signed UpCompleteRegistrationconversion

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"]
    }
  }
]

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

  1. Enable test mode in your pipeline so events carry test_flag: true.
  2. Trigger a conversion on your site (or replay one from the Event Debugger).
  3. In LINE Business Manager, open the Tag’s Conversion API status panel — accepted test events appear there shortly after delivery.
  4. 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_timestamp and that at least one user matching 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_cl parameter on ad landing pages.
  • Conversions appear at the wrong timeevent_timestamp is the time LINE accepts the event for attribution. Send events promptly and in order.
  • LINE User ID matching not workingline_uid matching also requires the Channel ID to be configured; without it, fall back to email/phone/click_id matching.