@@ -2362,32 +2362,15 @@ def search_project_location_catalog_serving_configs(placement, google_cloud_reta
23622362 execute_or_queue_command ( command , &block )
23632363 end
23642364
2365- # Writes a single user event from the browser. This uses a GET request to due to
2366- # browser restriction of POST-ing to a 3rd party domain. This method is used
2367- # only by the Retail API JavaScript pixel and Google Tag Manager. Users should
2368- # not call this method directly.
2365+ # Writes a single user event from the browser. For larger user event payload
2366+ # over 16 KB, the POST method should be used instead, otherwise a 400 Bad
2367+ # Request error is returned. This method is used only by the Retail API
2368+ # JavaScript pixel and Google Tag Manager. Users should not call this method
2369+ # directly.
23692370 # @param [String] parent
23702371 # Required. The parent catalog name, such as `projects/1234/locations/global/
23712372 # catalogs/default_catalog`.
2372- # @param [Fixnum] ets
2373- # The event timestamp in milliseconds. This prevents browser caching of
2374- # otherwise identical get requests. The name is abbreviated to reduce the
2375- # payload bytes.
2376- # @param [String] prebuilt_rule
2377- # The prebuilt rule name that can convert a specific type of raw_json. For
2378- # example: "ga4_bq" rule for the GA4 user event schema.
2379- # @param [String] raw_json
2380- # An arbitrary serialized JSON string that contains necessary information that
2381- # can comprise a user event. When this field is specified, the user_event field
2382- # will be ignored. Note: line-delimited JSON is not supported, a single JSON
2383- # only.
2384- # @param [String] uri
2385- # The URL including cgi-parameters but excluding the hash fragment with a length
2386- # limit of 5,000 characters. This is often more useful than the referer URL,
2387- # because many browsers only send the domain for 3rd party requests.
2388- # @param [String] user_event
2389- # Required. URL encoded UserEvent proto with a length limit of 2,000,000
2390- # characters.
2373+ # @param [Google::Apis::RetailV2::GoogleCloudRetailV2CollectUserEventRequest] google_cloud_retail_v2_collect_user_event_request_object
23912374 # @param [String] fields
23922375 # Selector specifying which fields to include in a partial response.
23932376 # @param [String] quota_user
@@ -2405,16 +2388,13 @@ def search_project_location_catalog_serving_configs(placement, google_cloud_reta
24052388 # @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
24062389 # @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
24072390 # @raise [Google::Apis::AuthorizationError] Authorization is required
2408- def collect_project_location_catalog_user_event ( parent , ets : nil , prebuilt_rule : nil , raw_json : nil , uri : nil , user_event : nil , fields : nil , quota_user : nil , options : nil , &block )
2409- command = make_simple_command ( :get , 'v2/{+parent}/userEvents:collect' , options )
2391+ def collect_project_location_catalog_user_event ( parent , google_cloud_retail_v2_collect_user_event_request_object = nil , fields : nil , quota_user : nil , options : nil , &block )
2392+ command = make_simple_command ( :post , 'v2/{+parent}/userEvents:collect' , options )
2393+ command . request_representation = Google ::Apis ::RetailV2 ::GoogleCloudRetailV2CollectUserEventRequest ::Representation
2394+ command . request_object = google_cloud_retail_v2_collect_user_event_request_object
24102395 command . response_representation = Google ::Apis ::RetailV2 ::GoogleApiHttpBody ::Representation
24112396 command . response_class = Google ::Apis ::RetailV2 ::GoogleApiHttpBody
24122397 command . params [ 'parent' ] = parent unless parent . nil?
2413- command . query [ 'ets' ] = ets unless ets . nil?
2414- command . query [ 'prebuiltRule' ] = prebuilt_rule unless prebuilt_rule . nil?
2415- command . query [ 'rawJson' ] = raw_json unless raw_json . nil?
2416- command . query [ 'uri' ] = uri unless uri . nil?
2417- command . query [ 'userEvent' ] = user_event unless user_event . nil?
24182398 command . query [ 'fields' ] = fields unless fields . nil?
24192399 command . query [ 'quotaUser' ] = quota_user unless quota_user . nil?
24202400 execute_or_queue_command ( command , &block )
0 commit comments