Google Cloud Recommendation Engine V1beta1 Client - Class EventDetail (0.5.0)

Reference documentation and code samples for the Google Cloud Recommendation Engine V1beta1 Client class EventDetail.

User event details shared by all recommendation types.

Generated from protobuf message google.cloud.recommendationengine.v1beta1.EventDetail

Methods

__construct

Constructor.

Parameters
NameDescription
data array

Optional. Data for populating the Message object.

↳ uri 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.

↳ referrer_uri string

Optional. The referrer url of the current page. When using the JavaScript pixel, this value is filled in automatically.

↳ page_view_id 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.

↳ experiment_ids array

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).

↳ recommendation_token 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.

↳ event_attributes Google\Cloud\RecommendationEngine\V1beta1\FeatureMap

Optional. Extra user event features to include in the recommendation model. 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.

getUri

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
TypeDescription
string

setUri

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.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getReferrerUri

Optional. The referrer url of the current page. When using the JavaScript pixel, this value is filled in automatically.

Returns
TypeDescription
string

setReferrerUri

Optional. The referrer url of the current page. When using the JavaScript pixel, this value is filled in automatically.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getPageViewId

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
TypeDescription
string

setPageViewId

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.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getExperimentIds

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
TypeDescription
Google\Protobuf\Internal\RepeatedField

setExperimentIds

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).

Parameter
NameDescription
var string[]
Returns
TypeDescription
$this

getRecommendationToken

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
TypeDescription
string

setRecommendationToken

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.

Parameter
NameDescription
var string
Returns
TypeDescription
$this

getEventAttributes

Optional. Extra user event features to include in the recommendation model.

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.

Returns
TypeDescription
Google\Cloud\RecommendationEngine\V1beta1\FeatureMap|null

hasEventAttributes

clearEventAttributes

setEventAttributes

Optional. Extra user event features to include in the recommendation model.

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.

Parameter
NameDescription
var Google\Cloud\RecommendationEngine\V1beta1\FeatureMap
Returns
TypeDescription
$this