Skip to content

Commit

Permalink
fix(google-analytics): add missing methods, fix return types
Browse files Browse the repository at this point in the history
  • Loading branch information
ihadeed committed Oct 6, 2016
1 parent 40325ca commit 77b0277
Showing 1 changed file with 61 additions and 44 deletions.
105 changes: 61 additions & 44 deletions src/plugins/googleanalytics.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,58 @@ export class GoogleAnalytics {
@Cordova()
static startTrackerWithId(id: string): Promise<any> { return; }

/**
* Enabling Advertising Features in Google Analytics allows you to take advantage of Remarketing, Demographics & Interests reports, and more
* @param allow {boolean}
* @return {Promise<any>}
*/
@Cordova()
static setAllowIDFACollection(allow: boolean): Promise<any> { return; }

/**
* Set a UserId
* https://developers.google.com/analytics/devguides/collection/analyticsjs/user-id
* @param {string} id
* @return {Promise<any>}
*/
@Cordova()
static setUserId(id: string): Promise<any> { return; }

/**
* Set a anonymize Ip address
* @param anonymize
*/
@Cordova()
static setAnonymizeIp(anonymize: boolean): Promise<any> { return; }

/**
* Sets the app version
* @param appVersion
*/
@Cordova()
static setAppVersion(appVersion: string): Promise<any> { return; }

/**
*
* @param oputout
*/
@Cordova()
static setOptOut(oputout: boolean): Promise<any> { return; }

/**
* Enable verbose logging
*/
@Cordova()
static debugMode(): Promise<any> { return; }

/**
*
* @param key
* @param value
*/
@Cordova()
static trackMetric(key, value): Promise<any> { return; }

/**
* Track a screen
* https://developers.google.com/analytics/devguides/collection/analyticsjs/screens
Expand All @@ -37,6 +89,15 @@ export class GoogleAnalytics {
@Cordova()
static trackView(title: string, campaignUrl?: string): Promise<any> { 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<any> { return; }

/**
* Track an event
* https://developers.google.com/analytics/devguides/collection/analyticsjs/events
Expand Down Expand Up @@ -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<any> { 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<any> { 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<any> { return; }

/**
* Enable/disable automatic reporting of uncaught exceptions
* @param {boolean} shouldEnable
Expand Down

0 comments on commit 77b0277

Please sign in to comment.