n8n-nodes-googleanalytics
Version:
Node N8N to interact with Google Analytics
63 lines • 2.42 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.GoogleAnalyticsApi = void 0;
const scopes = [
'https://www.googleapis.com/auth/analytics',
'https://www.googleapis.com/auth/analytics.edit',
'https://www.googleapis.com/auth/analytics.manage.users.readonly',
'https://www.googleapis.com/auth/analytics.manage.users',
'https://www.googleapis.com/auth/analytics.readonly',
'https://www.googleapis.com/auth/analytics.user.deletion',
'https://www.googleapis.com/auth/drive',
'https://www.googleapis.com/auth/drive.file',
'https://www.googleapis.com/auth/spreadsheets'
];
class GoogleAnalyticsApi {
constructor() {
this.name = 'googleAnalyticsOAuth2Api';
this.extends = ['googleOAuth2Api'];
this.displayName = 'Google Analytics OAuth2 API';
this.documentationUrl = 'https://docs.n8n.io/integrations/builtin/credentials/google/oauth-single-service/';
this.icon = 'file:icons/googleanalytics.svg';
this.properties = [
{
displayName: 'Grant Type',
name: 'grantType',
type: 'hidden',
default: 'authorizationCode',
},
{
displayName: 'Authorization URL',
name: 'authUrl',
type: 'hidden',
default: 'https://accounts.google.com/o/oauth2/v2/auth',
},
{
displayName: 'Access Token URL',
name: 'accessTokenUrl',
type: 'hidden',
default: 'https://oauth2.googleapis.com/token',
},
{
displayName: 'Auth URI Query Parameters',
name: 'authQueryParameters',
type: 'hidden',
default: 'access_type=offline&prompt=consent',
},
{
displayName: 'Authentication',
name: 'authentication',
type: 'hidden',
default: 'header',
},
{
displayName: 'Scope',
name: 'scope',
type: 'hidden',
default: scopes.join(' '),
}
];
}
}
exports.GoogleAnalyticsApi = GoogleAnalyticsApi;
//# sourceMappingURL=GoogleAnalyticsApi.credentials.js.map