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 page details the \u003ccode\u003eUserEventService.UserEventServiceBase\u003c/code\u003e class, which is a base for implementing server-side user event handling in the Recommendations AI v1beta1 API.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the API is \u003ccode\u003e2.0.0-beta06\u003c/code\u003e, and previous versions \u003ccode\u003e2.0.0-beta05\u003c/code\u003e and \u003ccode\u003e1.0.0-beta03\u003c/code\u003e are also available.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eUserEventService.UserEventServiceBase\u003c/code\u003e class includes methods such as \u003ccode\u003eCollectUserEvent\u003c/code\u003e, \u003ccode\u003eImportUserEvents\u003c/code\u003e, \u003ccode\u003eListUserEvents\u003c/code\u003e, \u003ccode\u003ePurgeUserEvents\u003c/code\u003e, and \u003ccode\u003eWriteUserEvent\u003c/code\u003e for managing user events.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCollectUserEvent\u003c/code\u003e method is used by the Recommendations AI JavaScript pixel and is not intended for direct user calls.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eImportUserEvents\u003c/code\u003e method can be used to backfill historical user events, with a subset of successful insertions being a possibility.\u003c/p\u003e\n"]]],[],null,["# Recommendations AI v1beta1 API - Class UserEventService.UserEventServiceBase (2.0.0-beta06)\n\nVersion latestkeyboard_arrow_down\n\n- [2.0.0-beta06 (latest)](/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.UserEventService.UserEventServiceBase)\n- [2.0.0-beta05](/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/2.0.0-beta05/Google.Cloud.RecommendationEngine.V1Beta1.UserEventService.UserEventServiceBase)\n- [1.0.0-beta03](/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/1.0.0-beta03/Google.Cloud.RecommendationEngine.V1Beta1.UserEventService.UserEventServiceBase) \n\n [BindServiceMethod(typeof(UserEventService), \"BindService\")]\n public abstract class UserEventService.UserEventServiceBase\n\nReference documentation and code samples for the Recommendations AI v1beta1 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.RecommendationEngine.V1Beta1](/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1)\n\nAssembly\n--------\n\nGoogle.Cloud.RecommendationEngine.V1Beta1.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 3rd party domain.\n\nThis method is used only by the Recommendations AI JavaScript pixel.\nUsers 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### ListUserEvents(ListUserEventsRequest, ServerCallContext)\n\n public virtual Task\u003cListUserEventsResponse\u003e ListUserEvents(ListUserEventsRequest request, ServerCallContext context)\n\nGets a list of user events within a time range, with potential filtering.\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."]]