[ 
https://issues.apache.org/jira/browse/UNOMI-690?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17631680#comment-17631680
 ] 

Kevan Jahanshahi edited comment on UNOMI-690 at 11/10/22 2:52 PM:
------------------------------------------------------------------

Now the control group are stored in the profile or session system properties, 
in the format:
{code:java}
{
  "systemProperties": {
    "personalizationStrategyStatus": [{
      "personalizationId": "40a6bca-348a-40c2-a00d-48c4346e8e2c",
      "inControlGroup": false,
      "timeStamp": "2022-11-08" 
    }]
  }
} {code}
This way we can persist personalization strategy status on profile or session 
in a generic way that could be reuse for other strategies than control groups.

The control group will also be returned in the personalization results in the 
context response, using this format:
Before:
{code:java}
{
  "personalizations": {
    "40a6bca-348a-40c2-a00d-48c4346e8e2c": ["variant_1_id", "variant_2_id"]
  }
} {code}
Now (We keep old syntax for retro-compatibility):
{code:java}
{
  "personalizations": {
    "40a6bca-348a-40c2-a00d-48c4346e8e2c": ["variant_1_id", "variant_2_id"]
  },
  "personalizationResults": {
    "40a6bca-348a-40c2-a00d-48c4346e8e2c": {
      "contentIds": ["variant_1_id", "variant_2_id"],
      "additionalResultInfos": {
        "inControlGroup": true
      }
    }
  }
} {code}
This way we can return additional informations related to the personalized 
results that will be useful for the client side.


was (Author: jkevan):
Now the control group are stored in the profile or session system properties, 
in the format:
{
  "systemProperties": \{
    "personalizationStrategyStatus": [{
      "personalizationId": "40a6bca-348a-40c2-a00d-48c4346e8e2c",
      "inControlGroup": false,
      "timeStamp": "2022-11-08" 
    }]
  }
}
This way we can persist personalization strategy status on profile or session 
in a generic way that could be reuse for other strategies than control groups.

The control group will also be returned in the personalization results in the 
context response, using this format:
Before:
{
  "personalizations": \{
    "40a6bca-348a-40c2-a00d-48c4346e8e2c": ["variant_1_id", "variant_2_id"]
  }
}
Now (We keep old syntax for retro-compatibility):
{
  "personalizations": \{
    "40a6bca-348a-40c2-a00d-48c4346e8e2c": ["variant_1_id", "variant_2_id"]
  },
  "personalizationResults": \{
    "40a6bca-348a-40c2-a00d-48c4346e8e2c": {
      "contentIds": ["variant_1_id", "variant_2_id"],
      "additionalResultInfos": {
        "inControlGroup": true
      }
    }
  }
}
This way we can return additional informations related to the personalized 
results that will be useful for the client side.

> Control groups dont work
> ------------------------
>
>                 Key: UNOMI-690
>                 URL: https://issues.apache.org/jira/browse/UNOMI-690
>             Project: Apache Unomi
>          Issue Type: Bug
>            Reporter: romain.gauthier
>            Assignee: Kevan Jahanshahi
>            Priority: Major
>             Fix For: unomi-1.7.0, unomi-2.1.0
>
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> In short: I think visitors that are not in the control group can fall into it 
> every time a variant is displayed, which means that if you're not in a 
> control group, you just have to refresh the page until you fall into it 
> (except if the traffic allocation for the control group is 0%)
> h3. Steps to reproduce 
> - Create a content personalization with variant A (fallback, no condition) 
> and variant b (page views > 2) 
> - Set control group to 25%, save & publish 
> - Open anonymous browser, refresh, refresh, refresh, refresh - close browser 
> - Open anonymous browser, refresh, refresh, refresh, refresh - close browser 
> - Open anonymous browser, refresh, refresh, refresh, refresh - close browser 
> h3. Observed behavior
> After a 5-10 refresh, the visitor will always see the default variant. If you 
> look in network, you'll see that the visitor is in the control group, always.
> It looks like the control group calculation is done for every variant 
> decisioning and that we dont store the fact that a visitor is NOT in a 
> control group.
> h3. Expected behaviours
> - Visitors profiles that are in the control group for the personalization 
> should stay in the control group - OK 
> - Visitor profiles that are NOT in the control group for the personalization 
> should stay out of it - KO 
> Looking at the class 
> https://github.com/apache/unomi/blob/master/services/src/main/java/org/apache/unomi/services/impl/personalization/PersonalizationServiceImpl.java
>  the problem can easily be seen: the code just checks if the control group 
> exists and the control group is never assigned to "false".



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to