public virtual Task<Operation> ImportUserEvents(ImportUserEventsRequest request, ServerCallContext context)
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.
public virtual Task<Operation> PurgeUserEvents(PurgeUserEventsRequest request, ServerCallContext context)
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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-07 UTC."],[[["\u003cp\u003eThe \u003ccode\u003eUserEventService.UserEventServiceBase\u003c/code\u003e class is the base for server-side implementations of the UserEventService within the Google Cloud Discovery Engine v1beta API.\u003c/p\u003e\n"],["\u003cp\u003eThis class includes methods to collect user events (\u003ccode\u003eCollectUserEvent\u003c/code\u003e), import user events in bulk (\u003ccode\u003eImportUserEvents\u003c/code\u003e), purge user events based on filters (\u003ccode\u003ePurgeUserEvents\u003c/code\u003e), and write a single user event (\u003ccode\u003eWriteUserEvent\u003c/code\u003e).\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCollectUserEvent\u003c/code\u003e method is designed for use by the Discovery Engine API JavaScript pixel and Google Tag Manager, and should not be directly called by other users.\u003c/p\u003e\n"],["\u003cp\u003eMethods like \u003ccode\u003eImportUserEvents\u003c/code\u003e and \u003ccode\u003ePurgeUserEvents\u003c/code\u003e return a \u003ccode\u003eTask<Operation>\u003c/code\u003e, indicating long-running operations that could take a significant amount of time to complete.\u003c/p\u003e\n"],["\u003cp\u003eThe class is located within the \u003ccode\u003eGoogle.Cloud.DiscoveryEngine.V1Beta\u003c/code\u003e namespace, and is part of the \u003ccode\u003eGoogle.Cloud.DiscoveryEngine.V1Beta.dll\u003c/code\u003e assembly.\u003c/p\u003e\n"]]],[],null,["# Discovery Engine v1beta API - Class UserEventService.UserEventServiceBase (1.0.0-beta19)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-beta19 (latest)](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta.UserEventService.UserEventServiceBase)\n- [1.0.0-beta18](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/1.0.0-beta18/Google.Cloud.DiscoveryEngine.V1Beta.UserEventService.UserEventServiceBase) \n\n [BindServiceMethod(typeof(UserEventService), \"BindService\")]\n public abstract class UserEventService.UserEventServiceBase\n\nReference documentation and code samples for the Discovery Engine v1beta API class UserEventService.UserEventServiceBase.\n\nBase class for server-side implementations of UserEventService \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e UserEventService.UserEventServiceBase \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.DiscoveryEngine.V1Beta](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1Beta/latest/Google.Cloud.DiscoveryEngine.V1Beta)\n\nAssembly\n--------\n\nGoogle.Cloud.DiscoveryEngine.V1Beta.dll\n\nMethods\n-------\n\n### CollectUserEvent(CollectUserEventRequest, ServerCallContext)\n\n public virtual Task\u003cHttpBody\u003e CollectUserEvent(CollectUserEventRequest request, ServerCallContext context)\n\nWrites a single user event from the browser. This uses a GET request to\ndue to browser restriction of POST-ing to a third-party domain.\n\nThis method is used only by the Discovery Engine API JavaScript pixel and\nGoogle Tag Manager. Users should not call this method directly.\n\n### ImportUserEvents(ImportUserEventsRequest, ServerCallContext)\n\n public virtual Task\u003cOperation\u003e ImportUserEvents(ImportUserEventsRequest request, ServerCallContext context)\n\nBulk import of user events. Request processing might be\nsynchronous. Events that already exist are skipped.\nUse this method for backfilling historical user events.\n\nOperation.response is of type ImportResponse. Note that it is\npossible for a subset of the items to be successfully inserted.\nOperation.metadata is of type ImportMetadata.\n\n### PurgeUserEvents(PurgeUserEventsRequest, ServerCallContext)\n\n public virtual Task\u003cOperation\u003e PurgeUserEvents(PurgeUserEventsRequest request, ServerCallContext context)\n\nDeletes permanently all user events specified by the filter provided.\nDepending on the number of events specified by the filter, this operation\ncould take hours or days to complete. To test a filter, use the list\ncommand first.\n\n### WriteUserEvent(WriteUserEventRequest, ServerCallContext)\n\n public virtual Task\u003cUserEvent\u003e WriteUserEvent(WriteUserEventRequest request, ServerCallContext context)\n\nWrites a single user event."]]