Yahoo Conversion API using server Google Tag Manager

Nov 6, 2023

Yahoo is an internet pioneer, known for its web portal, search engine, and various online services like email and news. 

Like other platforms, Yahoo also has its own Conversion API and an official tag for sGTM. The tag doesn't look too complicated to set up, although it has its own nuances if you understand it in detail. 

Yahoo Conversion API description

Below is the list of tag parameters and their description + example of settings we made while testing it.

Tag parameters and fields

  • Client ID

To get a Client ID you need a Japan ID, sign up on Yahoo! Developer Network and issue a Client ID.

  • yahoo_ydn_conv_io and yahoo_ydn_conv_label

These parameters are similar to conversion id and label as for Google ADS for example. You can find them in your Yahoo conversion settings:In the conversion settings list, locate the "Advanced Matching" section. For the tag that has advanced matching activated, select "Show Parameters".

yahoo conversions api

Example of yahoo_ydn_conv_io: 1EALEzSJBNabcdEFGBE1

Example of yahoo_ydn_conv_label: AB0ABCDEFGHIJKLMNOP123456

Event params:

  • hashed_email
  • Hashed_phone_number: the raw phone number with or without a country code)
  • Еvent_time: use 10-digit Unix Time between current time and 90 days before requests)
  • Yahoo_ydn_conv_transaction_id: order id or any other conversion unique identifier
  • Yahoo_ydn_conv_value: value of conversion

The name of these parameters speaks for itself. Unfortunately Yahoo CAPI tag requires already hashed data and does not hash it itself as FB CAPI tag does. But if you are using Data Tag - Data Client this is not a problem as there is a special option for this.

yahoo capi tag

For hashing you just specify a regular email field and in Data Tag specify the required hashing type (in case of Yahoo it is SHA256 hex) - the data will come to the server already hashed.

The event time field is actually optional, because if you look in the tag code, you will find that if the field is undefined - the current timestamp will be taken, which is usually the case.

Keep in mind that the amount you're handing over to the yahoo_ydn_conv_value will be counted as conversion amount, so you need to customize the value if you want the amount to be for example without tax and shipping.

Identification parameters

  • yclid (cookie ‘_ycl_yjad’)
  • yjr_yjad (cookie ‘_yjr_yjad’)

Unfortunately, the Yahoo Conversion API tag does not save these parameters if it finds a click id in the url and there's no separate tag like conversion linker. So to pass these two parameters you have two options:

This way Site Tag will generate and save the necessary cookies.

The downside here is that you'll be loading voluminous JS for the sake of saving cookies from the url.

2. Save these cookies with a custom JS / solution.

When a user clicks on a Yahoo advert, the query parameter 'yclid' is added to the url. You need to check the url on each page view for yclid on page url and if it is there - write it value to a cookie for 90 days, the cookie name should be '_ycl_yjad'.

Example format ‘_ycl_yjad’ cookie:


Yjr_yjad - is essentially a browser id and is an optional field. You can generate it e.g. from timestamp + some parameter, e.g. a random number and store it in the cookie under the name '_yjr_yjad'.

Example format of  ‘yjr_yjad’ cookie:


It is not necessary to transfer cookies manually via event data in Yahoo Conversion tag to the server, the tag checks if cookies '_ycl_yjad' and 'yjr_yjad' are present in the headers of each request. So if they are present - it will work automatically.

Yclid is the most important parameter for conversions to work, so it is advised to spend more time setting it up and testing it so that everything works exactly correctly. Here you can find detailed documentation from Yahoo about how click id works (in Japanese only).

yahoo capi

Yahoo Conversion API tag setup

As usual, you need to have a server Google tag Manager container and Yahoo CAPI tag from the GTM template gallery added. 

Conversion customisation consists of just two general points:

1. On the web container we have configured a server Google tag Manager container and Yahoo CAPI tag from the GTM template gallery added.

yahoo conversions api

2. On the server container on the Data Client hit with purchase event we have a Yahoo Conversion API tag that gets all the data from the event data and sends the conversion.

yahoo conversions api


That's it! Unfortunately, we don't have much use of Yahoo ADS in our region, so maybe this article may not cover some of the nuances on Yahoo, but hopefully this will definitely help you set up server side conversion tracking for Yahoo. 

If you have any comments or additions to this, please let us know in the comments below.And if you need help, don’t hesitate to ask for a free quote! 

Tagged with:gtm serversGTM tag

Host your GTM server at Staperight now!