[[["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\u003eUserEvent\u003c/code\u003e class is part of the Recommendations AI v1beta1 API, capturing user interactions on a customer's website.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eUserEvent\u003c/code\u003e implements several interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, and inherits from the base \u003ccode\u003eobject\u003c/code\u003e class.\u003c/p\u003e\n"],["\u003cp\u003eThe class includes properties like \u003ccode\u003eEventDetail\u003c/code\u003e, \u003ccode\u003eEventSource\u003c/code\u003e, \u003ccode\u003eEventTime\u003c/code\u003e, \u003ccode\u003eEventType\u003c/code\u003e, \u003ccode\u003eProductEventDetail\u003c/code\u003e, and \u003ccode\u003eUserInfo\u003c/code\u003e, to store metadata about the user event, and there are specified event types that require or do not allow the 'ProductEventDetail' field.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003eEventType\u003c/code\u003e is a required field representing the user event type, which includes values such as \u003ccode\u003eadd-to-cart\u003c/code\u003e, \u003ccode\u003edetail-page-view\u003c/code\u003e, \u003ccode\u003esearch\u003c/code\u003e, and \u003ccode\u003epurchase-complete\u003c/code\u003e, among others.\u003c/p\u003e\n"],["\u003cp\u003eThere are 3 versions of the \u003ccode\u003eUserEvent\u003c/code\u003e available in this documentation: 2.0.0-beta06, 2.0.0-beta05, and 1.0.0-beta03, with 2.0.0-beta06 being the most current.\u003c/p\u003e\n"]]],[],null,["# Recommendations AI v1beta1 API - Class UserEvent (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.UserEvent)\n- [2.0.0-beta05](/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/2.0.0-beta05/Google.Cloud.RecommendationEngine.V1Beta1.UserEvent)\n- [1.0.0-beta03](/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/1.0.0-beta03/Google.Cloud.RecommendationEngine.V1Beta1.UserEvent) \n\n public sealed class UserEvent : IMessage\u003cUserEvent\u003e, IEquatable\u003cUserEvent\u003e, IDeepCloneable\u003cUserEvent\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Recommendations AI v1beta1 API class UserEvent.\n\nUserEvent captures all metadata information recommendation engine needs to\nknow about how end users interact with customers' website. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e UserEvent \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[UserEvent](/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.UserEvent), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[UserEvent](/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.UserEvent), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[UserEvent](/dotnet/docs/reference/Google.Cloud.RecommendationEngine.V1Beta1/latest/Google.Cloud.RecommendationEngine.V1Beta1.UserEvent), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \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.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\nConstructors\n------------\n\n### UserEvent()\n\n public UserEvent()\n\n### UserEvent(UserEvent)\n\n public UserEvent(UserEvent other)\n\nProperties\n----------\n\n### EventDetail\n\n public EventDetail EventDetail { get; set; }\n\nOptional. User event detailed information common across different\nrecommendation types.\n\n### EventSource\n\n public UserEvent.Types.EventSource EventSource { get; set; }\n\nOptional. This field should *not* be set when using JavaScript pixel\nor the Recommendations AI Tag. Defaults to `EVENT_SOURCE_UNSPECIFIED`.\n\n### EventTime\n\n public Timestamp EventTime { get; set; }\n\nOptional. Only required for ImportUserEvents method. Timestamp of user\nevent created.\n\n### EventType\n\n public string EventType { get; set; }\n\nRequired. User event type. Allowed values are:\n\n- `add-to-cart` Products being added to cart.\n- `add-to-list` Items being added to a list (shopping list, favorites etc).\n- `category-page-view` Special pages such as sale or promotion pages viewed.\n- `checkout-start` User starting a checkout process.\n- `detail-page-view` Products detail page viewed.\n- `home-page-view` Homepage viewed.\n- `page-visit` Generic page visits not included in the event types above.\n- `purchase-complete` User finishing a purchase.\n- `refund` Purchased items being refunded or returned.\n- `remove-from-cart` Products being removed from cart.\n- `remove-from-list` Items being removed from a list.\n- `search` Product search.\n- `shopping-cart-page-view` User viewing a shopping cart.\n- `impression` List of items displayed. Used by Google Tag Manager.\n\n### ProductEventDetail\n\n public ProductEventDetail ProductEventDetail { get; set; }\n\nOptional. Retail product specific user event metadata.\n\nThis field is required for the following event types:\n\n- `add-to-cart`\n- `add-to-list`\n- `category-page-view`\n- `checkout-start`\n- `detail-page-view`\n- `purchase-complete`\n- `refund`\n- `remove-from-cart`\n- `remove-from-list`\n- `search`\n\nThis field is optional for the following event types:\n\n- `page-visit`\n- `shopping-cart-page-view` - note that 'product_event_detail' should be set for this unless the shopping cart is empty.\n\nThis field is not allowed for the following event types:\n\n- `home-page-view`\n\n### UserInfo\n\n public UserInfo UserInfo { get; set; }\n\nRequired. User information."]]