Debian Codegraph @

docs/dyn/analytics_v3.management.experiments.html

raw
1 <html><body>
2 <style>
3
4 body, h1, h2, h3, div, span, p, pre, a {
5 margin: 0;
6 padding: 0;
7 border: 0;
8 font-weight: inherit;
9 font-style: inherit;
10 font-size: 100%;
11 font-family: inherit;
12 vertical-align: baseline;
13 }
14
15 body {
16 font-size: 13px;
17 padding: 1em;
18 }
19
20 h1 {
21 font-size: 26px;
22 margin-bottom: 1em;
23 }
24
25 h2 {
26 font-size: 24px;
27 margin-bottom: 1em;
28 }
29
30 h3 {
31 font-size: 20px;
32 margin-bottom: 1em;
33 margin-top: 1em;
34 }
35
36 pre, code {
37 line-height: 1.5;
38 font-family: Monaco, 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Lucida Console', monospace;
39 }
40
41 pre {
42 margin-top: 0.5em;
43 }
44
45 h1, h2, h3, p {
46 font-family: Arial, sans serif;
47 }
48
49 h1, h2, h3 {
50 border-bottom: solid #CCC 1px;
51 }
52
53 .toc_element {
54 margin-top: 0.5em;
55 }
56
57 .firstline {
58 margin-left: 2 em;
59 }
60
61 .method {
62 margin-top: 1em;
63 border: solid 1px #CCC;
64 padding: 1em;
65 background: #EEE;
66 }
67
68 .details {
69 font-weight: bold;
70 font-size: 14px;
71 }
72
73 </style>
74
75 <h1><a href="analytics_v3.html">Google Analytics API</a> . <a href="analytics_v3.management.html">management</a> . <a href="analytics_v3.management.experiments.html">experiments</a></h1>
76 <h2>Instance Methods</h2>
77 <p class="toc_element">
78 <code><a href="#close">close()</a></code></p>
79 <p class="firstline">Close httplib2 connections.</p>
80 <p class="toc_element">
81 <code><a href="#delete">delete(accountId, webPropertyId, profileId, experimentId)</a></code></p>
82 <p class="firstline">Delete an experiment.</p>
83 <p class="toc_element">
84 <code><a href="#get">get(accountId, webPropertyId, profileId, experimentId)</a></code></p>
85 <p class="firstline">Returns an experiment to which the user has access.</p>
86 <p class="toc_element">
87 <code><a href="#insert">insert(accountId, webPropertyId, profileId, body=None)</a></code></p>
88 <p class="firstline">Create a new experiment.</p>
89 <p class="toc_element">
90 <code><a href="#list">list(accountId, webPropertyId, profileId, max_results=None, start_index=None)</a></code></p>
91 <p class="firstline">Lists experiments to which the user has access.</p>
92 <p class="toc_element">
93 <code><a href="#patch">patch(accountId, webPropertyId, profileId, experimentId, body=None)</a></code></p>
94 <p class="firstline">Update an existing experiment. This method supports patch semantics.</p>
95 <p class="toc_element">
96 <code><a href="#update">update(accountId, webPropertyId, profileId, experimentId, body=None)</a></code></p>
97 <p class="firstline">Update an existing experiment.</p>
98 <h3>Method Details</h3>
99 <div class="method">
100 <code class="details" id="close">close()</code>
101 <pre>Close httplib2 connections.</pre>
102 </div>
103
104 <div class="method">
105 <code class="details" id="delete">delete(accountId, webPropertyId, profileId, experimentId)</code>
106 <pre>Delete an experiment.
107
108 Args:
109 accountId: string, Account ID to which the experiment belongs (required)
110 webPropertyId: string, Web property ID to which the experiment belongs (required)
111 profileId: string, View (Profile) ID to which the experiment belongs (required)
112 experimentId: string, ID of the experiment to delete (required)
113 </pre>
114 </div>
115
116 <div class="method">
117 <code class="details" id="get">get(accountId, webPropertyId, profileId, experimentId)</code>
118 <pre>Returns an experiment to which the user has access.
119
120 Args:
121 accountId: string, Account ID to retrieve the experiment for. (required)
122 webPropertyId: string, Web property ID to retrieve the experiment for. (required)
123 profileId: string, View (Profile) ID to retrieve the experiment for. (required)
124 experimentId: string, Experiment ID to retrieve the experiment for. (required)
125
126 Returns:
127 An object of the form:
128
129 { # JSON template for Analytics experiment resource.
130 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this experiment belongs. This field is read-only.
131 &quot;created&quot;: &quot;A String&quot;, # Time the experiment was created. This field is read-only.
132 &quot;description&quot;: &quot;A String&quot;, # Notes about this experiment.
133 &quot;editableInGaUi&quot;: True or False, # If true, the end user will be able to edit the experiment via the Google Analytics user interface.
134 &quot;endTime&quot;: &quot;A String&quot;, # 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.
135 &quot;equalWeighting&quot;: True or False, # 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.
136 &quot;id&quot;: &quot;A String&quot;, # Experiment ID. Required for patch and update. Disallowed for create.
137 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this experiment belongs. This field is read-only.
138 &quot;kind&quot;: &quot;analytics#experiment&quot;, # Resource type for an Analytics experiment. This field is read-only.
139 &quot;minimumExperimentLengthInDays&quot;: 42, # 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.
140 &quot;name&quot;: &quot;A String&quot;, # Experiment name. This field may not be changed for an experiment whose status is ENDED. This field is required when creating an experiment.
141 &quot;objectiveMetric&quot;: &quot;A String&quot;, # The metric that the experiment is optimizing. Valid values: &quot;ga:goal(n)Completions&quot;, &quot;ga:adsenseAdsClicks&quot;, &quot;ga:adsenseAdsViewed&quot;, &quot;ga:adsenseRevenue&quot;, &quot;ga:bounces&quot;, &quot;ga:pageviews&quot;, &quot;ga:sessionDuration&quot;, &quot;ga:transactions&quot;, &quot;ga:transactionRevenue&quot;. This field is required if status is &quot;RUNNING&quot; and servingFramework is one of &quot;REDIRECT&quot; or &quot;API&quot;.
142 &quot;optimizationType&quot;: &quot;A String&quot;, # Whether the objectiveMetric should be minimized or maximized. Possible values: &quot;MAXIMUM&quot;, &quot;MINIMUM&quot;. Optional--defaults to &quot;MAXIMUM&quot;. Cannot be specified without objectiveMetric. Cannot be modified when status is &quot;RUNNING&quot; or &quot;ENDED&quot;.
143 &quot;parentLink&quot;: { # Parent link for an experiment. Points to the view (profile) to which this experiment belongs.
144 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this experiment belongs. This field is read-only.
145 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;. This field is read-only.
146 },
147 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this experiment belongs. This field is read-only.
148 &quot;reasonExperimentEnded&quot;: &quot;A String&quot;, # Why the experiment ended. Possible values: &quot;STOPPED_BY_USER&quot;, &quot;WINNER_FOUND&quot;, &quot;EXPERIMENT_EXPIRED&quot;, &quot;ENDED_WITH_NO_WINNER&quot;, &quot;GOAL_OBJECTIVE_CHANGED&quot;. &quot;ENDED_WITH_NO_WINNER&quot; means that the experiment didn&#x27;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.
149 &quot;rewriteVariationUrlsAsOriginal&quot;: True or False, # 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.
150 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this experiment. This field is read-only.
151 &quot;servingFramework&quot;: &quot;A String&quot;, # The framework used to serve the experiment variations and evaluate the results. One of:
152 # - REDIRECT: Google Analytics redirects traffic to different variation pages, reports the chosen variation and evaluates the results.
153 # - API: Google Analytics chooses and reports the variation to serve and evaluates the results; the caller is responsible for serving the selected variation.
154 # - 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.
155 &quot;snippet&quot;: &quot;A String&quot;, # The snippet of code to include on the control page(s). This field is read-only.
156 &quot;startTime&quot;: &quot;A String&quot;, # 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.
157 &quot;status&quot;: &quot;A String&quot;, # Experiment status. Possible values: &quot;DRAFT&quot;, &quot;READY_TO_RUN&quot;, &quot;RUNNING&quot;, &quot;ENDED&quot;. Experiments can be created in the &quot;DRAFT&quot;, &quot;READY_TO_RUN&quot; or &quot;RUNNING&quot; state. This field is required when creating an experiment.
158 &quot;trafficCoverage&quot;: 3.14, # 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.
159 &quot;updated&quot;: &quot;A String&quot;, # Time the experiment was last modified. This field is read-only.
160 &quot;variations&quot;: [ # 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.
161 {
162 &quot;name&quot;: &quot;A String&quot;, # The name of the variation. This field is required when creating an experiment. This field may not be changed for an experiment whose status is ENDED.
163 &quot;status&quot;: &quot;A String&quot;, # Status of the variation. Possible values: &quot;ACTIVE&quot;, &quot;INACTIVE&quot;. INACTIVE variations are not served. This field may not be changed for an experiment whose status is ENDED.
164 &quot;url&quot;: &quot;A String&quot;, # The URL of the variation. This field may not be changed for an experiment whose status is RUNNING or ENDED.
165 &quot;weight&quot;: 3.14, # Weight that this variation should receive. Only present if the experiment is running. This field is read-only.
166 &quot;won&quot;: True or False, # True if the experiment has ended and this variation performed (statistically) significantly better than the original. This field is read-only.
167 },
168 ],
169 &quot;webPropertyId&quot;: &quot;A String&quot;, # Web property ID to which this experiment belongs. The web property ID is of the form UA-XXXXX-YY. This field is read-only.
170 &quot;winnerConfidenceLevel&quot;: 3.14, # 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.
171 &quot;winnerFound&quot;: True or False, # Boolean specifying whether a winner has been found for this experiment. This field is read-only.
172 }</pre>
173 </div>
174
175 <div class="method">
176 <code class="details" id="insert">insert(accountId, webPropertyId, profileId, body=None)</code>
177 <pre>Create a new experiment.
178
179 Args:
180 accountId: string, Account ID to create the experiment for. (required)
181 webPropertyId: string, Web property ID to create the experiment for. (required)
182 profileId: string, View (Profile) ID to create the experiment for. (required)
183 body: object, The request body.
184 The object takes the form of:
185
186 { # JSON template for Analytics experiment resource.
187 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this experiment belongs. This field is read-only.
188 &quot;created&quot;: &quot;A String&quot;, # Time the experiment was created. This field is read-only.
189 &quot;description&quot;: &quot;A String&quot;, # Notes about this experiment.
190 &quot;editableInGaUi&quot;: True or False, # If true, the end user will be able to edit the experiment via the Google Analytics user interface.
191 &quot;endTime&quot;: &quot;A String&quot;, # 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.
192 &quot;equalWeighting&quot;: True or False, # 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.
193 &quot;id&quot;: &quot;A String&quot;, # Experiment ID. Required for patch and update. Disallowed for create.
194 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this experiment belongs. This field is read-only.
195 &quot;kind&quot;: &quot;analytics#experiment&quot;, # Resource type for an Analytics experiment. This field is read-only.
196 &quot;minimumExperimentLengthInDays&quot;: 42, # 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.
197 &quot;name&quot;: &quot;A String&quot;, # Experiment name. This field may not be changed for an experiment whose status is ENDED. This field is required when creating an experiment.
198 &quot;objectiveMetric&quot;: &quot;A String&quot;, # The metric that the experiment is optimizing. Valid values: &quot;ga:goal(n)Completions&quot;, &quot;ga:adsenseAdsClicks&quot;, &quot;ga:adsenseAdsViewed&quot;, &quot;ga:adsenseRevenue&quot;, &quot;ga:bounces&quot;, &quot;ga:pageviews&quot;, &quot;ga:sessionDuration&quot;, &quot;ga:transactions&quot;, &quot;ga:transactionRevenue&quot;. This field is required if status is &quot;RUNNING&quot; and servingFramework is one of &quot;REDIRECT&quot; or &quot;API&quot;.
199 &quot;optimizationType&quot;: &quot;A String&quot;, # Whether the objectiveMetric should be minimized or maximized. Possible values: &quot;MAXIMUM&quot;, &quot;MINIMUM&quot;. Optional--defaults to &quot;MAXIMUM&quot;. Cannot be specified without objectiveMetric. Cannot be modified when status is &quot;RUNNING&quot; or &quot;ENDED&quot;.
200 &quot;parentLink&quot;: { # Parent link for an experiment. Points to the view (profile) to which this experiment belongs.
201 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this experiment belongs. This field is read-only.
202 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;. This field is read-only.
203 },
204 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this experiment belongs. This field is read-only.
205 &quot;reasonExperimentEnded&quot;: &quot;A String&quot;, # Why the experiment ended. Possible values: &quot;STOPPED_BY_USER&quot;, &quot;WINNER_FOUND&quot;, &quot;EXPERIMENT_EXPIRED&quot;, &quot;ENDED_WITH_NO_WINNER&quot;, &quot;GOAL_OBJECTIVE_CHANGED&quot;. &quot;ENDED_WITH_NO_WINNER&quot; means that the experiment didn&#x27;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.
206 &quot;rewriteVariationUrlsAsOriginal&quot;: True or False, # 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.
207 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this experiment. This field is read-only.
208 &quot;servingFramework&quot;: &quot;A String&quot;, # The framework used to serve the experiment variations and evaluate the results. One of:
209 # - REDIRECT: Google Analytics redirects traffic to different variation pages, reports the chosen variation and evaluates the results.
210 # - API: Google Analytics chooses and reports the variation to serve and evaluates the results; the caller is responsible for serving the selected variation.
211 # - 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.
212 &quot;snippet&quot;: &quot;A String&quot;, # The snippet of code to include on the control page(s). This field is read-only.
213 &quot;startTime&quot;: &quot;A String&quot;, # 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.
214 &quot;status&quot;: &quot;A String&quot;, # Experiment status. Possible values: &quot;DRAFT&quot;, &quot;READY_TO_RUN&quot;, &quot;RUNNING&quot;, &quot;ENDED&quot;. Experiments can be created in the &quot;DRAFT&quot;, &quot;READY_TO_RUN&quot; or &quot;RUNNING&quot; state. This field is required when creating an experiment.
215 &quot;trafficCoverage&quot;: 3.14, # 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.
216 &quot;updated&quot;: &quot;A String&quot;, # Time the experiment was last modified. This field is read-only.
217 &quot;variations&quot;: [ # 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.
218 {
219 &quot;name&quot;: &quot;A String&quot;, # The name of the variation. This field is required when creating an experiment. This field may not be changed for an experiment whose status is ENDED.
220 &quot;status&quot;: &quot;A String&quot;, # Status of the variation. Possible values: &quot;ACTIVE&quot;, &quot;INACTIVE&quot;. INACTIVE variations are not served. This field may not be changed for an experiment whose status is ENDED.
221 &quot;url&quot;: &quot;A String&quot;, # The URL of the variation. This field may not be changed for an experiment whose status is RUNNING or ENDED.
222 &quot;weight&quot;: 3.14, # Weight that this variation should receive. Only present if the experiment is running. This field is read-only.
223 &quot;won&quot;: True or False, # True if the experiment has ended and this variation performed (statistically) significantly better than the original. This field is read-only.
224 },
225 ],
226 &quot;webPropertyId&quot;: &quot;A String&quot;, # Web property ID to which this experiment belongs. The web property ID is of the form UA-XXXXX-YY. This field is read-only.
227 &quot;winnerConfidenceLevel&quot;: 3.14, # 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.
228 &quot;winnerFound&quot;: True or False, # Boolean specifying whether a winner has been found for this experiment. This field is read-only.
229 }
230
231
232 Returns:
233 An object of the form:
234
235 { # JSON template for Analytics experiment resource.
236 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this experiment belongs. This field is read-only.
237 &quot;created&quot;: &quot;A String&quot;, # Time the experiment was created. This field is read-only.
238 &quot;description&quot;: &quot;A String&quot;, # Notes about this experiment.
239 &quot;editableInGaUi&quot;: True or False, # If true, the end user will be able to edit the experiment via the Google Analytics user interface.
240 &quot;endTime&quot;: &quot;A String&quot;, # 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.
241 &quot;equalWeighting&quot;: True or False, # 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.
242 &quot;id&quot;: &quot;A String&quot;, # Experiment ID. Required for patch and update. Disallowed for create.
243 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this experiment belongs. This field is read-only.
244 &quot;kind&quot;: &quot;analytics#experiment&quot;, # Resource type for an Analytics experiment. This field is read-only.
245 &quot;minimumExperimentLengthInDays&quot;: 42, # 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.
246 &quot;name&quot;: &quot;A String&quot;, # Experiment name. This field may not be changed for an experiment whose status is ENDED. This field is required when creating an experiment.
247 &quot;objectiveMetric&quot;: &quot;A String&quot;, # The metric that the experiment is optimizing. Valid values: &quot;ga:goal(n)Completions&quot;, &quot;ga:adsenseAdsClicks&quot;, &quot;ga:adsenseAdsViewed&quot;, &quot;ga:adsenseRevenue&quot;, &quot;ga:bounces&quot;, &quot;ga:pageviews&quot;, &quot;ga:sessionDuration&quot;, &quot;ga:transactions&quot;, &quot;ga:transactionRevenue&quot;. This field is required if status is &quot;RUNNING&quot; and servingFramework is one of &quot;REDIRECT&quot; or &quot;API&quot;.
248 &quot;optimizationType&quot;: &quot;A String&quot;, # Whether the objectiveMetric should be minimized or maximized. Possible values: &quot;MAXIMUM&quot;, &quot;MINIMUM&quot;. Optional--defaults to &quot;MAXIMUM&quot;. Cannot be specified without objectiveMetric. Cannot be modified when status is &quot;RUNNING&quot; or &quot;ENDED&quot;.
249 &quot;parentLink&quot;: { # Parent link for an experiment. Points to the view (profile) to which this experiment belongs.
250 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this experiment belongs. This field is read-only.
251 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;. This field is read-only.
252 },
253 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this experiment belongs. This field is read-only.
254 &quot;reasonExperimentEnded&quot;: &quot;A String&quot;, # Why the experiment ended. Possible values: &quot;STOPPED_BY_USER&quot;, &quot;WINNER_FOUND&quot;, &quot;EXPERIMENT_EXPIRED&quot;, &quot;ENDED_WITH_NO_WINNER&quot;, &quot;GOAL_OBJECTIVE_CHANGED&quot;. &quot;ENDED_WITH_NO_WINNER&quot; means that the experiment didn&#x27;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.
255 &quot;rewriteVariationUrlsAsOriginal&quot;: True or False, # 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.
256 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this experiment. This field is read-only.
257 &quot;servingFramework&quot;: &quot;A String&quot;, # The framework used to serve the experiment variations and evaluate the results. One of:
258 # - REDIRECT: Google Analytics redirects traffic to different variation pages, reports the chosen variation and evaluates the results.
259 # - API: Google Analytics chooses and reports the variation to serve and evaluates the results; the caller is responsible for serving the selected variation.
260 # - 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.
261 &quot;snippet&quot;: &quot;A String&quot;, # The snippet of code to include on the control page(s). This field is read-only.
262 &quot;startTime&quot;: &quot;A String&quot;, # 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.
263 &quot;status&quot;: &quot;A String&quot;, # Experiment status. Possible values: &quot;DRAFT&quot;, &quot;READY_TO_RUN&quot;, &quot;RUNNING&quot;, &quot;ENDED&quot;. Experiments can be created in the &quot;DRAFT&quot;, &quot;READY_TO_RUN&quot; or &quot;RUNNING&quot; state. This field is required when creating an experiment.
264 &quot;trafficCoverage&quot;: 3.14, # 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.
265 &quot;updated&quot;: &quot;A String&quot;, # Time the experiment was last modified. This field is read-only.
266 &quot;variations&quot;: [ # 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.
267 {
268 &quot;name&quot;: &quot;A String&quot;, # The name of the variation. This field is required when creating an experiment. This field may not be changed for an experiment whose status is ENDED.
269 &quot;status&quot;: &quot;A String&quot;, # Status of the variation. Possible values: &quot;ACTIVE&quot;, &quot;INACTIVE&quot;. INACTIVE variations are not served. This field may not be changed for an experiment whose status is ENDED.
270 &quot;url&quot;: &quot;A String&quot;, # The URL of the variation. This field may not be changed for an experiment whose status is RUNNING or ENDED.
271 &quot;weight&quot;: 3.14, # Weight that this variation should receive. Only present if the experiment is running. This field is read-only.
272 &quot;won&quot;: True or False, # True if the experiment has ended and this variation performed (statistically) significantly better than the original. This field is read-only.
273 },
274 ],
275 &quot;webPropertyId&quot;: &quot;A String&quot;, # Web property ID to which this experiment belongs. The web property ID is of the form UA-XXXXX-YY. This field is read-only.
276 &quot;winnerConfidenceLevel&quot;: 3.14, # 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.
277 &quot;winnerFound&quot;: True or False, # Boolean specifying whether a winner has been found for this experiment. This field is read-only.
278 }</pre>
279 </div>
280
281 <div class="method">
282 <code class="details" id="list">list(accountId, webPropertyId, profileId, max_results=None, start_index=None)</code>
283 <pre>Lists experiments to which the user has access.
284
285 Args:
286 accountId: string, Account ID to retrieve experiments for. (required)
287 webPropertyId: string, Web property ID to retrieve experiments for. (required)
288 profileId: string, View (Profile) ID to retrieve experiments for. (required)
289 max_results: integer, The maximum number of experiments to include in this response.
290 start_index: integer, An index of the first experiment to retrieve. Use this parameter as a pagination mechanism along with the max-results parameter.
291
292 Returns:
293 An object of the form:
294
295 { # An experiment collection lists Analytics experiments to which the user has access. Each view (profile) can have a set of experiments. Each resource in the Experiment collection corresponds to a single Analytics experiment.
296 &quot;items&quot;: [ # A list of experiments.
297 { # JSON template for Analytics experiment resource.
298 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this experiment belongs. This field is read-only.
299 &quot;created&quot;: &quot;A String&quot;, # Time the experiment was created. This field is read-only.
300 &quot;description&quot;: &quot;A String&quot;, # Notes about this experiment.
301 &quot;editableInGaUi&quot;: True or False, # If true, the end user will be able to edit the experiment via the Google Analytics user interface.
302 &quot;endTime&quot;: &quot;A String&quot;, # 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.
303 &quot;equalWeighting&quot;: True or False, # 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.
304 &quot;id&quot;: &quot;A String&quot;, # Experiment ID. Required for patch and update. Disallowed for create.
305 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this experiment belongs. This field is read-only.
306 &quot;kind&quot;: &quot;analytics#experiment&quot;, # Resource type for an Analytics experiment. This field is read-only.
307 &quot;minimumExperimentLengthInDays&quot;: 42, # 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.
308 &quot;name&quot;: &quot;A String&quot;, # Experiment name. This field may not be changed for an experiment whose status is ENDED. This field is required when creating an experiment.
309 &quot;objectiveMetric&quot;: &quot;A String&quot;, # The metric that the experiment is optimizing. Valid values: &quot;ga:goal(n)Completions&quot;, &quot;ga:adsenseAdsClicks&quot;, &quot;ga:adsenseAdsViewed&quot;, &quot;ga:adsenseRevenue&quot;, &quot;ga:bounces&quot;, &quot;ga:pageviews&quot;, &quot;ga:sessionDuration&quot;, &quot;ga:transactions&quot;, &quot;ga:transactionRevenue&quot;. This field is required if status is &quot;RUNNING&quot; and servingFramework is one of &quot;REDIRECT&quot; or &quot;API&quot;.
310 &quot;optimizationType&quot;: &quot;A String&quot;, # Whether the objectiveMetric should be minimized or maximized. Possible values: &quot;MAXIMUM&quot;, &quot;MINIMUM&quot;. Optional--defaults to &quot;MAXIMUM&quot;. Cannot be specified without objectiveMetric. Cannot be modified when status is &quot;RUNNING&quot; or &quot;ENDED&quot;.
311 &quot;parentLink&quot;: { # Parent link for an experiment. Points to the view (profile) to which this experiment belongs.
312 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this experiment belongs. This field is read-only.
313 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;. This field is read-only.
314 },
315 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this experiment belongs. This field is read-only.
316 &quot;reasonExperimentEnded&quot;: &quot;A String&quot;, # Why the experiment ended. Possible values: &quot;STOPPED_BY_USER&quot;, &quot;WINNER_FOUND&quot;, &quot;EXPERIMENT_EXPIRED&quot;, &quot;ENDED_WITH_NO_WINNER&quot;, &quot;GOAL_OBJECTIVE_CHANGED&quot;. &quot;ENDED_WITH_NO_WINNER&quot; means that the experiment didn&#x27;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.
317 &quot;rewriteVariationUrlsAsOriginal&quot;: True or False, # 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.
318 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this experiment. This field is read-only.
319 &quot;servingFramework&quot;: &quot;A String&quot;, # The framework used to serve the experiment variations and evaluate the results. One of:
320 # - REDIRECT: Google Analytics redirects traffic to different variation pages, reports the chosen variation and evaluates the results.
321 # - API: Google Analytics chooses and reports the variation to serve and evaluates the results; the caller is responsible for serving the selected variation.
322 # - 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.
323 &quot;snippet&quot;: &quot;A String&quot;, # The snippet of code to include on the control page(s). This field is read-only.
324 &quot;startTime&quot;: &quot;A String&quot;, # 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.
325 &quot;status&quot;: &quot;A String&quot;, # Experiment status. Possible values: &quot;DRAFT&quot;, &quot;READY_TO_RUN&quot;, &quot;RUNNING&quot;, &quot;ENDED&quot;. Experiments can be created in the &quot;DRAFT&quot;, &quot;READY_TO_RUN&quot; or &quot;RUNNING&quot; state. This field is required when creating an experiment.
326 &quot;trafficCoverage&quot;: 3.14, # 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.
327 &quot;updated&quot;: &quot;A String&quot;, # Time the experiment was last modified. This field is read-only.
328 &quot;variations&quot;: [ # 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.
329 {
330 &quot;name&quot;: &quot;A String&quot;, # The name of the variation. This field is required when creating an experiment. This field may not be changed for an experiment whose status is ENDED.
331 &quot;status&quot;: &quot;A String&quot;, # Status of the variation. Possible values: &quot;ACTIVE&quot;, &quot;INACTIVE&quot;. INACTIVE variations are not served. This field may not be changed for an experiment whose status is ENDED.
332 &quot;url&quot;: &quot;A String&quot;, # The URL of the variation. This field may not be changed for an experiment whose status is RUNNING or ENDED.
333 &quot;weight&quot;: 3.14, # Weight that this variation should receive. Only present if the experiment is running. This field is read-only.
334 &quot;won&quot;: True or False, # True if the experiment has ended and this variation performed (statistically) significantly better than the original. This field is read-only.
335 },
336 ],
337 &quot;webPropertyId&quot;: &quot;A String&quot;, # Web property ID to which this experiment belongs. The web property ID is of the form UA-XXXXX-YY. This field is read-only.
338 &quot;winnerConfidenceLevel&quot;: 3.14, # 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.
339 &quot;winnerFound&quot;: True or False, # Boolean specifying whether a winner has been found for this experiment. This field is read-only.
340 },
341 ],
342 &quot;itemsPerPage&quot;: 42, # The maximum number of resources the response can contain, regardless of the actual number of resources returned. Its value ranges from 1 to 1000 with a value of 1000 by default, or otherwise specified by the max-results query parameter.
343 &quot;kind&quot;: &quot;analytics#experiments&quot;, # Collection type.
344 &quot;nextLink&quot;: &quot;A String&quot;, # Link to next page for this experiment collection.
345 &quot;previousLink&quot;: &quot;A String&quot;, # Link to previous page for this experiment collection.
346 &quot;startIndex&quot;: 42, # The starting index of the resources, which is 1 by default or otherwise specified by the start-index query parameter.
347 &quot;totalResults&quot;: 42, # The total number of results for the query, regardless of the number of resources in the result.
348 &quot;username&quot;: &quot;A String&quot;, # Email ID of the authenticated user
349 }</pre>
350 </div>
351
352 <div class="method">
353 <code class="details" id="patch">patch(accountId, webPropertyId, profileId, experimentId, body=None)</code>
354 <pre>Update an existing experiment. This method supports patch semantics.
355
356 Args:
357 accountId: string, Account ID of the experiment to update. (required)
358 webPropertyId: string, Web property ID of the experiment to update. (required)
359 profileId: string, View (Profile) ID of the experiment to update. (required)
360 experimentId: string, Experiment ID of the experiment to update. (required)
361 body: object, The request body.
362 The object takes the form of:
363
364 { # JSON template for Analytics experiment resource.
365 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this experiment belongs. This field is read-only.
366 &quot;created&quot;: &quot;A String&quot;, # Time the experiment was created. This field is read-only.
367 &quot;description&quot;: &quot;A String&quot;, # Notes about this experiment.
368 &quot;editableInGaUi&quot;: True or False, # If true, the end user will be able to edit the experiment via the Google Analytics user interface.
369 &quot;endTime&quot;: &quot;A String&quot;, # 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.
370 &quot;equalWeighting&quot;: True or False, # 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.
371 &quot;id&quot;: &quot;A String&quot;, # Experiment ID. Required for patch and update. Disallowed for create.
372 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this experiment belongs. This field is read-only.
373 &quot;kind&quot;: &quot;analytics#experiment&quot;, # Resource type for an Analytics experiment. This field is read-only.
374 &quot;minimumExperimentLengthInDays&quot;: 42, # 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.
375 &quot;name&quot;: &quot;A String&quot;, # Experiment name. This field may not be changed for an experiment whose status is ENDED. This field is required when creating an experiment.
376 &quot;objectiveMetric&quot;: &quot;A String&quot;, # The metric that the experiment is optimizing. Valid values: &quot;ga:goal(n)Completions&quot;, &quot;ga:adsenseAdsClicks&quot;, &quot;ga:adsenseAdsViewed&quot;, &quot;ga:adsenseRevenue&quot;, &quot;ga:bounces&quot;, &quot;ga:pageviews&quot;, &quot;ga:sessionDuration&quot;, &quot;ga:transactions&quot;, &quot;ga:transactionRevenue&quot;. This field is required if status is &quot;RUNNING&quot; and servingFramework is one of &quot;REDIRECT&quot; or &quot;API&quot;.
377 &quot;optimizationType&quot;: &quot;A String&quot;, # Whether the objectiveMetric should be minimized or maximized. Possible values: &quot;MAXIMUM&quot;, &quot;MINIMUM&quot;. Optional--defaults to &quot;MAXIMUM&quot;. Cannot be specified without objectiveMetric. Cannot be modified when status is &quot;RUNNING&quot; or &quot;ENDED&quot;.
378 &quot;parentLink&quot;: { # Parent link for an experiment. Points to the view (profile) to which this experiment belongs.
379 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this experiment belongs. This field is read-only.
380 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;. This field is read-only.
381 },
382 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this experiment belongs. This field is read-only.
383 &quot;reasonExperimentEnded&quot;: &quot;A String&quot;, # Why the experiment ended. Possible values: &quot;STOPPED_BY_USER&quot;, &quot;WINNER_FOUND&quot;, &quot;EXPERIMENT_EXPIRED&quot;, &quot;ENDED_WITH_NO_WINNER&quot;, &quot;GOAL_OBJECTIVE_CHANGED&quot;. &quot;ENDED_WITH_NO_WINNER&quot; means that the experiment didn&#x27;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.
384 &quot;rewriteVariationUrlsAsOriginal&quot;: True or False, # 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.
385 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this experiment. This field is read-only.
386 &quot;servingFramework&quot;: &quot;A String&quot;, # The framework used to serve the experiment variations and evaluate the results. One of:
387 # - REDIRECT: Google Analytics redirects traffic to different variation pages, reports the chosen variation and evaluates the results.
388 # - API: Google Analytics chooses and reports the variation to serve and evaluates the results; the caller is responsible for serving the selected variation.
389 # - 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.
390 &quot;snippet&quot;: &quot;A String&quot;, # The snippet of code to include on the control page(s). This field is read-only.
391 &quot;startTime&quot;: &quot;A String&quot;, # 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.
392 &quot;status&quot;: &quot;A String&quot;, # Experiment status. Possible values: &quot;DRAFT&quot;, &quot;READY_TO_RUN&quot;, &quot;RUNNING&quot;, &quot;ENDED&quot;. Experiments can be created in the &quot;DRAFT&quot;, &quot;READY_TO_RUN&quot; or &quot;RUNNING&quot; state. This field is required when creating an experiment.
393 &quot;trafficCoverage&quot;: 3.14, # 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.
394 &quot;updated&quot;: &quot;A String&quot;, # Time the experiment was last modified. This field is read-only.
395 &quot;variations&quot;: [ # 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.
396 {
397 &quot;name&quot;: &quot;A String&quot;, # The name of the variation. This field is required when creating an experiment. This field may not be changed for an experiment whose status is ENDED.
398 &quot;status&quot;: &quot;A String&quot;, # Status of the variation. Possible values: &quot;ACTIVE&quot;, &quot;INACTIVE&quot;. INACTIVE variations are not served. This field may not be changed for an experiment whose status is ENDED.
399 &quot;url&quot;: &quot;A String&quot;, # The URL of the variation. This field may not be changed for an experiment whose status is RUNNING or ENDED.
400 &quot;weight&quot;: 3.14, # Weight that this variation should receive. Only present if the experiment is running. This field is read-only.
401 &quot;won&quot;: True or False, # True if the experiment has ended and this variation performed (statistically) significantly better than the original. This field is read-only.
402 },
403 ],
404 &quot;webPropertyId&quot;: &quot;A String&quot;, # Web property ID to which this experiment belongs. The web property ID is of the form UA-XXXXX-YY. This field is read-only.
405 &quot;winnerConfidenceLevel&quot;: 3.14, # 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.
406 &quot;winnerFound&quot;: True or False, # Boolean specifying whether a winner has been found for this experiment. This field is read-only.
407 }
408
409
410 Returns:
411 An object of the form:
412
413 { # JSON template for Analytics experiment resource.
414 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this experiment belongs. This field is read-only.
415 &quot;created&quot;: &quot;A String&quot;, # Time the experiment was created. This field is read-only.
416 &quot;description&quot;: &quot;A String&quot;, # Notes about this experiment.
417 &quot;editableInGaUi&quot;: True or False, # If true, the end user will be able to edit the experiment via the Google Analytics user interface.
418 &quot;endTime&quot;: &quot;A String&quot;, # 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.
419 &quot;equalWeighting&quot;: True or False, # 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.
420 &quot;id&quot;: &quot;A String&quot;, # Experiment ID. Required for patch and update. Disallowed for create.
421 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this experiment belongs. This field is read-only.
422 &quot;kind&quot;: &quot;analytics#experiment&quot;, # Resource type for an Analytics experiment. This field is read-only.
423 &quot;minimumExperimentLengthInDays&quot;: 42, # 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.
424 &quot;name&quot;: &quot;A String&quot;, # Experiment name. This field may not be changed for an experiment whose status is ENDED. This field is required when creating an experiment.
425 &quot;objectiveMetric&quot;: &quot;A String&quot;, # The metric that the experiment is optimizing. Valid values: &quot;ga:goal(n)Completions&quot;, &quot;ga:adsenseAdsClicks&quot;, &quot;ga:adsenseAdsViewed&quot;, &quot;ga:adsenseRevenue&quot;, &quot;ga:bounces&quot;, &quot;ga:pageviews&quot;, &quot;ga:sessionDuration&quot;, &quot;ga:transactions&quot;, &quot;ga:transactionRevenue&quot;. This field is required if status is &quot;RUNNING&quot; and servingFramework is one of &quot;REDIRECT&quot; or &quot;API&quot;.
426 &quot;optimizationType&quot;: &quot;A String&quot;, # Whether the objectiveMetric should be minimized or maximized. Possible values: &quot;MAXIMUM&quot;, &quot;MINIMUM&quot;. Optional--defaults to &quot;MAXIMUM&quot;. Cannot be specified without objectiveMetric. Cannot be modified when status is &quot;RUNNING&quot; or &quot;ENDED&quot;.
427 &quot;parentLink&quot;: { # Parent link for an experiment. Points to the view (profile) to which this experiment belongs.
428 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this experiment belongs. This field is read-only.
429 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;. This field is read-only.
430 },
431 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this experiment belongs. This field is read-only.
432 &quot;reasonExperimentEnded&quot;: &quot;A String&quot;, # Why the experiment ended. Possible values: &quot;STOPPED_BY_USER&quot;, &quot;WINNER_FOUND&quot;, &quot;EXPERIMENT_EXPIRED&quot;, &quot;ENDED_WITH_NO_WINNER&quot;, &quot;GOAL_OBJECTIVE_CHANGED&quot;. &quot;ENDED_WITH_NO_WINNER&quot; means that the experiment didn&#x27;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.
433 &quot;rewriteVariationUrlsAsOriginal&quot;: True or False, # 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.
434 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this experiment. This field is read-only.
435 &quot;servingFramework&quot;: &quot;A String&quot;, # The framework used to serve the experiment variations and evaluate the results. One of:
436 # - REDIRECT: Google Analytics redirects traffic to different variation pages, reports the chosen variation and evaluates the results.
437 # - API: Google Analytics chooses and reports the variation to serve and evaluates the results; the caller is responsible for serving the selected variation.
438 # - 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.
439 &quot;snippet&quot;: &quot;A String&quot;, # The snippet of code to include on the control page(s). This field is read-only.
440 &quot;startTime&quot;: &quot;A String&quot;, # 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.
441 &quot;status&quot;: &quot;A String&quot;, # Experiment status. Possible values: &quot;DRAFT&quot;, &quot;READY_TO_RUN&quot;, &quot;RUNNING&quot;, &quot;ENDED&quot;. Experiments can be created in the &quot;DRAFT&quot;, &quot;READY_TO_RUN&quot; or &quot;RUNNING&quot; state. This field is required when creating an experiment.
442 &quot;trafficCoverage&quot;: 3.14, # 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.
443 &quot;updated&quot;: &quot;A String&quot;, # Time the experiment was last modified. This field is read-only.
444 &quot;variations&quot;: [ # 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.
445 {
446 &quot;name&quot;: &quot;A String&quot;, # The name of the variation. This field is required when creating an experiment. This field may not be changed for an experiment whose status is ENDED.
447 &quot;status&quot;: &quot;A String&quot;, # Status of the variation. Possible values: &quot;ACTIVE&quot;, &quot;INACTIVE&quot;. INACTIVE variations are not served. This field may not be changed for an experiment whose status is ENDED.
448 &quot;url&quot;: &quot;A String&quot;, # The URL of the variation. This field may not be changed for an experiment whose status is RUNNING or ENDED.
449 &quot;weight&quot;: 3.14, # Weight that this variation should receive. Only present if the experiment is running. This field is read-only.
450 &quot;won&quot;: True or False, # True if the experiment has ended and this variation performed (statistically) significantly better than the original. This field is read-only.
451 },
452 ],
453 &quot;webPropertyId&quot;: &quot;A String&quot;, # Web property ID to which this experiment belongs. The web property ID is of the form UA-XXXXX-YY. This field is read-only.
454 &quot;winnerConfidenceLevel&quot;: 3.14, # 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.
455 &quot;winnerFound&quot;: True or False, # Boolean specifying whether a winner has been found for this experiment. This field is read-only.
456 }</pre>
457 </div>
458
459 <div class="method">
460 <code class="details" id="update">update(accountId, webPropertyId, profileId, experimentId, body=None)</code>
461 <pre>Update an existing experiment.
462
463 Args:
464 accountId: string, Account ID of the experiment to update. (required)
465 webPropertyId: string, Web property ID of the experiment to update. (required)
466 profileId: string, View (Profile) ID of the experiment to update. (required)
467 experimentId: string, Experiment ID of the experiment to update. (required)
468 body: object, The request body.
469 The object takes the form of:
470
471 { # JSON template for Analytics experiment resource.
472 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this experiment belongs. This field is read-only.
473 &quot;created&quot;: &quot;A String&quot;, # Time the experiment was created. This field is read-only.
474 &quot;description&quot;: &quot;A String&quot;, # Notes about this experiment.
475 &quot;editableInGaUi&quot;: True or False, # If true, the end user will be able to edit the experiment via the Google Analytics user interface.
476 &quot;endTime&quot;: &quot;A String&quot;, # 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.
477 &quot;equalWeighting&quot;: True or False, # 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.
478 &quot;id&quot;: &quot;A String&quot;, # Experiment ID. Required for patch and update. Disallowed for create.
479 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this experiment belongs. This field is read-only.
480 &quot;kind&quot;: &quot;analytics#experiment&quot;, # Resource type for an Analytics experiment. This field is read-only.
481 &quot;minimumExperimentLengthInDays&quot;: 42, # 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.
482 &quot;name&quot;: &quot;A String&quot;, # Experiment name. This field may not be changed for an experiment whose status is ENDED. This field is required when creating an experiment.
483 &quot;objectiveMetric&quot;: &quot;A String&quot;, # The metric that the experiment is optimizing. Valid values: &quot;ga:goal(n)Completions&quot;, &quot;ga:adsenseAdsClicks&quot;, &quot;ga:adsenseAdsViewed&quot;, &quot;ga:adsenseRevenue&quot;, &quot;ga:bounces&quot;, &quot;ga:pageviews&quot;, &quot;ga:sessionDuration&quot;, &quot;ga:transactions&quot;, &quot;ga:transactionRevenue&quot;. This field is required if status is &quot;RUNNING&quot; and servingFramework is one of &quot;REDIRECT&quot; or &quot;API&quot;.
484 &quot;optimizationType&quot;: &quot;A String&quot;, # Whether the objectiveMetric should be minimized or maximized. Possible values: &quot;MAXIMUM&quot;, &quot;MINIMUM&quot;. Optional--defaults to &quot;MAXIMUM&quot;. Cannot be specified without objectiveMetric. Cannot be modified when status is &quot;RUNNING&quot; or &quot;ENDED&quot;.
485 &quot;parentLink&quot;: { # Parent link for an experiment. Points to the view (profile) to which this experiment belongs.
486 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this experiment belongs. This field is read-only.
487 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;. This field is read-only.
488 },
489 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this experiment belongs. This field is read-only.
490 &quot;reasonExperimentEnded&quot;: &quot;A String&quot;, # Why the experiment ended. Possible values: &quot;STOPPED_BY_USER&quot;, &quot;WINNER_FOUND&quot;, &quot;EXPERIMENT_EXPIRED&quot;, &quot;ENDED_WITH_NO_WINNER&quot;, &quot;GOAL_OBJECTIVE_CHANGED&quot;. &quot;ENDED_WITH_NO_WINNER&quot; means that the experiment didn&#x27;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.
491 &quot;rewriteVariationUrlsAsOriginal&quot;: True or False, # 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.
492 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this experiment. This field is read-only.
493 &quot;servingFramework&quot;: &quot;A String&quot;, # The framework used to serve the experiment variations and evaluate the results. One of:
494 # - REDIRECT: Google Analytics redirects traffic to different variation pages, reports the chosen variation and evaluates the results.
495 # - API: Google Analytics chooses and reports the variation to serve and evaluates the results; the caller is responsible for serving the selected variation.
496 # - 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.
497 &quot;snippet&quot;: &quot;A String&quot;, # The snippet of code to include on the control page(s). This field is read-only.
498 &quot;startTime&quot;: &quot;A String&quot;, # 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.
499 &quot;status&quot;: &quot;A String&quot;, # Experiment status. Possible values: &quot;DRAFT&quot;, &quot;READY_TO_RUN&quot;, &quot;RUNNING&quot;, &quot;ENDED&quot;. Experiments can be created in the &quot;DRAFT&quot;, &quot;READY_TO_RUN&quot; or &quot;RUNNING&quot; state. This field is required when creating an experiment.
500 &quot;trafficCoverage&quot;: 3.14, # 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.
501 &quot;updated&quot;: &quot;A String&quot;, # Time the experiment was last modified. This field is read-only.
502 &quot;variations&quot;: [ # 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.
503 {
504 &quot;name&quot;: &quot;A String&quot;, # The name of the variation. This field is required when creating an experiment. This field may not be changed for an experiment whose status is ENDED.
505 &quot;status&quot;: &quot;A String&quot;, # Status of the variation. Possible values: &quot;ACTIVE&quot;, &quot;INACTIVE&quot;. INACTIVE variations are not served. This field may not be changed for an experiment whose status is ENDED.
506 &quot;url&quot;: &quot;A String&quot;, # The URL of the variation. This field may not be changed for an experiment whose status is RUNNING or ENDED.
507 &quot;weight&quot;: 3.14, # Weight that this variation should receive. Only present if the experiment is running. This field is read-only.
508 &quot;won&quot;: True or False, # True if the experiment has ended and this variation performed (statistically) significantly better than the original. This field is read-only.
509 },
510 ],
511 &quot;webPropertyId&quot;: &quot;A String&quot;, # Web property ID to which this experiment belongs. The web property ID is of the form UA-XXXXX-YY. This field is read-only.
512 &quot;winnerConfidenceLevel&quot;: 3.14, # 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.
513 &quot;winnerFound&quot;: True or False, # Boolean specifying whether a winner has been found for this experiment. This field is read-only.
514 }
515
516
517 Returns:
518 An object of the form:
519
520 { # JSON template for Analytics experiment resource.
521 &quot;accountId&quot;: &quot;A String&quot;, # Account ID to which this experiment belongs. This field is read-only.
522 &quot;created&quot;: &quot;A String&quot;, # Time the experiment was created. This field is read-only.
523 &quot;description&quot;: &quot;A String&quot;, # Notes about this experiment.
524 &quot;editableInGaUi&quot;: True or False, # If true, the end user will be able to edit the experiment via the Google Analytics user interface.
525 &quot;endTime&quot;: &quot;A String&quot;, # 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.
526 &quot;equalWeighting&quot;: True or False, # 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.
527 &quot;id&quot;: &quot;A String&quot;, # Experiment ID. Required for patch and update. Disallowed for create.
528 &quot;internalWebPropertyId&quot;: &quot;A String&quot;, # Internal ID for the web property to which this experiment belongs. This field is read-only.
529 &quot;kind&quot;: &quot;analytics#experiment&quot;, # Resource type for an Analytics experiment. This field is read-only.
530 &quot;minimumExperimentLengthInDays&quot;: 42, # 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.
531 &quot;name&quot;: &quot;A String&quot;, # Experiment name. This field may not be changed for an experiment whose status is ENDED. This field is required when creating an experiment.
532 &quot;objectiveMetric&quot;: &quot;A String&quot;, # The metric that the experiment is optimizing. Valid values: &quot;ga:goal(n)Completions&quot;, &quot;ga:adsenseAdsClicks&quot;, &quot;ga:adsenseAdsViewed&quot;, &quot;ga:adsenseRevenue&quot;, &quot;ga:bounces&quot;, &quot;ga:pageviews&quot;, &quot;ga:sessionDuration&quot;, &quot;ga:transactions&quot;, &quot;ga:transactionRevenue&quot;. This field is required if status is &quot;RUNNING&quot; and servingFramework is one of &quot;REDIRECT&quot; or &quot;API&quot;.
533 &quot;optimizationType&quot;: &quot;A String&quot;, # Whether the objectiveMetric should be minimized or maximized. Possible values: &quot;MAXIMUM&quot;, &quot;MINIMUM&quot;. Optional--defaults to &quot;MAXIMUM&quot;. Cannot be specified without objectiveMetric. Cannot be modified when status is &quot;RUNNING&quot; or &quot;ENDED&quot;.
534 &quot;parentLink&quot;: { # Parent link for an experiment. Points to the view (profile) to which this experiment belongs.
535 &quot;href&quot;: &quot;A String&quot;, # Link to the view (profile) to which this experiment belongs. This field is read-only.
536 &quot;type&quot;: &quot;analytics#profile&quot;, # Value is &quot;analytics#profile&quot;. This field is read-only.
537 },
538 &quot;profileId&quot;: &quot;A String&quot;, # View (Profile) ID to which this experiment belongs. This field is read-only.
539 &quot;reasonExperimentEnded&quot;: &quot;A String&quot;, # Why the experiment ended. Possible values: &quot;STOPPED_BY_USER&quot;, &quot;WINNER_FOUND&quot;, &quot;EXPERIMENT_EXPIRED&quot;, &quot;ENDED_WITH_NO_WINNER&quot;, &quot;GOAL_OBJECTIVE_CHANGED&quot;. &quot;ENDED_WITH_NO_WINNER&quot; means that the experiment didn&#x27;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.
540 &quot;rewriteVariationUrlsAsOriginal&quot;: True or False, # 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.
541 &quot;selfLink&quot;: &quot;A String&quot;, # Link for this experiment. This field is read-only.
542 &quot;servingFramework&quot;: &quot;A String&quot;, # The framework used to serve the experiment variations and evaluate the results. One of:
543 # - REDIRECT: Google Analytics redirects traffic to different variation pages, reports the chosen variation and evaluates the results.
544 # - API: Google Analytics chooses and reports the variation to serve and evaluates the results; the caller is responsible for serving the selected variation.
545 # - 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.
546 &quot;snippet&quot;: &quot;A String&quot;, # The snippet of code to include on the control page(s). This field is read-only.
547 &quot;startTime&quot;: &quot;A String&quot;, # 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.
548 &quot;status&quot;: &quot;A String&quot;, # Experiment status. Possible values: &quot;DRAFT&quot;, &quot;READY_TO_RUN&quot;, &quot;RUNNING&quot;, &quot;ENDED&quot;. Experiments can be created in the &quot;DRAFT&quot;, &quot;READY_TO_RUN&quot; or &quot;RUNNING&quot; state. This field is required when creating an experiment.
549 &quot;trafficCoverage&quot;: 3.14, # 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.
550 &quot;updated&quot;: &quot;A String&quot;, # Time the experiment was last modified. This field is read-only.
551 &quot;variations&quot;: [ # 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.
552 {
553 &quot;name&quot;: &quot;A String&quot;, # The name of the variation. This field is required when creating an experiment. This field may not be changed for an experiment whose status is ENDED.
554 &quot;status&quot;: &quot;A String&quot;, # Status of the variation. Possible values: &quot;ACTIVE&quot;, &quot;INACTIVE&quot;. INACTIVE variations are not served. This field may not be changed for an experiment whose status is ENDED.
555 &quot;url&quot;: &quot;A String&quot;, # The URL of the variation. This field may not be changed for an experiment whose status is RUNNING or ENDED.
556 &quot;weight&quot;: 3.14, # Weight that this variation should receive. Only present if the experiment is running. This field is read-only.
557 &quot;won&quot;: True or False, # True if the experiment has ended and this variation performed (statistically) significantly better than the original. This field is read-only.
558 },
559 ],
560 &quot;webPropertyId&quot;: &quot;A String&quot;, # Web property ID to which this experiment belongs. The web property ID is of the form UA-XXXXX-YY. This field is read-only.
561 &quot;winnerConfidenceLevel&quot;: 3.14, # 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.
562 &quot;winnerFound&quot;: True or False, # Boolean specifying whether a winner has been found for this experiment. This field is read-only.
563 }</pre>
564 </div>
565
566 </body></html>