LINE Yahoo Conversion API for sGTM: step-by-step setup

Ieva Dubricke

Ieva Dubricke

Author
Published
Aug 24, 2026

The LINE Yahoo Conversion API (Display Ads) allows you to send conversion data from your server directly to LINE Yahoo servers, where it’s used to measure and optimize your Display Ads campaigns.

With the LINE Yahoo Conversion API, tracking becomes more accurate and more resilient. LINE Yahoo supports a hybrid tracking method, web + server, where the browser-side Measurement tag and the server-side Conversion API tag work together. When you combine both, deduplication is required. To match events with users, LINE Yahoo relies on first-party identifiers: an anonymous ID, a click ID, a LINE User ID, and hashed customer data such as email and phone number.

This guide will discuss how the LINE Yahoo Conversion API works and how to set up the LINE Yahoo Conversion API tag (Display Ads) in sGTM.

i

Note:

This tag is designed for users in Japan. Screenshots in this guide show the Japanese Campaign Management Tool interface, as well as a Japanese version of this tag is available for users with GTM set to Japanese.

Benefits of LINE Yahoo Conversion API tag

  • Improved tracking reliability and resilience. The tag sends conversion events directly from the sGTM container to LINE Yahoo's Conversion API, bypassing browser limitations, ad blockers, and Intelligent Tracking Prevention (ITP).
  • Enhanced attribution through cookie management. Automatically reads and sets Anonymous ID, Click ID, and Complementary Click ID cookies on the server side to extend cookie lifetime and improve attribution.
  • Event deduplication. Uses Transaction ID / Event ID matching to deduplicate events between the browser-side Measurement Tag and the Conversion API, ensuring accurate metrics without double counting.
  • Automated PII privacy protection. Hashes sensitive customer identifiers (emails and phone numbers) using SHA-256 before transmission.
  • Automatic GA4 event mapping. Transforms standard GA4 event names (for example, purchase, add_to_cart, begin_checkout) into LINE Yahoo event types automatically.
  • Faster server performance. The tag offers an Optimistic Scenario mode to respond to incoming requests immediately without waiting for the LINE Yahoo API response, minimizing latency.

How the LINE Yahoo Conversion API works

1. A person clicks your ad in the LINE Yahoo Display Ads network. LINE Yahoo assigns identifiers to this interaction, such as:

  • Click ID (yclid) – a unique identifier added to the landing page URL after an ad click. The tag can store it in a server-side first-party cookie (_ly_c) so it stays persistent across page views.
  • Complementary Click ID – a backup click parameter stored in the _ly_r cookie, used as a fallback when URL parameters or cookies are stripped or shortened by browser privacy protections such as Safari ITP.
  • Anonymous ID – an identifier stored in the _ly_su cookie that groups multiple events from the same unauthenticated browser sessions over time.
  • Other user identifiers, such as a hashed email, a hashed phone number, a LINE User ID, or a Mobile ID (IDFA / AAID), can also be used for matching.

2. The visitor then completes a conversion event: a product view, an add to cart, a purchase. Instead of sending that event from the browser, your server container sends a direct API request to LINE Yahoo. As a result, the data is more precise and far less affected by ad blockers and browser restrictions.

3. The API authenticates each request with the Tag ID and Tag Access Token generated in your Yahoo Campaign Management Tool.

4. After receiving the event, LINE Yahoo tries to match it with a previous ad engagement using the click ID, the anonymous ID, the LINE User ID, or hashed customer data. If a match is found, the conversion is attributed to the corresponding ad campaign.

5. Because the same conversion is often reported twice, once by the web Measurement tag and once by the Conversion API, the tag sends a Transaction ID / Event ID with every event so LINE Yahoo can deduplicate them and avoid double counting.

Before you begin

To complete this setup, you will need to create a sGTM container and send data from the web to the sGTM container. You will also need to set up the LINE Yahoo Measurement tag on the web container, and prepare the following credentials:

