Struct google_analytics3::Experiment

source ·
pub struct Experiment {
Show 28 fields pub status: Option<String>, pub traffic_coverage: Option<f64>, pub description: Option<String>, pub web_property_id: Option<String>, pub updated: Option<String>, pub internal_web_property_id: Option<String>, pub winner_confidence_level: Option<f64>, pub start_time: Option<String>, pub optimization_type: Option<String>, pub winner_found: Option<bool>, pub objective_metric: Option<String>, pub id: Option<String>, pub equal_weighting: Option<bool>, pub account_id: Option<String>, pub kind: Option<String>, pub name: Option<String>, pub created: Option<String>, pub reason_experiment_ended: Option<String>, pub variations: Option<Vec<ExperimentVariations>>, pub snippet: Option<String>, pub editable_in_ga_ui: Option<bool>, pub rewrite_variation_urls_as_original: Option<bool>, pub minimum_experiment_length_in_days: Option<i32>, pub profile_id: Option<String>, pub parent_link: Option<ExperimentParentLink>, pub end_time: Option<String>, pub serving_framework: Option<String>, pub self_link: Option<String>,
}
Expand description

JSON template for Analytics experiment resource.

§Activities

This type is used in activities, which are methods you may call on this type or where this type is involved in. The list links the activity name, along with information about where it is used (one of request and response).

Fields§

§status: Option<String>

Experiment status. Possible values: “DRAFT”, “READY_TO_RUN”, “RUNNING”, “ENDED”. Experiments can be created in the “DRAFT”, “READY_TO_RUN” or “RUNNING” state. This field is required when creating an experiment.

§traffic_coverage: Option<f64>

A floating-point number in (0, 1]. Specifies the fraction of the traffic that participates in the experiment. Can be changed for a running experiment. This field may not be changed for an experiments whose status is ENDED.

§description: Option<String>

Notes about this experiment.

§web_property_id: Option<String>

Web property ID to which this experiment belongs. The web property ID is of the form UA-XXXXX-YY. This field is read-only.

§updated: Option<String>

Time the experiment was last modified. This field is read-only.

§internal_web_property_id: Option<String>

Internal ID for the web property to which this experiment belongs. This field is read-only.

§winner_confidence_level: Option<f64>

A floating-point number in (0, 1). Specifies the necessary confidence level to choose a winner. This field may not be changed for an experiments whose status is ENDED.

§start_time: Option<String>

The starting time of the experiment (the time the status changed from READY_TO_RUN to RUNNING). This field is present only if the experiment has started. This field is read-only.

§optimization_type: Option<String>

Whether the objectiveMetric should be minimized or maximized. Possible values: “MAXIMUM”, “MINIMUM”. Optional–defaults to “MAXIMUM”. Cannot be specified without objectiveMetric. Cannot be modified when status is “RUNNING” or “ENDED”.

§winner_found: Option<bool>

Boolean specifying whether a winner has been found for this experiment. This field is read-only.

§objective_metric: Option<String>

The metric that the experiment is optimizing. Valid values: “ga:goal(n)Completions”, “ga:adsenseAdsClicks”, “ga:adsenseAdsViewed”, “ga:adsenseRevenue”, “ga:bounces”, “ga:pageviews”, “ga:sessionDuration”, “ga:transactions”, “ga:transactionRevenue”. This field is required if status is “RUNNING” and servingFramework is one of “REDIRECT” or “API”.

§id: Option<String>

Experiment ID. Required for patch and update. Disallowed for create.

§equal_weighting: Option<bool>

Boolean specifying whether to distribute traffic evenly across all variations. If the value is False, content experiments follows the default behavior of adjusting traffic dynamically based on variation performance. Optional – defaults to False. This field may not be changed for an experiment whose status is ENDED.

§account_id: Option<String>

Account ID to which this experiment belongs. This field is read-only.

§kind: Option<String>

Resource type for an Analytics experiment. This field is read-only.

§name: Option<String>

Experiment name. This field may not be changed for an experiment whose status is ENDED. This field is required when creating an experiment.

§created: Option<String>

Time the experiment was created. This field is read-only.

§reason_experiment_ended: Option<String>

Why the experiment ended. Possible values: “STOPPED_BY_USER”, “WINNER_FOUND”, “EXPERIMENT_EXPIRED”, “ENDED_WITH_NO_WINNER”, “GOAL_OBJECTIVE_CHANGED”. “ENDED_WITH_NO_WINNER” means that the experiment didn’t expire but no winner was projected to be found. If the experiment status is changed via the API to ENDED this field is set to STOPPED_BY_USER. This field is read-only.

§variations: Option<Vec<ExperimentVariations>>

Array of variations. The first variation in the array is the original. The number of variations may not change once an experiment is in the RUNNING state. At least two variations are required before status can be set to RUNNING.

§snippet: Option<String>

The snippet of code to include on the control page(s). This field is read-only.

§editable_in_ga_ui: Option<bool>

If true, the end user will be able to edit the experiment via the Google Analytics user interface.

§rewrite_variation_urls_as_original: Option<bool>

Boolean specifying whether variations URLS are rewritten to match those of the original. This field may not be changed for an experiments whose status is ENDED.

§minimum_experiment_length_in_days: Option<i32>

An integer number in [3, 90]. Specifies the minimum length of the experiment. Can be changed for a running experiment. This field may not be changed for an experiments whose status is ENDED.

§profile_id: Option<String>

View (Profile) ID to which this experiment belongs. This field is read-only.

§parent_link: Option<ExperimentParentLink>

Parent link for an experiment. Points to the view (profile) to which this experiment belongs.

§end_time: Option<String>

The ending time of the experiment (the time the status changed from RUNNING to ENDED). This field is present only if the experiment has ended. This field is read-only.

§serving_framework: Option<String>

The framework used to serve the experiment variations and evaluate the results. One of:

  • REDIRECT: Google Analytics redirects traffic to different variation pages, reports the chosen variation and evaluates the results.
  • API: Google Analytics chooses and reports the variation to serve and evaluates the results; the caller is responsible for serving the selected variation.
  • EXTERNAL: The variations will be served externally and the chosen variation reported to Google Analytics. The caller is responsible for serving the selected variation and evaluating the results.
§self_link: Option<String>

Link for this experiment. This field is read-only.

Trait Implementations§

source§

impl Clone for Experiment

source§

fn clone(&self) -> Experiment

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Experiment

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Experiment

source§

fn default() -> Experiment

Returns the “default value” for a type. Read more
source§

impl Deserialize for Experiment

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer,

Deserialize this value from the given Serde deserializer. Read more
source§

impl Serialize for Experiment

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl RequestValue for Experiment

source§

impl ResponseResult for Experiment

Auto Trait Implementations§

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> CloneToUninit for T
where T: Clone,

source§

default unsafe fn clone_to_uninit(&self, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoEither for T

source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
source§

impl<T> ToJson for T
where T: Serialize + ?Sized,

source§

fn to_json(&self) -> Result<Value, Error>

Represent self as a serde_json::Value. Note that Value is not a JSON string. If you need a string, use serde_json::to_string instead. Read more
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
source§

impl<T> Typeable for T
where T: Any,

source§

fn get_type(&self) -> TypeId

Get the TypeId of this object.