Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HumanizeAbTestType ¶
func HumanizeAbTestType(abTestType ABTestType) string
Types ¶
type ABTest ¶
type ABTest struct { core.Model Name string `uadminform:"RequiredFieldOptions" uadmin:"list"` Type ABTestType `uadminform:"RequiredSelectFieldOptions" uadmin:"list"` StaticPath string `uadmin:"list"` ContentType core.ContentType `uadmin:"list" uadminform:"ContentTypeFieldOptions"` ContentTypeID uint Field string `uadmin:"list" uadminform:"RequiredSelectFieldOptions"` PrimaryKey uint `uadmin:"list" gorm:"default:0"` Active bool `gorm:"default:false" uadmin:"list"` Group string `uadmin:"list"` }
ABTest is a model that stores an A/B test
type ABTestType ¶
type ABTestType int
ABTestType is the type of the AB testing: model or static
func (ABTestType) Model ¶
func (ABTestType) Model() ABTestType
Model is used to do AB testing for model values coming from database
func (ABTestType) Static ¶
func (ABTestType) Static() ABTestType
Static is used to do AB testing for static assets (images, js, css, ...)
type ABTestValue ¶
type ABTestValue struct { core.Model ABTest ABTest ABTestID uint Value string `uadmin:"inline"` Active bool `gorm:"default:false" uadmin:"inline"` Impressions int `uadmin:"inline" gorm:"default:0"` Clicks int `uadmin:"inline" gorm:"default:0"` }
ABTestValue is a model to represent a possible value of an AB test
func (*ABTestValue) ClickThroughRate ¶
func (a *ABTestValue) ClickThroughRate() string
ClickThroughRate returns the rate of click through of this value
func (ABTestValue) PreviewFormList ¶
func (a ABTestValue) PreviewFormList() string
Preview__Form__List shows a preview of the AB test's value
func (*ABTestValue) String ¶
func (a *ABTestValue) String() string
Click to show internal directories.
Click to hide internal directories.