Variants
Retrieving variant objects
A variant object can be retrieved from a dialogue object. Read out the variants property of the BlueConic dialogue
object to obtain all variants of a dialogue.
Using variant objects
- class Variant
- property creation_date
- Returns:
The creation date of this object.
- Return type:
Optional[datetime]
- property creator_username
- Returns:
The username that created this object.
- Return type:
Optional[str]
- property description
- Returns:
Description of this object.
- Return type:
Optional[str]
- property id
- Returns:
ID of this object.
- Return type:
- property is_active
Returns if the object is active.
- property labels
- Returns:
The labels this object.
- Return type:
Optional[Sequence[str]
- property last_modified_date
- Returns:
The last modified date of this object.
- Return type:
Optional[datetime]
- property last_modified_username
- Returns:
The last modified username of this object.
- Return type:
Optional[str]
- property name
- Returns:
Name of this object.
- Return type:
Optional[str]
- property statistics
Returns a mapping with the statistics of this object. The following ‘keys’ are available for the mapping:
Mapping key
Description
views
Views
unique_views
Unique views
clicks
Clicks
unique_clicks
Unique clicks
direct_conversions
Direct conversions
unique_direct_conversions
Unique direct conversions
indirect_conversions
Indirect conversions
unique_indirect_conversions
Unique indirect conversions
total_conversions
Total conversions
unique_total_conversions
Unique total conversions
To read more about these statistics, see the Metrics page in the BlueConic Knowledge Base https://support.blueconic.com/hc/en-us/articles/360020105614-Metrics-for-views-clicks-and-conversions.
- Usage:
>>> import blueconic >>> bc = blueconic.Client() >>> dialogue_id = bc.get_blueconic_parameter_value("My dialogue","dialogue") >>> dialogue = bc.get_dialogue(dialogue_id) >>> print(dialogue.statistics) >>> print("Variant details:") >>> for variant in dialogue.variants: >>> print(variant.name + " | " + str(variant.statistics["views"])) {'clicks': 2246, 'direct_conversions': 0, 'indirect_conversions': 0, 'total_conversions': 0, 'unique_clicks': 1116, 'unique_direct_conversions': 0, 'unique_indirect_conversions': 0, 'unique_total_conversions': 0, 'unique_views': 94154, 'views': 150498} Variant details: Original (served to the Control Group) | 655 Recent Posts | 2 Variant A: Look-alike | 61744 Variant B: Recent high CTRs | 44053 Variant C: Collaborative Filtering | 44044