常見事件資料
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
以下是各種事件通用的事件資料。您可以使用事件資料變數或 getEventData
API 擷取這些值。
參數 |
類型 |
範例 |
說明 |
client_id |
string |
ABC_123 |
匿名識別特定使用者、裝置或瀏覽器執行個體的匿名 ID。 |
currency |
string |
美元 |
與事件相關的購買項目或項目貨幣,格式為 3 個字母的 ISO_4217 格式。 |
event_name |
string |
purchase |
活動的名稱。 |
IP 覆寫 |
string |
1.2.3.4 |
使用者的 IPv 位址 (IPv4 或 IPv6 格式)。 |
language |
string |
en_us |
用戶端的 ISO 639-1 語言。 |
網頁編碼 |
string |
UTF-8 |
網頁的文字編碼。 |
page_hostname |
string |
example.com |
page_location 的主機名稱部分。 |
page_location |
string |
https://example.com |
網頁的完整文件網址。 |
page_path |
string |
/path/to/page |
page_location 的路徑部分。 |
page_referrer |
string |
https://www.google.com |
將使用者導向事件發生網頁的網頁網址。這個值並不是伺服器容器中請求的參照網址標頭值。 |
page_title |
string |
首頁 |
網頁的標題。 |
screen_resolution |
string |
1024x768 |
使用者裝置的總螢幕解析度。(寬度高)。 |
使用者代理程式 |
string |
|
用戶端的使用者代理程式。 |
user_data.email_address |
string |
foo@example.com |
使用者的電子郵件地址。 |
user_data.sha256_email_address |
string |
|
使用者的雜湊電子郵件地址。瞭解詳情 |
user_data.phone_number |
string |
+15551234567 |
使用者的電話號碼。 |
user_data.sha256_phone_number |
string |
|
使用者的雜湊電話號碼。瞭解詳情 |
user_data.address.first_name |
string |
Jane |
使用者的名字。 |
user_data.address.sha256_first_name |
string |
|
已雜湊處理使用者的名字。瞭解詳情 |
user_data.address.last_name |
string |
小美 |
使用者的姓氏。 |
user_data.address.sha256_last_name |
string |
|
經過雜湊處理的使用者姓氏。瞭解詳情 |
user_data.address.street |
string |
忠誠路 123 號 |
使用者地址的街道和號碼。 |
user_data.address.city |
string |
鄉鎮 |
使用者地址的城市。 |
user_data.address.region |
string |
加拿大 |
使用者地址的州或省。 |
user_data.address.postal_code |
string |
54321 |
使用者地址的郵遞區號。 |
user_data.address.country |
string |
美國 |
使用者地址的國家/地區代碼。 |
user_id |
string |
|
此為專屬 ID,可做為網站擁有者/程式庫使用者提供的已知 ID。 |
值 |
number |
10 |
事件發生價值。 |
可視區域大小 |
string |
725x345 |
內容視窗的大小。通常會小於螢幕解析度。(寬度高)。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2024-02-06 (世界標準時間)。
[null,null,["上次更新時間:2024-02-06 (世界標準時間)。"],[[["\u003cp\u003eThis page outlines common event data parameters available across various event types in Google Tag Manager.\u003c/p\u003e\n"],["\u003cp\u003eThese parameters provide information about users, their devices, page details, and event specifics, like currency and value.\u003c/p\u003e\n"],["\u003cp\u003eYou can access event data using the \u003ccode\u003eEvent Data\u003c/code\u003e variable or the \u003ccode\u003egetEventData\u003c/code\u003e API.\u003c/p\u003e\n"],["\u003cp\u003eEvent data can include sensitive information like personally identifiable information (PII) such as email, address, and phone number.\u003c/p\u003e\n"],["\u003cp\u003eFor security and privacy, hashed versions of PII are available, using SHA256 for encryption, in line with Google's data policies.\u003c/p\u003e\n"]]],["Event data, retrievable via the `Event Data` variable or `getEventData` API, includes user, device, and event details. Key parameters are `client_id` (user identifier), `currency`, and `event_name`. Page information like `page_location`, `page_title`, and `page_referrer` is available. User data includes `email_address`, `phone_number`, and address details, with options for hashed versions. Device details include `screen_resolution` and `viewport_size`. Additional fields are `user_agent`, `user_id`, and `value`.\n"],null,["# Common event data\n\nThe following are event data common across different types of events. These\nvalues can be retrieved using the **Event Data** variable or the\n[`getEventData`](/tag-platform/tag-manager/server-side/api#get_event_data) API.\n\n| Parameter | Type | Example | Description |\n|-------------------------------------|----------|------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| client_id | `string` | ABC_123 | Arbitrary ID that anonymously identifies a particular user, device, or browser instance. |\n| currency | `string` | USD | Currency of the purchase or items associated with the event, in 3-letter ISO_4217 format. |\n| event_name | `string` | purchase | The name of the event. |\n| ip_override | `string` | 1.2.3.4 | The IP address of the user in IPv4 or IPv6 format. |\n| language | `string` | en_us | The language for the client in ISO 639-1. |\n| page_encoding | `string` | UTF-8 | The text encoding of the page. |\n| page_hostname | `string` | example.com | The hostname portion of page_location. |\n| page_location | `string` | https://example.com | The full document URL of the page. |\n| page_path | `string` | /path/to/page | The path portion of page_location. |\n| page_referrer | `string` | https://www.google.com | Full URL of the page that referred to the user to the page where the event occurred. This is not the value of the Referrer header on the request coming into the server container. |\n| page_title | `string` | Home | The title of the page. |\n| screen_resolution | `string` | 1024x768 | Total screen resolution for the user's device. (width by height). |\n| user_agent | `string` | | The client's user agent. |\n| user_data.email_address | `string` | foo@example.com | Email address of the user. |\n| user_data.sha256_email_address | `string` | | Hashed email address of the user. [Learn more](https://support.google.com/google-ads/answer/12785474?sjid=4543074023400780070-NA) |\n| user_data.phone_number | `string` | +15551234567 | Phone number of the user. |\n| user_data.sha256_phone_number | `string` | | Hashed phone number of the user. [Learn more](https://support.google.com/google-ads/answer/12785474?sjid=4543074023400780070-NA) |\n| user_data.address.first_name | `string` | Jane | First name of the user. |\n| user_data.address.sha256_first_name | `string` | | Hashed first name of the user. [Learn more](https://support.google.com/google-ads/answer/12785474?sjid=4543074023400780070-NA) |\n| user_data.address.last_name | `string` | Doe | Last name of the user. |\n| user_data.address.sha256_last_name | `string` | | Hashed last name of the user. [Learn more](https://support.google.com/google-ads/answer/12785474?sjid=4543074023400780070-NA) |\n| user_data.address.street | `string` | 123 Fake St | Street and number for the address of the user. |\n| user_data.address.city | `string` | City Town | City for the address of the user. |\n| user_data.address.region | `string` | CA | State or territory for the address of the user. |\n| user_data.address.postal_code | `string` | 54321 | Postal code for the address of the user. |\n| user_data.address.country | `string` | US | Country code for the address of the user. |\n| user_id | `string` | | Arbitrary ID that is intended to be a known identifier for a user provided by the site owner/library user. |\n| value | `number` | 10 | Monetary value of the event that occurred. |\n| viewport_size | `string` | 725x345 | Size of the content window. Usually smaller than the screen resolution. (width by height). |"]]