v1

latestOpenAPI 3.0.0Creative Commons Attribution 3.02026-07-13175378.4 KB
projects

Writes a single user event.

post/v1beta1/{+parent}/userEvents:write

Path parameters

parentstring required

Required. The parent eventStore resource name, such as "projects/1234/locations/global/catalogs/default_catalog/eventStores/default_event_store".

Request body

eventSource'EVENT_SOURCE_UNSPECIFIED' | 'AUTOML' | 'ECOMMERCE' | 'BATCH_UPLOAD'

Optional. This field should not be set when using JavaScript pixel or the Recommendations AI Tag. Defaults to EVENT_SOURCE_UNSPECIFIED.

eventTimestring google-datetime

Optional. Only required for ImportUserEvents method. Timestamp of user event created.

eventTypestring

Required. User event type. Allowed values are: * add-to-cart Products being added to cart. * add-to-list Items being added to a list (shopping list, favorites etc). * category-page-view Special pages such as sale or promotion pages viewed. * checkout-start User starting a checkout process. * detail-page-view Products detail page viewed. * home-page-view Homepage viewed. * page-visit Generic page visits not included in the event types above. * purchase-complete User finishing a purchase. * refund Purchased items being refunded or returned. * remove-from-cart Products being removed from cart. * remove-from-list Items being removed from a list. * search Product search. * shopping-cart-page-view User viewing a shopping cart. * impression List of items displayed. Used by Google Tag Manager.

Response

Successful response