How to set up LINE Yahoo Conversion API tag

1. Go to the Google Tag Manager and open your server container.

2. Go to Templates, and under Tag Templates, click Search Gallery.

Search Gallery

3. Search for LINE Yahoo Conversion API Tag.

LINE Yahoo Conversion API Tag

4. Click Add to workspace and confirm.

Add to workspace

5. Go to Tags and click New.

New

6. Click Tag Configuration and select LINE Yahoo Conversion API Tag.

LINE Yahoo Conversion API Tag

7. In Event Type Setup Method select from the following:

  • Standard – allows you to explicitly set a single LINE Yahoo event type for this specific tag (for example, forcing a tag to always send purchase or add_to_cart). Useful when you want to have dedicated tags per event type rather than relying on automatic GA4 event mapping. Also, it’s convenient for debugging and maintaining separate events.
  • Inherit from client – the tag automatically reads the incoming event name from the client and maps standard ecommerce and web event names to their LINE Yahoo API equivalents automatically (for example view_item view_product, or begin_checkoutcheck_out). Not all GA4 events can be mapped to Conversion API Event Types. Those are sent as custom events.

8. Enter previously saved Tag ID, Tag Access Token and Channel ID. Channel ID is only required when passing the LINE User ID in User Identifiers Parameters. If you selected Inherit from client, enter the Event Snippet ID as well.

9. In Test Mode set whether this tag is currently used for test purposes. If true, the events will be excluded from measurements.

10. If you check Use Optimistic Scenario, the tag will call gtmOnSuccess() without waiting for a response from the API. This will speed up sGTM response time however your tag will always return the status fired successfully even if it isn’t.

Use Optimistic Scenario

11. In Anonymous ID and Click ID Settings you can set the following parameters:

  • Set Anonymous ID cookie – when checked, the tag automatically reads or creates a server-side first-party cookie _ly_su. This cookie stores an anonymous browser/user identifier (anonymous_id) generated for site visitors when no logged-in user identifier is available. It allows LINE Yahoo to group multiple events from the same unauthenticated browser session over time.
  • Set Click ID cookie – when checked, the tag detects the LINE Yahoo Display Ads click identifier in incoming URLs or request data and saves it in a server-side first-party cookie _ly_c. This ensures the click ID persists across page views so conversion events occurring later in the user journey can be properly attributed to the original ad click.
  • Set complementary Click ID cookie – when enabled, the tag manages a secondary first-party cookie _ly_r to store complementary/backup click parameter data. This acts as a fallback mechanism for click attribution when primary URL parameters or cookies are stripped, restricted, or shortened by browser privacy protections (such as Safari ITP).
  • Cookies settings configures how server-side first-party cookies are written to the user's browser.
    • Cookie Domain – if default auto is set then automatically sets the cookie domain to the top-level domain, ensuring cookies are accessible across subdomains. Also, you can override and explicitly specify the domain for cookie storage.
    • Cookie SameSite – controls cross-site cookie transmission to balance privacy and cross-domain tracking functionality. For more information read Mozilla documentation.
    • Cookie HTTP Only Flag – determines whether client-side JavaScript can access the cookies created by the tag. If false,it allows browser scripts (like the web LINE Tag) to read the cookie values. If true, cookies are restricted to HTTP headers only and can’t be accessed via JavaScript in the browser.
    • Cookie Expiration – determines the cookie TTL (time-to-live). You can align the cookie life with your organization's privacy policies or browser cookie storage regulations.
Anonymous ID and Click ID Settings

