Class: Google::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1EventDetail

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/recommendationengine_v1beta1/classes.rb,
lib/google/apis/recommendationengine_v1beta1/representations.rb,
lib/google/apis/recommendationengine_v1beta1/representations.rb

Overview

User event details shared by all recommendation types.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ GoogleCloudRecommendationengineV1beta1EventDetail

Returns a new instance of GoogleCloudRecommendationengineV1beta1EventDetail.



462
463
464
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 462

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#event_attributesGoogle::Apis::RecommendationengineV1beta1::GoogleCloudRecommendationengineV1beta1FeatureMap

FeatureMap represents extra features that customers want to include in the recommendation model for catalogs/user events as categorical/numerical features. Corresponds to the JSON property eventAttributes



415
416
417
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 415

def event_attributes
  @event_attributes
end

#experiment_idsArray<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). Corresponds to the JSON property experimentIds

Returns:

  • (Array<String>)


423
424
425
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 423

def experiment_ids
  @experiment_ids
end

#page_view_idString

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. Corresponds to the JSON property pageViewId

Returns:

  • (String)


433
434
435
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 433

def page_view_id
  @page_view_id
end

#recommendation_tokenString

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. Corresponds to the JSON property recommendationToken

Returns:

  • (String)


447
448
449
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 447

def recommendation_token
  @recommendation_token
end

#referrer_uriString

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

Returns:

  • (String)


453
454
455
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 453

def referrer_uri
  @referrer_uri
end

#uriString

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. Corresponds to the JSON property uri

Returns:

  • (String)


460
461
462
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 460

def uri
  @uri
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



467
468
469
470
471
472
473
474
# File 'lib/google/apis/recommendationengine_v1beta1/classes.rb', line 467

def update!(**args)
  @event_attributes = args[:event_attributes] if args.key?(:event_attributes)
  @experiment_ids = args[:experiment_ids] if args.key?(:experiment_ids)
  @page_view_id = args[:page_view_id] if args.key?(:page_view_id)
  @recommendation_token = args[:recommendation_token] if args.key?(:recommendation_token)
  @referrer_uri = args[:referrer_uri] if args.key?(:referrer_uri)
  @uri = args[:uri] if args.key?(:uri)
end