user_events
Creates, updates, deletes, gets or lists a user_events
resource.
Overview
Name | user_events |
Type | Resource |
Id | google.retail.user_events |
Fields
The following fields are returned by SELECT
queries:
SELECT
not supported for this resource, use SHOW METHODS
to view available operations for the resource.
Methods
The following methods are available for this resource:
Name | Accessible by | Required Params | Optional Params | Description |
---|---|---|---|---|
projects_locations_catalogs_user_events_write | exec | projectsId , locationsId , catalogsId | writeAsync | Writes a single user event. |
projects_locations_catalogs_user_events_collect | exec | projectsId , locationsId , catalogsId | Writes a single user event from the browser. For larger user event payload over 16 KB, the POST method should be used instead, otherwise a 400 Bad Request error is returned. This method is used only by the Retail API JavaScript pixel and Google Tag Manager. Users should not call this method directly. | |
projects_locations_catalogs_user_events_purge | exec | projectsId , locationsId , catalogsId | Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To test a filter, use the list command first. | |
projects_locations_catalogs_user_events_import | exec | projectsId , locationsId , catalogsId | Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response is of type ImportResponse . Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata is of type ImportMetadata . | |
projects_locations_catalogs_user_events_rejoin | exec | projectsId , locationsId , catalogsId | Starts a user-event rejoin operation with latest product catalog. Events are not annotated with detailed product information for products that are missing from the catalog when the user event is ingested. These events are stored as unjoined events with limited usage on training and serving. You can use this method to start a join operation on specified events with the latest version of product catalog. You can also use this method to correct events joined with the wrong product catalog. A rejoin operation can take hours or days to complete. |
Parameters
Parameters can be passed in the WHERE
clause of a query. Check the Methods section to see which parameters are required or optional for each operation.
Name | Datatype | Description |
---|---|---|
catalogsId | string | |
locationsId | string | |
projectsId | string | |
writeAsync | boolean |
Lifecycle Methods
- projects_locations_catalogs_user_events_write
- projects_locations_catalogs_user_events_collect
- projects_locations_catalogs_user_events_purge
- projects_locations_catalogs_user_events_import
- projects_locations_catalogs_user_events_rejoin
Writes a single user event.
EXEC google.retail.user_events.projects_locations_catalogs_user_events_write
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@catalogsId='{{ catalogsId }}' --required,
@writeAsync={{ writeAsync }}
@@json=
'{
"eventType": "{{ eventType }}",
"visitorId": "{{ visitorId }}",
"sessionId": "{{ sessionId }}",
"eventTime": "{{ eventTime }}",
"experimentIds": "{{ experimentIds }}",
"attributionToken": "{{ attributionToken }}",
"productDetails": "{{ productDetails }}",
"completionDetail": "{{ completionDetail }}",
"attributes": "{{ attributes }}",
"cartId": "{{ cartId }}",
"purchaseTransaction": "{{ purchaseTransaction }}",
"searchQuery": "{{ searchQuery }}",
"filter": "{{ filter }}",
"orderBy": "{{ orderBy }}",
"offset": {{ offset }},
"pageCategories": "{{ pageCategories }}",
"userInfo": "{{ userInfo }}",
"uri": "{{ uri }}",
"referrerUri": "{{ referrerUri }}",
"pageViewId": "{{ pageViewId }}",
"entity": "{{ entity }}",
"panels": "{{ panels }}"
}';
Writes a single user event from the browser. For larger user event payload over 16 KB, the POST method should be used instead, otherwise a 400 Bad Request error is returned. This method is used only by the Retail API JavaScript pixel and Google Tag Manager. Users should not call this method directly.
EXEC google.retail.user_events.projects_locations_catalogs_user_events_collect
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@catalogsId='{{ catalogsId }}' --required
@@json=
'{
"prebuiltRule": "{{ prebuiltRule }}",
"userEvent": "{{ userEvent }}",
"uri": "{{ uri }}",
"ets": "{{ ets }}",
"rawJson": "{{ rawJson }}"
}';
Deletes permanently all user events specified by the filter provided. Depending on the number of events specified by the filter, this operation could take hours or days to complete. To test a filter, use the list command first.
EXEC google.retail.user_events.projects_locations_catalogs_user_events_purge
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@catalogsId='{{ catalogsId }}' --required
@@json=
'{
"filter": "{{ filter }}",
"force": {{ force }}
}';
Bulk import of User events. Request processing might be synchronous. Events that already exist are skipped. Use this method for backfilling historical user events. Operation.response
is of type ImportResponse
. Note that it is possible for a subset of the items to be successfully inserted. Operation.metadata
is of type ImportMetadata
.
EXEC google.retail.user_events.projects_locations_catalogs_user_events_import
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@catalogsId='{{ catalogsId }}' --required
@@json=
'{
"inputConfig": "{{ inputConfig }}",
"errorsConfig": "{{ errorsConfig }}"
}';
Starts a user-event rejoin operation with latest product catalog. Events are not annotated with detailed product information for products that are missing from the catalog when the user event is ingested. These events are stored as unjoined events with limited usage on training and serving. You can use this method to start a join operation on specified events with the latest version of product catalog. You can also use this method to correct events joined with the wrong product catalog. A rejoin operation can take hours or days to complete.
EXEC google.retail.user_events.projects_locations_catalogs_user_events_rejoin
@projectsId='{{ projectsId }}' --required,
@locationsId='{{ locationsId }}' --required,
@catalogsId='{{ catalogsId }}' --required
@@json=
'{
"userEventRejoinScope": "{{ userEventRejoinScope }}"
}';