For product recommendation, an example of extra user information is
traffic_channel, i.e. how user arrives at the site. Users can arrive
at the site by coming to the site directly, or coming through Google
search, and etc.
For product recommendation, an example of extra user information is
traffic_channel, i.e. how user arrives at the site. Users can arrive
at the site by coming to the site directly, or coming through Google
search, and etc.
For product recommendation, an example of extra user information is
traffic_channel, i.e. how user arrives at the site. Users can arrive
at the site by coming to the site directly, or coming through Google
search, and etc.
#experiment_ids
defexperiment_ids()->::Array<::String>
Returns
(::Array<::String>) — Optional. A list of identifiers for the independent experiment groups
this user event belongs to. This is used to distinguish between user events
associated with different experiment setups (e.g. using Recommendation
Engine system, using different recommendation models).
#experiment_ids=
defexperiment_ids=(value)->::Array<::String>
Parameter
value (::Array<::String>) — Optional. A list of identifiers for the independent experiment groups
this user event belongs to. This is used to distinguish between user events
associated with different experiment setups (e.g. using Recommendation
Engine system, using different recommendation models).
Returns
(::Array<::String>) — Optional. A list of identifiers for the independent experiment groups
this user event belongs to. This is used to distinguish between user events
associated with different experiment setups (e.g. using Recommendation
Engine system, using different recommendation models).
#page_view_id
defpage_view_id()->::String
Returns
(::String) — Optional. A unique id of a web page view.
This should be kept the same for all user events triggered from the same
pageview. For example, an item detail page view could trigger multiple
events as the user is browsing the page.
The pageViewId property should be kept the same for all these events so
that they can be grouped together properly. This pageViewId will be
automatically generated if using the JavaScript pixel.
#page_view_id=
defpage_view_id=(value)->::String
Parameter
value (::String) — Optional. A unique id of a web page view.
This should be kept the same for all user events triggered from the same
pageview. For example, an item detail page view could trigger multiple
events as the user is browsing the page.
The pageViewId property should be kept the same for all these events so
that they can be grouped together properly. This pageViewId will be
automatically generated if using the JavaScript pixel.
Returns
(::String) — Optional. A unique id of a web page view.
This should be kept the same for all user events triggered from the same
pageview. For example, an item detail page view could trigger multiple
events as the user is browsing the page.
The pageViewId property should be kept the same for all these events so
that they can be grouped together properly. This pageViewId will be
automatically generated if using the JavaScript pixel.
#recommendation_token
defrecommendation_token()->::String
Returns
(::String) — Optional. Recommendation token included in the recommendation prediction
response.
This field enables accurate attribution of recommendation model
performance.
This token enables us to accurately attribute page view or purchase back to
the event and the particular predict response containing this
clicked/purchased item. If user clicks on product K in the recommendation
results, pass the PredictResponse.recommendationToken property as a url
parameter to product K's page. When recording events on product K's page,
log the PredictResponse.recommendation_token to this field.
Optional, but highly encouraged for user events that are the result of a
recommendation prediction query.
#recommendation_token=
defrecommendation_token=(value)->::String
Parameter
value (::String) — Optional. Recommendation token included in the recommendation prediction
response.
This field enables accurate attribution of recommendation model
performance.
This token enables us to accurately attribute page view or purchase back to
the event and the particular predict response containing this
clicked/purchased item. If user clicks on product K in the recommendation
results, pass the PredictResponse.recommendationToken property as a url
parameter to product K's page. When recording events on product K's page,
log the PredictResponse.recommendation_token to this field.
Optional, but highly encouraged for user events that are the result of a
recommendation prediction query.
Returns
(::String) — Optional. Recommendation token included in the recommendation prediction
response.
This field enables accurate attribution of recommendation model
performance.
This token enables us to accurately attribute page view or purchase back to
the event and the particular predict response containing this
clicked/purchased item. If user clicks on product K in the recommendation
results, pass the PredictResponse.recommendationToken property as a url
parameter to product K's page. When recording events on product K's page,
log the PredictResponse.recommendation_token to this field.
Optional, but highly encouraged for user events that are the result of a
recommendation prediction query.
#referrer_uri
defreferrer_uri()->::String
Returns
(::String) — Optional. The referrer url of the current page. When using
the JavaScript pixel, this value is filled in automatically.
#referrer_uri=
defreferrer_uri=(value)->::String
Parameter
value (::String) — Optional. The referrer url of the current page. When using
the JavaScript pixel, this value is filled in automatically.
Returns
(::String) — Optional. The referrer url of the current page. When using
the JavaScript pixel, this value is filled in automatically.
#uri
defuri()->::String
Returns
(::String) — Optional. Complete url (window.location.href) of the user's current page.
When using the JavaScript pixel, this value is filled in automatically.
Maximum length 5KB.
#uri=
defuri=(value)->::String
Parameter
value (::String) — Optional. Complete url (window.location.href) of the user's current page.
When using the JavaScript pixel, this value is filled in automatically.
Maximum length 5KB.
Returns
(::String) — Optional. Complete url (window.location.href) of the user's current page.
When using the JavaScript pixel, this value is filled in automatically.
Maximum length 5KB.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[],[],null,["# Recommendations AI V1beta1 API - Class Google::Cloud::RecommendationEngine::V1beta1::EventDetail (v0.13.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.13.0 (latest)](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/latest/Google-Cloud-RecommendationEngine-V1beta1-EventDetail)\n- [0.12.1](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.12.1/Google-Cloud-RecommendationEngine-V1beta1-EventDetail)\n- [0.11.0](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.11.0/Google-Cloud-RecommendationEngine-V1beta1-EventDetail)\n- [0.10.0](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.10.0/Google-Cloud-RecommendationEngine-V1beta1-EventDetail)\n- [0.9.2](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.9.2/Google-Cloud-RecommendationEngine-V1beta1-EventDetail)\n- [0.8.2](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.8.2/Google-Cloud-RecommendationEngine-V1beta1-EventDetail)\n- [0.7.0](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.7.0/Google-Cloud-RecommendationEngine-V1beta1-EventDetail)\n- [0.6.1](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.6.1/Google-Cloud-RecommendationEngine-V1beta1-EventDetail)\n- [0.5.0](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.5.0/Google-Cloud-RecommendationEngine-V1beta1-EventDetail)\n- [0.4.1](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.4.1/Google-Cloud-RecommendationEngine-V1beta1-EventDetail)\n- [0.3.7](/ruby/docs/reference/google-cloud-recommendation_engine-v1beta1/0.3.7/Google-Cloud-RecommendationEngine-V1beta1-EventDetail) \nReference documentation and code samples for the Recommendations AI V1beta1 API class Google::Cloud::RecommendationEngine::V1beta1::EventDetail.\n\nUser event details shared by all recommendation types. \n\nInherits\n--------\n\n- Object \n\nExtended By\n-----------\n\n- Google::Protobuf::MessageExts::ClassMethods \n\nIncludes\n--------\n\n- Google::Protobuf::MessageExts\n\nMethods\n-------\n\n### #event_attributes\n\n def event_attributes() -\u003e ::Google::Cloud::RecommendationEngine::V1beta1::FeatureMap\n\n**Returns**\n\n- ([::Google::Cloud::RecommendationEngine::V1beta1::FeatureMap](./Google-Cloud-RecommendationEngine-V1beta1-FeatureMap)) --- Optional. Extra user event features to include in the recommendation model.\n\n\n For product recommendation, an example of extra user information is\n traffic_channel, i.e. how user arrives at the site. Users can arrive\n at the site by coming to the site directly, or coming through Google\n search, and etc.\n\n### #event_attributes=\n\n def event_attributes=(value) -\u003e ::Google::Cloud::RecommendationEngine::V1beta1::FeatureMap\n\n**Parameter**\n\n- **value** ([::Google::Cloud::RecommendationEngine::V1beta1::FeatureMap](./Google-Cloud-RecommendationEngine-V1beta1-FeatureMap)) --- Optional. Extra user event features to include in the recommendation model.\n\n\n For product recommendation, an example of extra user information is\n traffic_channel, i.e. how user arrives at the site. Users can arrive\n at the site by coming to the site directly, or coming through Google\nsearch, and etc. \n**Returns**\n\n- ([::Google::Cloud::RecommendationEngine::V1beta1::FeatureMap](./Google-Cloud-RecommendationEngine-V1beta1-FeatureMap)) --- Optional. Extra user event features to include in the recommendation model.\n\n\n For product recommendation, an example of extra user information is\n traffic_channel, i.e. how user arrives at the site. Users can arrive\n at the site by coming to the site directly, or coming through Google\n search, and etc.\n\n### #experiment_ids\n\n def experiment_ids() -\u003e ::Array\u003c::String\u003e\n\n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- Optional. A list of identifiers for the independent experiment groups this user event belongs to. This is used to distinguish between user events associated with different experiment setups (e.g. using Recommendation Engine system, using different recommendation models).\n\n### #experiment_ids=\n\n def experiment_ids=(value) -\u003e ::Array\u003c::String\u003e\n\n**Parameter**\n\n- **value** (::Array\\\u003c::String\\\u003e) --- Optional. A list of identifiers for the independent experiment groups this user event belongs to. This is used to distinguish between user events associated with different experiment setups (e.g. using Recommendation Engine system, using different recommendation models). \n**Returns**\n\n- (::Array\\\u003c::String\\\u003e) --- Optional. A list of identifiers for the independent experiment groups this user event belongs to. This is used to distinguish between user events associated with different experiment setups (e.g. using Recommendation Engine system, using different recommendation models).\n\n### #page_view_id\n\n def page_view_id() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Optional. A unique id of a web page view. This should be kept the same for all user events triggered from the same pageview. For example, an item detail page view could trigger multiple events as the user is browsing the page. The `pageViewId` property should be kept the same for all these events so that they can be grouped together properly. This `pageViewId` will be automatically generated if using the JavaScript pixel.\n\n### #page_view_id=\n\n def page_view_id=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Optional. A unique id of a web page view. This should be kept the same for all user events triggered from the same pageview. For example, an item detail page view could trigger multiple events as the user is browsing the page. The `pageViewId` property should be kept the same for all these events so that they can be grouped together properly. This `pageViewId` will be automatically generated if using the JavaScript pixel. \n**Returns**\n\n- (::String) --- Optional. A unique id of a web page view. This should be kept the same for all user events triggered from the same pageview. For example, an item detail page view could trigger multiple events as the user is browsing the page. The `pageViewId` property should be kept the same for all these events so that they can be grouped together properly. This `pageViewId` will be automatically generated if using the JavaScript pixel.\n\n### #recommendation_token\n\n def recommendation_token() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Optional. Recommendation token included in the recommendation prediction response.\n\n This field enables accurate attribution of recommendation model\n performance.\n\n This token enables us to accurately attribute page view or purchase back to\n the event and the particular predict response containing this\n clicked/purchased item. If user clicks on product K in the recommendation\n results, pass the `PredictResponse.recommendationToken` property as a url\n parameter to product K's page. When recording events on product K's page,\n log the PredictResponse.recommendation_token to this field.\n\n Optional, but highly encouraged for user events that are the result of a\n recommendation prediction query.\n\n### #recommendation_token=\n\n def recommendation_token=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Optional. Recommendation token included in the recommendation prediction response.\n\n\n This field enables accurate attribution of recommendation model\n performance.\n\n This token enables us to accurately attribute page view or purchase back to\n the event and the particular predict response containing this\n clicked/purchased item. If user clicks on product K in the recommendation\n results, pass the `PredictResponse.recommendationToken` property as a url\n parameter to product K's page. When recording events on product K's page,\n log the PredictResponse.recommendation_token to this field.\n\n Optional, but highly encouraged for user events that are the result of a\nrecommendation prediction query. \n**Returns**\n\n- (::String) --- Optional. Recommendation token included in the recommendation prediction response.\n\n This field enables accurate attribution of recommendation model\n performance.\n\n This token enables us to accurately attribute page view or purchase back to\n the event and the particular predict response containing this\n clicked/purchased item. If user clicks on product K in the recommendation\n results, pass the `PredictResponse.recommendationToken` property as a url\n parameter to product K's page. When recording events on product K's page,\n log the PredictResponse.recommendation_token to this field.\n\n Optional, but highly encouraged for user events that are the result of a\n recommendation prediction query.\n\n### #referrer_uri\n\n def referrer_uri() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Optional. The referrer url of the current page. When using the JavaScript pixel, this value is filled in automatically.\n\n### #referrer_uri=\n\n def referrer_uri=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Optional. The referrer url of the current page. When using the JavaScript pixel, this value is filled in automatically. \n**Returns**\n\n- (::String) --- Optional. The referrer url of the current page. When using the JavaScript pixel, this value is filled in automatically.\n\n### #uri\n\n def uri() -\u003e ::String\n\n**Returns**\n\n- (::String) --- Optional. Complete url (window.location.href) of the user's current page. When using the JavaScript pixel, this value is filled in automatically. Maximum length 5KB.\n\n### #uri=\n\n def uri=(value) -\u003e ::String\n\n**Parameter**\n\n- **value** (::String) --- Optional. Complete url (window.location.href) of the user's current page. When using the JavaScript pixel, this value is filled in automatically. Maximum length 5KB. \n**Returns**\n\n- (::String) --- Optional. Complete url (window.location.href) of the user's current page. When using the JavaScript pixel, this value is filled in automatically. Maximum length 5KB."]]