Conversion API | Developer Center
日本語Use server-side Google Tag Manager
This page describes the steps for tracking user actions (events) using server-side Google Tag Manager.
The conversion API provides templates and features to be used with server-side Google Tag Manager offered by Google. We don't support operations or methods involving server-side Google Tag Manager templates not provided by LY Corporation.
Server-side Google Tag Manager
Google Tag Manager is a tag management system offered by Google. Server-side Google Tag Manager processes tags in containers on platforms like Google Cloud. In the conversion API, event data sent to the server-side Google Tag Manager container is collected and requested by the conversion API to measure events.
1. Preparation
Prepare server-side Google Tag Manager
Set up server-side Google Tag Manager by reviewing sections such as "Set up server-side tagging" in "Set up server-side tagging with Cloud Run."
Prepare the conversion API
Get access tokens and various IDs. Refer to "1. Get various IDs and access tokens" in the "Startup Guide" for details.
2. Tag settings
Set up parameters and delivery triggers for the "Conversion API Tag" in the Community Template Gallery. Refer to the "Reference" for parameter details.
(1) Open the workspace of the containers (websites) to set tags on Google Tag Manager.
(2) Select "Tags" on the side menu and open the new tag addition by clicking "New."
(3) Select "Tag Configuration" and then click "Discover more tag types in the Community Template Gallery."
(4) Select "LINEヤフー ConversionAPIタグ" (Conversion API tag) from the list.
(5) Set up various parameters for requests to the conversion API. Set parameters as needed.
(6) Select the conditions under which the tag will be triggered.
(7) Click "Save" to save the tag.
3. Verification
You can check the event history in the Campaign Management Tool. Refer to "Check event history" for more details.
About the conversion API tag
When the tag fires, the request to the conversion API reflects the following values entered in "2. Tag settings." If there are no entries or invalid entries in "2. Tag settings," some parameters will attempt to retrieve "Preliminary input value."
Parameter Name | Preliminary input value |
---|---|
tag_id | |
tag_access_token | |
channel_id | |
event_type | |
event_snippet_id | |
event_time | Current time |
test_flag | |
transaction_id | |
hashed_phone_number (*) | Value of event data user_data.phone_number |
hashed_email (*) | Value of event data user_data.email_address |
ly_su | Value of _ly_su cookie |
ly_c | Value of _ly_c cookie |
ly_r | Value of _ly_r cookie |
ifa | |
line_uid | |
url | Value of event data page_location |
referrer_url | Value of event data page_referrer |
user_agent | Value of event data user_agent |
ip | Value of event data ip_override |
currency | |
label | |
value | |
item_id | |
category_id | |
price | |
quantity |
*If values other than SHA-256 hash values are entered
If the input values for hashed_email and hashed_phone_number are not hashed with SHA-256, the following actions will be taken.
Parameter name | Details |
---|---|
hashed_email | If the entered string is determined to be a valid email address format, the string is hashed and sent. Otherwise, the input value is not sent. |
hashed_phone_number | If the entered string is determined to be a phone number in E.164 format, the string is hashed and sent. If the entered string contains -, (, ) or spaces, those characters are removed. If it is not in E.164 format, the input value is not sent. |
Notes for server-side Google Tag Manager use
Do not send input values to the conversion API to Google Analytics
According to Google Analytics' terms of service, it is prohibited to send information that can be used or recognized as personal information. Therefore, never send input values to the conversion API to Google Analytics.
If you are using the "Google Analytics: GA4" tag, all event parameters and user properties are sent to Google Analytics by default.
Check your settings and configure exclusion settings or triggers as needed.
Subject to conversion API restrictions
The conversion API Tag is subject to conversion API restrictions. For details on the conversion API, refer to the "Reference."
Only one event can be sent per request with the conversion API tag. If there is a risk of exceeding the maximum number of send requests, consider alternative methods.