scale-jobs / abfy.io

World's simplest A/B testing Library
3 stars 1 forks source link

Pkg v0.0.1 #3

Closed eyeamkd closed 1 month ago

eyeamkd commented 3 months ago

Scope package v0.0.1 :

Experiment component

Variant component

Provider component that will push the experiments data in its component tree to any url provided in its config on evey render

For testing we use dummy api https://webhook.site/

image

eyeamkd commented 3 months ago

This is how a base variant of the library should look should be the root provider where it takes a backend url and pushes the data to that url ( endpoint )

Experiments are to be seen as Questions that users want to be answered Variants can be seen as different options that users have for that questions KeyAction can be seen as the end result/aim that users want to track as an answer for that Question

<Provider backendUrl ="canBeANyUrl">
    <Experiment fgkf>
      <Variant >
       </ Variant>
      <Variant />
    </Experiment>

   <Experiment>
      <Variant id="dfdfd">
            <KeyAction>
              <BuyNowButtonV1 />
            </KeyAction>
       </Variant>
     <Variant>
            <Goal>
             <BuyNowButtonV2 />
            </Goal>
       </Variant>
    </Expeiment>

    <Experiment>
      <Variant />
      <Variant />
    </Experiment>

    <KeyAction>
        <BuyNowButton />
     </KeyAction>
     <KeyAction>
        <BookACall />
     </KeyAction>
</Provider />