visitorId 값은 고유 사용자 식별자를 나타냅니다. 사용자 이벤트를 기록할 때 필요합니다. (UserInfo)이 포함됩니다.visitorIduserId
사용자가 사이트에 로그인할 때마다 선택사항인 userId 값을 여러 기기에서 사용자의 고유한 영구 식별자로 사용할 수 있습니다. 사용자의 userId를 기록할 때 커머스용 Vertex AI Search는 휴대기기와 웹브라우저 등 여러 기기에서 사용자 한 명에 대해 더욱 맞춤설정된 결과를 생성할 수 있습니다.
사용자 이벤트 타임스탬프
사용자 이벤트를 기록할 때는 이벤트가 발생한 시점의 정확한 타임스탬프를 포함해야 합니다. 정확한 타임스탬프를 사용하면 이벤트가 올바른 순서로 저장될 수 있습니다. 태그 관리자 및 JavaScript Pixel을 사용하여 수집된 이벤트의 타임스탬프는 자동으로 기록됩니다. 이벤트를 가져올 때는 eventTime 필드에 RFC 3339로 지정된 형식으로 타임스탬프를 제공해야 합니다.
사용자 이벤트의 맞춤 속성
사용자 이벤트에 대한 추가 맞춤 속성 및 기능을 포함할 수 있습니다. 이를 사용하면 추천을 사용할 때 사용자에게 보다 구체적인 추천이 제공될 수 있습니다. 맞춤 속성을 추가하려면 사용자 이벤트를 기록할 때 attributes를 사용합니다.
수집된 사용자 이벤트에 대해 맞춤 속성을 제공할 경우 예측 요청과 연결된 사용자 이벤트에도 해당 속성을 포함해야 합니다. 맞춤 속성의 형식은 가져온 이벤트와 예측 요청으로 제공된 이벤트 간에 일관되어야 합니다. 이렇게 하면 모델 학습 및 예측 제공 시 이러한 커스텀 속성을 사용할 수 있으므로 추천 품질을 개선할 수 있습니다.
text 필드를 사용하여 커스텀 텍스트 값을 제공하거나 number 필드를 사용하여 커스텀 숫자 값을 제공할 수 있습니다.
[[["이해하기 쉬움","easyToUnderstand","thumb-up"],["문제가 해결됨","solvedMyProblem","thumb-up"],["기타","otherUp","thumb-up"]],[["이해하기 어려움","hardToUnderstand","thumb-down"],["잘못된 정보 또는 샘플 코드","incorrectInformationOrSampleCode","thumb-down"],["필요한 정보/샘플이 없음","missingTheInformationSamplesINeed","thumb-down"],["번역 문제","translationIssue","thumb-down"],["기타","otherDown","thumb-down"]],["최종 업데이트: 2025-09-04(UTC)"],[],[],null,["# Implement user events\n\nTo configure your user events:\n\n1. Import [historical user events](/retail/docs/import-user-events).\n\n2. Record [live user events](/retail/docs/record-events).\n\n3. Tag user events [with entities](/retail/docs/entities).\n\n4. Flag user events with [attribution tokens](/retail/docs/record-events#attribution-tokens).\n\nUser information\n----------------\n\nThe `visitorId` value represents the unique user identifier. It's required when you record a user event. ([`UserInfo`](/retail/docs/reference/rest/v2/projects.locations.catalogs.userEvents#userinfo)) is included when you record a user event that has the `visitorId` value and, if available, the `userId` value.\n\nYou can use the optional `userId` value as a unique, persistent identifier for a user across devices whenever a user signs in to your site. When you record the `userId` for a user, Vertex AI Search for commerce can generate more personalized results for one user across multiple devices, such as a mobile device and web browser.\n| **Note:** Use a secure form of a unique identifier to keep users anonymous to Vertex AI Search for commerce and protect your users' privacy. You are responsible for redacting PII (personally identifiable information), such as email or home addresses, from your data.\n\nUser event timestamp\n--------------------\n\nWhen you record a user event, be sure to include an accurate timestamp of when\nthe event occurred. Accurate timestamps ensure that events are stored in the\ncorrect order. Timestamps are recorded automatically for events collected using\nTag Manager and the JavaScript Pixel. When you\nimport events, you must provide the timestamp in the [`eventTime`](/retail/docs/reference/rest/v2/projects.locations.catalogs.userEvents#UserEvent.FIELDS.event_time)\nfield in the format specified by\n[RFC 3339](https://tools.ietf.org/html/rfc3339).\n\nCustom attributes for user events\n---------------------------------\n\nYou can include additional custom attributes and features for user events. This\ncan result in improved, more specific recommendations for your users when you\nuse recommendations. To add custom attributes, use\n[`attributes`](/retail/docs/reference/rest/v2/projects.locations.catalogs.userEvents#UserEvent.FIELDS.attributes) when you record a user event.\n\nIf you provide custom attributes for ingested user events, it's important to\nalso include them in the user events that you associate with prediction\nrequests. The formatting of custom attributes must be consistent between\nimported events and events provided with prediction requests. This enables\nuse of those custom attributes when training models and\nserving predictions, which helps improve recommendation quality.\n\nYou can provide custom text values by using the `text` field, or custom\nnumerical values by using the `number` field.\n\nFor example, the following shows the `attributes` section from a request\nto record a user event: \n\n```json\n\"attributes\": {\n \"user_age\": {\"text\": [\"teen\", \"young adult\"]},\n \"user_location\": {\"text\": [\"CA\"]}\n}\n```\n\nMonitor import health\n---------------------\n\nRecording user events successfully is important for getting high-quality\nresults. You should monitor the event recording error rates and take\naction if needed. For more information, see\n[Setting up alerts for data upload issues](/retail/docs/monitor)."]]