post https://app.vwo.com/api/v2/accounts//campaigns
Request URI for Sub Account
POST /accounts/40505/campaigns
Request Format
{
"type": "ab",
"urls": [
{
"type": "url",
"value": "http://wingify.com"
}
],
"primaryUrl": "http://wingify.com",
"goals": [
{
"name": "New goal",
"type": "visitPage",
"urls": [
{
"type": "url",
"value": "http://wingify.com"
}
]
}
],
"stats": {
"conversionRate": 0.05,
"certaintyMode": 0.01,
"expectedMonthlyVisitors": 0,
"expectedRevenuePerVisitor": 2,
"liftInConversionRate": 0.05,
},
"globalCode": {
"js": {
"pre": "console.log(\"Pre JS\");",
"post": "console.log(\"Post JS\");"
},
"css": "body {display: block;}"
}
}
Create a campaign
Note:
If stats are not provided, default value for stats (same as given in this request) are used for the campaign created.
Note:
For split campaign creation, two or more variations must be present in the request with urls for which the split campaign needs to be run.
Note:
The "globalCode" section allows you to add Pre/Post-Campaign JS/CSS snippets within the editor. This globalCode block is optional and can be omitted if not needed.