analytics.management.experiments.insert

POST {{baseUrl}}/management/accounts/:accountId/webproperties/:webPropertyId/profiles/:profileId/experiments?alt=<string>&fields=<string>&key=<string>&oauth_token=<string>&prettyPrint=<boolean>&quotaUser=<string>&userIp=<string>

Create a new experiment.

Request Params

KeyDatatypeRequiredDescription
altstringData format for the response.
fieldsstringSelector specifying which fields to include in a partial response.
keystringAPI key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
oauth_tokenstringOAuth 2.0 token for the current user.
prettyPrintstringReturns response with indentations and line breaks.
quotaUserstringAn opaque string that represents a user for quota purposes. Must not exceed 40 characters.
userIpstringDeprecated. Please use quotaUser instead.

Request Body

{"accountId"=>"<string>", "created"=>"<dateTime>", "description"=>"<string>", "editableInGaUi"=>"<boolean>", "endTime"=>"<dateTime>", "equalWeighting"=>"<boolean>", "id"=>"<string>", "internalWebPropertyId"=>"<string>", "kind"=>"analytics#experiment", "minimumExperimentLengthInDays"=>"<integer>", "name"=>"<string>", "objectiveMetric"=>"<string>", "optimizationType"=>"<string>", "parentLink"=>{"href"=>"<string>", "type"=>"analytics#profile"}, "profileId"=>"<string>", "reasonExperimentEnded"=>"<string>", "rewriteVariationUrlsAsOriginal"=>"<boolean>", "selfLink"=>"<string>", "servingFramework"=>"<string>", "snippet"=>"<string>", "startTime"=>"<dateTime>", "status"=>"<string>", "trafficCoverage"=>"<number>", "updated"=>"<dateTime>", "variations"=>[{"name"=>"<string>", "status"=>"<string>", "url"=>"<string>", "weight"=>"<number>", "won"=>"<boolean>"}, {"name"=>"<string>", "status"=>"<string>", "url"=>"<string>", "weight"=>"<number>", "won"=>"<boolean>"}], "webPropertyId"=>"<string>", "winnerConfidenceLevel"=>"<number>", "winnerFound"=>"<boolean>"}

HEADERS

KeyDatatypeRequiredDescription
Content-Typestring

RESPONSES

status: OK

{&quot;accountId&quot;:&quot;\u003cstring\u003e&quot;,&quot;created&quot;:&quot;\u003cdateTime\u003e&quot;,&quot;description&quot;:&quot;\u003cstring\u003e&quot;,&quot;editableInGaUi&quot;:&quot;\u003cboolean\u003e&quot;,&quot;endTime&quot;:&quot;\u003cdateTime\u003e&quot;,&quot;equalWeighting&quot;:&quot;\u003cboolean\u003e&quot;,&quot;id&quot;:&quot;\u003cstring\u003e&quot;,&quot;internalWebPropertyId&quot;:&quot;\u003cstring\u003e&quot;,&quot;kind&quot;:&quot;analytics#experiment&quot;,&quot;minimumExperimentLengthInDays&quot;:&quot;\u003cinteger\u003e&quot;,&quot;name&quot;:&quot;\u003cstring\u003e&quot;,&quot;objectiveMetric&quot;:&quot;\u003cstring\u003e&quot;,&quot;optimizationType&quot;:&quot;\u003cstring\u003e&quot;,&quot;parentLink&quot;:{&quot;href&quot;:&quot;\u003cstring\u003e&quot;,&quot;type&quot;:&quot;analytics#profile&quot;},&quot;profileId&quot;:&quot;\u003cstring\u003e&quot;,&quot;reasonExperimentEnded&quot;:&quot;\u003cstring\u003e&quot;,&quot;rewriteVariationUrlsAsOriginal&quot;:&quot;\u003cboolean\u003e&quot;,&quot;selfLink&quot;:&quot;\u003cstring\u003e&quot;,&quot;servingFramework&quot;:&quot;\u003cstring\u003e&quot;,&quot;snippet&quot;:&quot;\u003cstring\u003e&quot;,&quot;startTime&quot;:&quot;\u003cdateTime\u003e&quot;,&quot;status&quot;:&quot;\u003cstring\u003e&quot;,&quot;trafficCoverage&quot;:&quot;\u003cnumber\u003e&quot;,&quot;updated&quot;:&quot;\u003cdateTime\u003e&quot;,&quot;variations&quot;:[{&quot;name&quot;:&quot;\u003cstring\u003e&quot;,&quot;status&quot;:&quot;\u003cstring\u003e&quot;,&quot;url&quot;:&quot;\u003cstring\u003e&quot;,&quot;weight&quot;:&quot;\u003cnumber\u003e&quot;,&quot;won&quot;:&quot;\u003cboolean\u003e&quot;},{&quot;name&quot;:&quot;\u003cstring\u003e&quot;,&quot;status&quot;:&quot;\u003cstring\u003e&quot;,&quot;url&quot;:&quot;\u003cstring\u003e&quot;,&quot;weight&quot;:&quot;\u003cnumber\u003e&quot;,&quot;won&quot;:&quot;\u003cboolean\u003e&quot;}],&quot;webPropertyId&quot;:&quot;\u003cstring\u003e&quot;,&quot;winnerConfidenceLevel&quot;:&quot;\u003cnumber\u003e&quot;,&quot;winnerFound&quot;:&quot;\u003cboolean\u003e&quot;}