Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Mohamed Ramez 9 posts 88 karma points
    Jul 11, 2019 @ 15:08
    Mohamed Ramez
    0

    Pages Viewed not working as required

    I'm facing an issue with the Pages Viewed criteria, the personalisationGroupsPagesViewed cookie has the correct values of the pages IDs the user has visited, the action on the customizable page is not firing correctly, also the @Umbraco.MatchesGroup("some group") always turns to be false.

    For reference, Umbraco 7.14, I used the CodeShare starter kit, added the personalisation group picker to the "Article" doc type, created a Personalisation Group in the Personalisation Groups Folder which checks for visiting the about page, selected this Personalisation Group from an article, added the ".Where(x => x.ShowToVisitor())" to the list building code on Partials/Content/_LatestArticles.cshtml

    IEnumerable<IPublishedContent> articles = articleList.Children.Where(x => x.IsVisible() && x.DocumentTypeAlias == "article").Where(x => x.ShowToVisitor()).OrderByDescending(x => x.GetPropertyValue<DateTime>("articleDate"));
    

    Issue was created also here: https://github.com/AndyButland/UmbracoPersonalisationGroups/issues/19

  • Andy Butland 422 posts 2334 karma points MVP 4x hq c-trib
    Jul 11, 2019 @ 15:11
    Andy Butland
    0

    Hi - yes, I saw the issue raised, sorry for not responding. Am hoping to have chance to take a look at the weekend.

    Cheers

    Andy

  • Mohamed Ramez 9 posts 88 karma points
    Jul 11, 2019 @ 15:59
    Mohamed Ramez
    0

    Many thanks, will be waiting for you

  • Andy Butland 422 posts 2334 karma points MVP 4x hq c-trib
    Jul 13, 2019 @ 10:32
    Andy Butland
    100

    Have found the bug - see updates in the issue tracker.

    Should be resolved now with releases 1.0.2 (V7) and 2.1.1 (V8), available on our and nuget.

  • Mohamed Ramez 9 posts 88 karma points
    Jul 14, 2019 @ 08:41
    Mohamed Ramez
    0

    Worked like a charm. Thanks a lot Andy

  • Mohamed Ramez 9 posts 88 karma points
    Jul 15, 2019 @ 11:41
    Mohamed Ramez
    0

    I'm facing something totally different now, I reversed the criteria so now if the user didn't see this page he'll be in this group. This works fine. Criteria

    Cookies before visiting the page

    The issue is when the user visits this page, the "persistentMatchedGroups" cookie doesn't change, I beleive that the user should be removed from this group if the negative condition is removed by visiting the page in the criteria.

    Cookies after visiting the page

  • Andy Butland 422 posts 2334 karma points MVP 4x hq c-trib
    Jul 15, 2019 @ 11:48
    Andy Butland
    0

    I think you probably want to select a different option for the "Duration in group" option, likely "Page". If you do that, the matching is calculated on every relevant page request.

    The idea of the persistent groups is for when you want to associate a user with a group when their membership is first calculated, and then they stay in it. You likely don't want that for your use case - but if you imagine a group that is defined based on a querystring value for when someone comes to the home page, then you can see there it might be useful that they stay in that group, even if they navigate away and back to the home page without the querystring in place.

    Andy

  • Mohamed Ramez 9 posts 88 karma points
    Jul 15, 2019 @ 11:59
    Mohamed Ramez
    0

    Actually your suggestion worked well, thanks for that.

    The idea I had was using the group to push content in a way to enhance his experience by offering more content he hasn't seen before, this is why I believed it's logic. Still your solution worked.

Please Sign in or register to post replies

Write your reply to:

Draft