12. In Server Event Data Parameters you can define core metadata and attributes attached to the conversion event payload:

  • Automap Server Event Data Parameters – when checked, the tag automatically extracts standard event metadata from the incoming event object such as event_time and transaction_id / event_id. The transaction_id / event_id values are extracted from transaction_id, event_id, or eventId in the event data, and are used for deduplicating events.
  • Server Event Data Parameters – here you can manually override event_time and transaction_id / event_id with a variable. The field must match the following regular expression: ^[!"#$%&'()*+,\-./0-9:;=\?@A-Z_a-z~]+$.  This is used for deduplicating events.
Server Event Data Parameters

13. In User Identifiers Parameters you can control how user identity data is collected, formatted, and attached to conversion events sent to LINE Yahoo. At least one user identifier is required (either auto-mapped or manually provided). The email address and phone number are hashed, and the phone number is converted to the E.164 standard.

  • Automap User Identifiers Parameters – when checked, the tag automatically extracts and maps user details from the incoming event object. For a full parameters list read the reference documentation.
  • User Identifiers Parameters – here you can manually override the following user identifiers: Email Address, Phone Number, Anonymous ID, Click ID, Complementary Click ID, Mobile ID (iOS IDFA or Android AAID), LINE User ID. When passing LINE User ID, make sure to also provide the Channel ID.
Automap User Identifiers Parameters

14. In Web Parameters you can configure browser level data (Page URL, Page Referrer, User Agent, and IP Address). This contextual data helps LINE Yahoo verify event sources and attribute conversions to the correct pages and ad click journeys. For a full parameters list read the reference documentation

  • Automap Web Parameters – when checked, the tag automatically extracts and web context details from the incoming event object.
  • Web Parameters – here you can manually override Page URL, Page Referrer, User Agent, and IP Address with a variable.
Web Parameters

15. In Event Parameters you can configure business and ecommerce parameters associated with the user action/conversion event.  For a full parameters list read the reference documentation.

  • Automap Event Parameters – when checked, the tag automatically extracts and maps Amount, Currency and Items from the incoming event object. For currency, only the JPY value is supported. Items expects an array of objects with a maximum length of 10. Each object can have: item_id, category_id, price and quantity.
    • Custom Item ID Key – specify which property inside your Data Layer items array should be used as the product identifier. When event parameters are automatically mapped, the tag looks for the standard key item_id inside each product object in the items array. If your Data Layer uses a different property name for your product IDs (such as id, sku, product_id, or item_sku), entering that key name tells the tag to extract the product ID from that property instead.
  • Event Parameters – here you can override Amount, Currency and Items with a variable.
Event Parameters

16. In Tag Execution Consent Settings you can control whether a tag fires and sends HTTP request data based on the user's consent status:

  • Send data always – the tag fires and sends data to the API on every trigger, regardless of whether consent was granted or denied.
  • Send data in case marketing consent given – the tag safely aborts firing if ad_storage consent (Google Consent Mode or Stape's Data Tag parameter) isn’t granted.
Tag Execution Consent Settings

17. Select a trigger such as Page View. 

i

Tip:

If you want a single tag to handle multiple events automatically when using Automap Event Parameters, you can use a Regex match on Event Name for custom trigger (for example, page_view|purchase|add_to_cart).

18. Click Save.

Save

Testing

1. In GTM, open the Preview mode and do some actions on your site to trigger the events. Confirm that the tag is firing.

Testing

2. In the Campaign Management Tool, go to Tools(ツール)Measurement Tags(計測タグ) and confirm that events are flowing.

Measurement Tags(計測タグ)

Conclusion

Combining the LINE Yahoo Measurement tag with the LINE Yahoo Conversion API tag creates a more complete tracking setup. It lets you capture both browser and server-side events, and keeps your conversions measurable when browser restrictions get in the way.

With the LINE Yahoo Conversion API tag for sGTM, you can simplify the server-side implementation, map GA4 events to LINE Yahoo event types automatically, manage the anonymous ID and click ID cookies on the server, securely hash user identifiers before they leave your container, and gain better control over the data you collect.

Want to start on the server side? Register now!

Ieva Dubricke

Ieva Dubricke

Author

Ieva is a technical writer with 5+ years of experience. She explains complex technical setups in a clear and structured way for marketers and developers.

Comments

Try Stape for all things server-side