diff --git a/src/plugins/googleanalytics.ts b/src/plugins/googleanalytics.ts index 9be60b233..50e81c810 100644 --- a/src/plugins/googleanalytics.ts +++ b/src/plugins/googleanalytics.ts @@ -23,6 +23,7 @@ export class GoogleAnalytics { * In your 'deviceready' handler, set up your Analytics tracker. * https://developers.google.com/analytics/devguides/collection/analyticsjs/ * @param {string} id Your Google Analytics Mobile App property + * @return {Promise} */ @Cordova() static startTrackerWithId(id: string): Promise { return; } @@ -38,7 +39,7 @@ export class GoogleAnalytics { /** * Set a UserId * https://developers.google.com/analytics/devguides/collection/analyticsjs/user-id - * @param {string} id + * @param {string} id User ID * @return {Promise} */ @Cordova() @@ -46,38 +47,43 @@ export class GoogleAnalytics { /** * Set a anonymize Ip address - * @param anonymize + * @param anonymize {boolean} Set to true to anonymize the IP Address + * @return {Promise} */ @Cordova() static setAnonymizeIp(anonymize: boolean): Promise { return; } /** * Sets the app version - * @param appVersion + * @param appVersion {string} App version + * @return {Promise} */ @Cordova() static setAppVersion(appVersion: string): Promise { return; } /** - * - * @param oputout + * Set OptOut + * @param optout {boolean} + * @return {Promise} */ @Cordova() - static setOptOut(oputout: boolean): Promise { return; } + static setOptOut(optout: boolean): Promise { return; } /** * Enable verbose logging + * @return {Promise} */ @Cordova() static debugMode(): Promise { return; } /** - * - * @param key - * @param value + * Track custom metric + * @param key {string} + * @param value {any} + * @return {Promise} */ @Cordova() - static trackMetric(key, value): Promise { return; } + static trackMetric(key: string, value?: any): Promise { return; } /** * Track a screen @@ -85,6 +91,7 @@ export class GoogleAnalytics { * * @param {string} title Screen title * @param {string} campaignUrl Campaign url for measuring referrals + * @return {Promise} */ @Cordova() static trackView(title: string, campaignUrl?: string): Promise { return; } @@ -94,6 +101,7 @@ export class GoogleAnalytics { * https://developers.google.com/analytics/devguides/platform/customdimsmets * @param {string} key * @param {string} value + * @return {Promise} */ @Cordova() static addCustomDimension(key: number, value: string): Promise { return; } @@ -105,6 +113,7 @@ export class GoogleAnalytics { * @param {string} action * @param {string} label * @param {number} value + * @return {Promise} */ @Cordova() static trackEvent(category: string, action: string, label?: string, value?: number): Promise { return; } @@ -113,6 +122,7 @@ export class GoogleAnalytics { * Track an exception * @param {string} description * @param {boolean} fatal + * @return {Promise} */ @Cordova() static trackException(description: string, fatal: boolean): Promise { return; } @@ -123,6 +133,7 @@ export class GoogleAnalytics { * @param {number} intervalInMilliseconds * @param {string} variable * @param {string} label + * @return {Promise} */ @Cordova() static trackTiming(category: string, intervalInMilliseconds: number, variable: string, label: string): Promise { return; } @@ -136,6 +147,7 @@ export class GoogleAnalytics { * @param {number} tax * @param {number} shipping * @param {string} currencyCode + * @return {Promise} */ @Cordova() static addTransaction(id: string, affiliation: string, revenue: number, tax: number, shipping: number, currencyCode: string): Promise { return; } @@ -150,6 +162,7 @@ export class GoogleAnalytics { * @param {number} price * @param {number} quantity * @param {string} currencyCode + * @return {Promise} */ @Cordova() static addTransactionItem(id: string, name: string, sku: string, category: string, price: number, quantity: number, currencyCode: string): Promise { return; } @@ -157,6 +170,7 @@ export class GoogleAnalytics { /** * Enable/disable automatic reporting of uncaught exceptions * @param {boolean} shouldEnable + * @return {Promise} */ @Cordova() static enableUncaughtExceptionReporting(shouldEnable: boolean): Promise { return; }