diff --git a/src/plugins/googleanalytics.ts b/src/plugins/googleanalytics.ts index a08fbe4062..9be60b2333 100644 --- a/src/plugins/googleanalytics.ts +++ b/src/plugins/googleanalytics.ts @@ -27,6 +27,58 @@ export class GoogleAnalytics { @Cordova() static startTrackerWithId(id: string): Promise { return; } + /** + * Enabling Advertising Features in Google Analytics allows you to take advantage of Remarketing, Demographics & Interests reports, and more + * @param allow {boolean} + * @return {Promise} + */ + @Cordova() + static setAllowIDFACollection(allow: boolean): Promise { return; } + + /** + * Set a UserId + * https://developers.google.com/analytics/devguides/collection/analyticsjs/user-id + * @param {string} id + * @return {Promise} + */ + @Cordova() + static setUserId(id: string): Promise { return; } + + /** + * Set a anonymize Ip address + * @param anonymize + */ + @Cordova() + static setAnonymizeIp(anonymize: boolean): Promise { return; } + + /** + * Sets the app version + * @param appVersion + */ + @Cordova() + static setAppVersion(appVersion: string): Promise { return; } + + /** + * + * @param oputout + */ + @Cordova() + static setOptOut(oputout: boolean): Promise { return; } + + /** + * Enable verbose logging + */ + @Cordova() + static debugMode(): Promise { return; } + + /** + * + * @param key + * @param value + */ + @Cordova() + static trackMetric(key, value): Promise { return; } + /** * Track a screen * https://developers.google.com/analytics/devguides/collection/analyticsjs/screens @@ -37,6 +89,15 @@ export class GoogleAnalytics { @Cordova() static trackView(title: string, campaignUrl?: string): Promise { return; } + /** + * Add a Custom Dimension + * https://developers.google.com/analytics/devguides/platform/customdimsmets + * @param {string} key + * @param {string} value + */ + @Cordova() + static addCustomDimension(key: number, value: string): Promise { return; } + /** * Track an event * https://developers.google.com/analytics/devguides/collection/analyticsjs/events @@ -93,50 +154,6 @@ export class GoogleAnalytics { @Cordova() static addTransactionItem(id: string, name: string, sku: string, category: string, price: number, quantity: number, currencyCode: string): Promise { return; } - /** - * Add a Custom Dimension - * https://developers.google.com/analytics/devguides/platform/customdimsmets - * @param {string} key - * @param {string} value - */ - @Cordova() - static addCustomDimension(key: number, value: string): Promise { return; } - - /** - * Set a UserId - * https://developers.google.com/analytics/devguides/collection/analyticsjs/user-id - * @param {string} id - */ - @Cordova({sync: true}) - static setUserId(id: string): void { } - - /** - * Sets the app version - * @param appVersion - */ - @Cordova({sync: true}) - static setAppVersion(appVersion: string): void { } - - /** - * Set a anonymize Ip address - * @param anonymize - */ - @Cordova({sync: true}) - static setAnonymizeIp(anonymize: boolean): void { } - - /** - * Enabling Advertising Features in Google Analytics allows you to take advantage of Remarketing, Demographics & Interests reports, and more - * @param allow - */ - @Cordova({sync: true}) - static setAllowIDFACollection(allow: boolean): void { } - - /** - * Enable verbose logging - */ - @Cordova({sync: true}) - static debugMode(): Promise { return; } - /** * Enable/disable automatic reporting of uncaught exceptions * @param {boolean} shouldEnable