https://www.googleapis.com/auth/analytics.edit
Here is my function. A
m i missing anything?
function insertGoal1() {
var request = gapi.client.analytics.management.goals.insert(
{
'accountId': 'xxx',
'webPropertyId': 'UA-xxx-1',
'profileId': 'xxx',
'resource': {
'id': '6',
'kind': 'analytics#goal',
'selfLink': 'https://www.googleapis.com/analytics/v3/management/accounts/xxx/webproperties/UA-xxx-1/profiles/xxx/goals/6',
'accountId': 'xxx',
'webPropertyId': 'UA-xxx-1',
'internalWebPropertyId': 'xxx',
'profileId': 'xxx',
'name': 'User time on site',
'value': 2,
'active': true,
'type': 'VISIT_TIME_ON_SITE',
'visitTimeOnSiteDetails': {
'comparisonType': 'GREATER_THAN',
'comparisonValue': 300
}
"parentLink": {
"type": 'analytics#profile',
"href": 'https://www.googleapis.com/analytics/v3/management/accounts/xxx/webproperties/UA-xxx-1/profiles/xxx',
},
"urlDestinationDetails": {
"url": '/chat',
"caseSensitive": false,
"matchType": 'EXACT',
"firstStepRequired": false,
},
}
});
request.execute(function (response) { // Handle the response. });
}
}
--
You received this message because you are subscribed to the Google Groups "Google Analytics Management API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-mana...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-management-api+unsubscribe@googlegroups.com.
/*
* Note: This code assumes you have an authorized Analytics client object.
* See the Goals Developer Guide for details.
*/
/*
* This request creates a new goal.
*/
function insertGoal() {
var request = gapi.client.analytics.management.goals.insert(
{
'accountId': '123456',
'webPropertyId': 'UA-123456-1',
'profileId': '7654321',
'resource': {
'id': '7',
'active': false,
'name': 'My Goal',
'type': 'VISIT_TIME_ON_SITE',
'visitTimeOnSiteDetails': {
'comparisonType': 'GREATER_THAN',
'comparisonValue': 300
}
}
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-mana...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Google Analytics Management API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-mana...@googlegroups.com.
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-management-api+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Google Analytics Management API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-management-api+unsubscribe@googlegroups.com.
gapi.client.load('analytics', 'v3').then(function() {
console.log('TODO(James): break point here.');
// Get a list of all Google Analytics accounts for this user
gapi.client.analytics.management.accounts.list().then(handleAccounts);
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-mana...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Google Analytics Management API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-mana...@googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "Google Analytics Management API" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-mana...@googlegroups.com.