I have now tried to implement the Criterion myself, bascially using the decompiled code from EPiServer.Personalization.VisitorGroups.Criteria.ViewedPagesCriterion. It turns out that the criterion subscribes to a VisitedPage event which is supposedly raised when a page is visited. By debugging, I have determined that the event subscription is successful, but the event handler is never called. This means that, for some reason, EPiServer does not raise the event.
I tried to subscribe to the StartRequest event instead, and in this case the handler is called. This begs the question: Why is the VisitedPage event not raised when visiting pages?
I have now tried to implement the Criterion myself, bascially using the decompiled code from
EPiServer.Personalization.VisitorGroups.Criteria.ViewedPagesCriterion
. It turns out that the criterion subscribes to aVisitedPage
event which is supposedly raised when a page is visited. By debugging, I have determined that the event subscription is successful, but the event handler is never called. This means that, for some reason, EPiServer does not raise the event.I tried to subscribe to the
StartRequest
event instead, and in this case the handler is called. This begs the question: Why is theVisitedPage
event not raised when visiting pages?