ข้อมูลเหตุการณ์ทั่วไป
จัดทุกอย่างให้เป็นระเบียบอยู่เสมอด้วยคอลเล็กชัน
บันทึกและจัดหมวดหมู่เนื้อหาตามค่ากำหนดของคุณ
ข้อมูลต่อไปนี้เป็นข้อมูลเหตุการณ์ที่พบได้ทั่วไปในเหตุการณ์ประเภทต่างๆ คุณดึงค่าเหล่านี้ได้โดยใช้ตัวแปรข้อมูลเหตุการณ์หรือ getEventData
API
พารามิเตอร์ |
Type |
ตัวอย่าง |
คำอธิบาย |
client_id |
string |
กขค 123 |
รหัสที่กําหนดเองที่ระบุอินสแตนซ์ของผู้ใช้ อุปกรณ์ หรือเบราว์เซอร์แบบไม่ระบุตัวตน |
currency |
string |
USD |
สกุลเงินของการซื้อหรือไอเทมที่เกี่ยวข้องกับกิจกรรมในรูปแบบ ISO_4217 แบบ 3 ตัวอักษร |
event_name |
string |
purchase |
ชื่อเหตุการณ์ |
ip_override |
string |
1.2.3.4 |
ที่อยู่ IP ของผู้ใช้ในรูปแบบ IPv4 หรือ IPv6 |
language |
string |
th_TH |
ภาษาสําหรับไคลเอ็นต์ใน ISO 639-1 |
การเข้ารหัสหน้าเว็บ |
string |
UTF-8 |
การเข้ารหัสข้อความของหน้าเว็บ |
page_hostname |
string |
example.com |
ส่วนชื่อโฮสต์ของ page_location |
page_location |
string |
https://example.com |
URL เอกสารแบบเต็มของหน้า |
page_path |
string |
/path/to/page |
ส่วนเส้นทางของ page_location |
page_referrer |
string |
https://www.google.com |
URL แบบเต็มของหน้าเว็บที่อ้างอิงผู้ใช้ไปยังหน้าที่มีกิจกรรมเกิดขึ้น นี่ไม่ใช่ค่าของส่วนหัวผู้อ้างอิงในคําขอที่มาจากคอนเทนเนอร์ของเซิร์ฟเวอร์ |
page_title |
string |
เคหสถาน |
ชื่อของหน้า |
screen_resolution |
string |
1024x768 |
ความละเอียดหน้าจอรวมสําหรับอุปกรณ์ของผู้ใช้ (กว้างคูณสูง) |
user_agent |
string |
|
User Agent ของไคลเอ็นต์ |
user_data.email_address |
string |
foo@example.com |
อีเมลของผู้ใช้ |
user_data.sha256_email_address |
string |
|
ที่อยู่อีเมลที่แฮชของผู้ใช้ ดูข้อมูลเพิ่มเติม |
user_data.หมายเลขโทรศัพท์ |
string |
+15551234567 |
หมายเลขโทรศัพท์ของผู้ใช้ |
user_data.sha256_หมายเลขโทรศัพท์ |
string |
|
แฮชหมายเลขโทรศัพท์ของผู้ใช้ ดูข้อมูลเพิ่มเติม |
user_data.address.first_name [ชื่อผู้ใช้] |
string |
สมพร |
ชื่อของผู้ใช้ |
user_data.address.sha256_ชื่อ_ชื่อ |
string |
|
มีการแฮชชื่อของผู้ใช้ ดูข้อมูลเพิ่มเติม |
user_data.address.last_name [ชื่อผู้ใช้] |
string |
หมายดี |
นามสกุลของผู้ใช้ |
user_data.address.sha256_นามสกุล |
string |
|
มีการแฮชนามสกุลของผู้ใช้ ดูข้อมูลเพิ่มเติม |
user_data.address.street |
string |
123 ถนน Fake St |
ถนนและหมายเลขสําหรับที่อยู่ของผู้ใช้ |
user_data.address.city |
string |
เมือง |
เมืองสําหรับที่อยู่ของผู้ใช้ |
user_data.address.region |
string |
CA |
รัฐหรือเขตแดนสําหรับที่อยู่ของผู้ใช้ |
user_data.address.postal_code [รหัสที่อยู่ผู้ใช้] |
string |
54321 |
รหัสไปรษณีย์สําหรับที่อยู่ของผู้ใช้ |
user_data.address.country |
string |
สหรัฐอเมริกา |
รหัสประเทศสําหรับที่อยู่ของผู้ใช้ |
user_id |
string |
|
รหัสที่กําหนดเองที่มีจุดประสงค์เพื่อให้เป็นตัวระบุที่เป็นที่ทราบสําหรับผู้ใช้ที่ได้รับจากเจ้าของเว็บไซต์/ผู้ใช้ห้องสมุด |
value |
number |
10 |
มูลค่าเป็นเงินของเหตุการณ์ที่เกิดขึ้น |
ขนาดวิวพอร์ต |
string |
725x345 |
ขนาดของหน้าต่างเนื้อหา มักมีขนาดเล็กกว่าความละเอียดของหน้าจอ (กว้างคูณสูง) |
เนื้อหาของหน้าเว็บนี้ได้รับอนุญาตภายใต้ใบอนุญาตที่ต้องระบุที่มาของครีเอทีฟคอมมอนส์ 4.0 และตัวอย่างโค้ดได้รับอนุญาตภายใต้ใบอนุญาต Apache 2.0 เว้นแต่จะระบุไว้เป็นอย่างอื่น โปรดดูรายละเอียดที่นโยบายเว็บไซต์ Google Developers Java เป็นเครื่องหมายการค้าจดทะเบียนของ Oracle และ/หรือบริษัทในเครือ
อัปเดตล่าสุด 2024-02-06 UTC
[null,null,["อัปเดตล่าสุด 2024-02-06 UTC"],[[["\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). |"]]