Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User id Module sample rate #10705

Open
jdwieland8282 opened this issue Oct 26, 2023 · 5 comments
Open

User id Module sample rate #10705

jdwieland8282 opened this issue Oct 26, 2023 · 5 comments
Assignees
Labels

Comments

@jdwieland8282
Copy link
Member

Problem

Publishers are unable to test and run experiments natively in Prebid and must rely on partners to help set up tests & control groups when they want to test various setConfig() objects.

example

A publisher may wish to test CPM change for 2 different setConfig()s

1

 pbjs.setConfig({
     userSync: {
         userIds: [{
             name: "sharedId",
             storage: {
                 type: "cookie",
                 name: "_sharedid",         
                 expires: 365         
             }
         }]
     }
 });

2

 pbjs.setConfig({
     userSync: {
         userIds: [{
             name: "OtherID",
             storage: {
                 type: "cookie",
                 name: "_OtherID",       
                 expires: 365             
             }
         }]
     }
 });

UseCase

  1. As a publisher I want to test how my inventory monetizes when I include a userid module subadapter like sharedid, I want to be able to compare the presence of sharedid against no user id at all.
    1. As a publisher I want to test how my inventory monetizes when I include a userid module subadapter like sharedid, I want to be able to compare the presence of sharedid against a different user id such as "OtherID"

Requirements

  1. setConfig() should support a sample rate int for the test cohort. Where n percent of the time the setConfig() loads one way, and n of the time it loads a different way.
  2. Prebid must signal back to the publisher what imps were part of the test and which were part of the control.
    ex.
  • configureable response endpoint where Impression id and cohort label (test or control) are logged.
curl --location 'http://pub.com/prebid/experiement?
--header 'Content-Type: application/json' \
--data '{
  "entries": [
    {
      "impression": 12345,
      "cohort": "test" //control
    }
  ]
}'
@patmmccann patmmccann transferred this issue from prebid/prebid.github.io Nov 8, 2023
@patmmccann
Copy link
Collaborator

patmmccann commented Nov 20, 2023

I think with documentation we can completely solve:

if crypto.getRandom.... or Math.random() > .5 then set a else set b
if a setconfig(one way)
if b setconfig(other way)
googletag.setTargeting(test=[a or b])
and/or the generic analytics adapter could be aware of the test

There seems to be a bit of a gap expressing tests to analytics adapters, but if we form a convention, we should be good.

how about

pbjs.mergeConfig {
 
analyticsLabels: {
test1 : a,
test2 : d }
}

Then we could have genericAnalytics pick up analyticsLabels by adding analyticsLabels to each event and making sure it went over the wire. Other analytics modules could be Pr'd to do the same by their maintainers.

@patmmccann
Copy link
Collaborator

patmmccann commented Nov 20, 2023

@jdwieland8282 tentatively marking ready for dev but we'd love your feedback before getting started

cc @3link

@3link
Copy link
Contributor

3link commented Nov 20, 2023

@patmmccann Very nice initiative! Thanks for tagging. LGTM.

@jdwieland8282
Copy link
Member Author

jdwieland8282 commented Nov 30, 2023

So long as the requirements are met I express my support for this implementation approach.

@dgirardi
Copy link
Collaborator

This is marked in progress - is it in progress?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Tracking
Development

No branches or pull requests

4 participants