class ProjectsLocationsCollectionsDataStoresUserEvents extends Resource (View source)

The "userEvents" collection of methods.

Typical usage is:

 $discoveryengineService = new Google\Service\DiscoveryEngine(...);
 $userEvents = $discoveryengineService->projects_locations_collections_dataStores_userEvents;

Methods

collect(string $parent, array $optParams = [])

Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly. (userEvents.collect)

import(string $parent, GoogleCloudDiscoveryengineV1ImportUserEventsRequest $postBody, array $optParams = [])

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.

purge(string $parent, GoogleCloudDiscoveryengineV1PurgeUserEventsRequest $postBody, array $optParams = [])

Deletes permanently all user events specified by the filter provided.

write(string $parent, GoogleCloudDiscoveryengineV1UserEvent $postBody, array $optParams = [])

Writes a single user event. (userEvents.write)

Details

GoogleApiHttpBody collect(string $parent, array $optParams = [])

Writes a single user event from the browser. This uses a GET request to due to browser restriction of POST-ing to a third-party domain. This method is used only by the Discovery Engine API JavaScript pixel and Google Tag Manager. Users should not call this method directly. (userEvents.collect)

Parameters

string $parent

Required. The parent DataStore resource name, such as projects/{project}/locations/{location}/collections/{collection}/dataStores/{ data_store}.

array $optParams

Optional parameters.

Return Value

GoogleApiHttpBody

Exceptions

Exception

GoogleLongrunningOperation import(string $parent, GoogleCloudDiscoveryengineV1ImportUserEventsRequest $postBody, array $optParams = [])

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. (userEvents.import)

Parameters

string $parent

Required. Parent DataStore resource name, of the form projects/{project}/locations/{location}/collections/{collection}/dataStores/{ data_store}

GoogleCloudDiscoveryengineV1ImportUserEventsRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleLongrunningOperation purge(string $parent, GoogleCloudDiscoveryengineV1PurgeUserEventsRequest $postBody, array $optParams = [])

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. (userEvents.purge)

Parameters

string $parent

Required. The resource name of the catalog under which the events are created. The format is projects/${projectId}/locations/global /collections/{$collectionId}/dataStores/${dataStoreId}

GoogleCloudDiscoveryengineV1PurgeUserEventsRequest $postBody
array $optParams

Optional parameters.

Return Value

GoogleLongrunningOperation

Exceptions

Exception

GoogleCloudDiscoveryengineV1UserEvent write(string $parent, GoogleCloudDiscoveryengineV1UserEvent $postBody, array $optParams = [])

Writes a single user event. (userEvents.write)

Parameters

string $parent

Required. The parent resource name. If the write user event action is applied in DataStore level, the format is: projects/{project }/locations/{location}/collections/{collection}/dataStores/{data_store}. If the write user event action is applied in Location level, for example, the event with Document across multiple DataStore, the format is: projects/{project}/locations/{location}.

GoogleCloudDiscoveryengineV1UserEvent $postBody
array $optParams

Optional parameters.

Return Value

GoogleCloudDiscoveryengineV1UserEvent

Exceptions

Exception