I'm trying to insert an experiment to Google analytics through their api (using gapi)
var experiment = {
"name": "Testing",
"description": "test",
"status": "READY_TO_RUN",
"variations": [{
"name": "Original",
"url": "http://abc.se",
}, {
"name": "Variant 1",
"url": "http://abc.se/1",
}],
};
gapi.client.analytics.management.experiments.insert({
'accountId': currentProfile['accountId'],
'profileId': currentProfile['profileId'],
'webPropertyId': currentProfile['webPropertyId'],
'resource': experiment
}).execute(callback);
The response-code I get is "code": 500, "message": "There was an internal error.",
Any help will be mostly appreciated. (First question on stackoverflow, I apologize in advance if my question is fuzzy.)