Click or drag to resize
StrandsEventsMemory Class
When it isn't right time to render Strands tracking event (for example the HTTP response status is 302, so JavaScripts wouldn't be executed), this class can remember the information about the event and when the time is right, it will provide information that event tracking is pending.
Inheritance Hierarchy
SystemObject
  CMS.StrandsRecommender.InternalStrandsEventsMemory

Namespace: CMS.StrandsRecommender.Internal
Assembly: CMS.StrandsRecommender (in CMS.StrandsRecommender.dll) Version: 11.0.0
Syntax
C#
public static class StrandsEventsMemory

The StrandsEventsMemory type exposes the following members.

Methods
  NameDescription
Public methodStatic memberIsCartUpdateEventPending
Checks if cart update event should be rendered. This method returns true only once and after that assumes that event has been rendered.
Public methodStatic memberIsItemsPurchasedEventPending
Checks if item purchased event should be rendered. This method returns true only once and after that assumes that event has been rendered.
Public methodStatic memberRememberCartUpdateEvent
Stores information that cart update event should be rendered. After calling this method, IsCartUpdateEventPending method will return true once for the same user. Information will be stored in Cookies.
Public methodStatic memberRememberItemsPurchasedEvent
Stores information that items purchased event should be rendered. After calling this method, IsItemsPurchasedEventPending(Int32) method will return true once for the same user. Information will be stored in Cookies.
Top
Remarks
Class uses Cookies internally to remember pending events. This is needed, because there comes a redirect after items are purchased or shopping cart is updated. This means that HTTP response is 302 and is not rendered on the client side and thus JavaScript is not executed. Therefore information that event happened is stored to user's cookie and is retrieved later, when response is 200.
See Also