mirror of
https://github.com/danielsogl/awesome-cordova-plugins.git
synced 2025-01-20 01:22:52 +08:00
fix(google-analytics): specify successIndex and errorIndex for methods with optional params
This commit is contained in:
parent
84f54d64aa
commit
6f23bef5d1
@ -82,7 +82,10 @@ export class GoogleAnalytics {
|
|||||||
* @param value {any}
|
* @param value {any}
|
||||||
* @return {Promise<any>}
|
* @return {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova({
|
||||||
|
successIndex: 2,
|
||||||
|
errorIndex: 3
|
||||||
|
})
|
||||||
static trackMetric(key: string, value?: any): Promise<any> { return; }
|
static trackMetric(key: string, value?: any): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -94,14 +97,17 @@ export class GoogleAnalytics {
|
|||||||
* @param newSession {boolean} Set to true to create a new session
|
* @param newSession {boolean} Set to true to create a new session
|
||||||
* @return {Promise<any>}
|
* @return {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova({
|
||||||
|
successIndex: 3,
|
||||||
|
errorIndex: 4
|
||||||
|
})
|
||||||
static trackView(title: string, campaignUrl?: string, newSession?: boolean): Promise<any> { return; }
|
static trackView(title: string, campaignUrl?: string, newSession?: boolean): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Add a Custom Dimension
|
* Add a Custom Dimension
|
||||||
* https://developers.google.com/analytics/devguides/platform/customdimsmets
|
* https://developers.google.com/analytics/devguides/platform/customdimsmets
|
||||||
* @param {string} key
|
* @param key {string}
|
||||||
* @param {string} value
|
* @param value {string}
|
||||||
* @return {Promise<any>}
|
* @return {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -117,13 +123,16 @@ export class GoogleAnalytics {
|
|||||||
* @param newSession {boolean} Set to true to create a new session
|
* @param newSession {boolean} Set to true to create a new session
|
||||||
* @return {Promise<any>}
|
* @return {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova({
|
||||||
|
successIndex: 5,
|
||||||
|
errorIndex: 6
|
||||||
|
})
|
||||||
static trackEvent(category: string, action: string, label?: string, value?: number, newSession?: boolean): Promise<any> { return; }
|
static trackEvent(category: string, action: string, label?: string, value?: number, newSession?: boolean): Promise<any> { return; }
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Track an exception
|
* Track an exception
|
||||||
* @param {string} description
|
* @param description {string}
|
||||||
* @param {boolean} fatal
|
* @param fatal {boolean}
|
||||||
* @return {Promise<any>}
|
* @return {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -131,10 +140,10 @@ export class GoogleAnalytics {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Track User Timing (App Speed)
|
* Track User Timing (App Speed)
|
||||||
* @param {string} category
|
* @param category {string}
|
||||||
* @param {number} intervalInMilliseconds
|
* @param intervalInMilliseconds {number}
|
||||||
* @param {string} variable
|
* @param variable {string}
|
||||||
* @param {string} label
|
* @param label {string}
|
||||||
* @return {Promise<any>}
|
* @return {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -143,12 +152,12 @@ export class GoogleAnalytics {
|
|||||||
/**
|
/**
|
||||||
* Add a Transaction (Ecommerce)
|
* Add a Transaction (Ecommerce)
|
||||||
* https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce#addTrans
|
* https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce#addTrans
|
||||||
* @param {string} id
|
* @param id {string}
|
||||||
* @param {string} affiliation
|
* @param affiliation {string}
|
||||||
* @param {number} revenue
|
* @param revenue {number}
|
||||||
* @param {number} tax
|
* @param tax {number}
|
||||||
* @param {number} shipping
|
* @param shipping {number}
|
||||||
* @param {string} currencyCode
|
* @param currencyCode {string}
|
||||||
* @return {Promise<any>}
|
* @return {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
@ -171,7 +180,7 @@ export class GoogleAnalytics {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Enable/disable automatic reporting of uncaught exceptions
|
* Enable/disable automatic reporting of uncaught exceptions
|
||||||
* @param {boolean} shouldEnable
|
* @param shouldEnable {boolean}
|
||||||
* @return {Promise<any>}
|
* @return {Promise<any>}
|
||||||
*/
|
*/
|
||||||
@Cordova()
|
@Cordova()
|
||||||
|
Loading…
Reference in New Issue
Block a user