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\u003eThis documentation covers the \u003ccode\u003eUserEventService.UserEventServiceBase\u003c/code\u003e class within the Google Cloud Discovery Engine v1 API, which serves as the base for server-side implementations of the \u003ccode\u003eUserEventService\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of this class is 1.6.0, and previous versions down to 1.0.0-beta06 are also accessible for review in this documentation.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eUserEventService.UserEventServiceBase\u003c/code\u003e class provides four main methods: \u003ccode\u003eCollectUserEvent\u003c/code\u003e, \u003ccode\u003eImportUserEvents\u003c/code\u003e, \u003ccode\u003ePurgeUserEvents\u003c/code\u003e, and \u003ccode\u003eWriteUserEvent\u003c/code\u003e, each handling different types of user event interactions.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eCollectUserEvent\u003c/code\u003e handles single user events using GET requests, \u003ccode\u003eImportUserEvents\u003c/code\u003e deals with bulk imports, \u003ccode\u003ePurgeUserEvents\u003c/code\u003e manages the permanent deletion of user events, and \u003ccode\u003eWriteUserEvent\u003c/code\u003e processes the writing of single user events.\u003c/p\u003e\n"],["\u003cp\u003eEach of these methods take specific request and server context parameters and return an appropriate type such as \u003ccode\u003eHttpBody\u003c/code\u003e, \u003ccode\u003eOperation\u003c/code\u003e, or \u003ccode\u003eUserEvent\u003c/code\u003e, wrapped in a \u003ccode\u003eTask\u003c/code\u003e object.\u003c/p\u003e\n"]]],[],null,["# Discovery Engine v1 API - Class UserEventService.UserEventServiceBase (1.9.0)\n\nVersion latestkeyboard_arrow_down\n\n- [1.9.0 (latest)](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1.UserEventService.UserEventServiceBase)\n- [1.8.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.8.0/Google.Cloud.DiscoveryEngine.V1.UserEventService.UserEventServiceBase)\n- [1.7.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.7.0/Google.Cloud.DiscoveryEngine.V1.UserEventService.UserEventServiceBase)\n- [1.6.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.6.0/Google.Cloud.DiscoveryEngine.V1.UserEventService.UserEventServiceBase)\n- [1.5.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.5.0/Google.Cloud.DiscoveryEngine.V1.UserEventService.UserEventServiceBase)\n- [1.4.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.4.0/Google.Cloud.DiscoveryEngine.V1.UserEventService.UserEventServiceBase)\n- [1.3.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.3.0/Google.Cloud.DiscoveryEngine.V1.UserEventService.UserEventServiceBase)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.2.0/Google.Cloud.DiscoveryEngine.V1.UserEventService.UserEventServiceBase)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.1.0/Google.Cloud.DiscoveryEngine.V1.UserEventService.UserEventServiceBase)\n- [1.0.0-beta06](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/1.0.0-beta06/Google.Cloud.DiscoveryEngine.V1.UserEventService.UserEventServiceBase) \n\n [BindServiceMethod(typeof(UserEventService), \"BindService\")]\n public abstract class UserEventService.UserEventServiceBase\n\nReference documentation and code samples for the Discovery Engine v1 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.V1](/dotnet/docs/reference/Google.Cloud.DiscoveryEngine.V1/latest/Google.Cloud.DiscoveryEngine.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.DiscoveryEngine.V1.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."]]