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 `gomonolithform:"RequiredFieldOptions" gomonolith:"list"` Type ABTestType `gomonolithform:"RequiredSelectFieldOptions" gomonolith:"list"` StaticPath string `gomonolith:"list"` ContentType core.ContentType `gomonolith:"list" gomonolithform:"ContentTypeFieldOptions"` ContentTypeID uint Field string `gomonolith:"list" gomonolithform:"RequiredSelectFieldOptions"` PrimaryKey uint `gomonolith:"list" gorm:"default:0"` Active bool `gorm:"default:false" gomonolith:"list"` Group string `gomonolith:"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 `gomonolith:"inline"` Active bool `gorm:"default:false" gomonolith:"inline"` Impressions int `gomonolith:"inline" gorm:"default:0"` Clicks int `gomonolith:"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.