You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/amplitude.js
+26-17Lines changed: 26 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -8,11 +8,15 @@ import { version } from '../package.json';
8
8
importDEFAULT_OPTIONSfrom'./options';
9
9
10
10
/**
11
-
* Legacy API of Amplitude SDK - instance manager. Wraps around the current amplitude-client.js which provides more features
11
+
* Deprecated legacy API of the Amplitude JS SDK - instance manager.
12
+
*
13
+
* Wraps around the current [AmplitudeClient](https://amplitude.github.io/Amplitude-JavaScript/) which provides more features
12
14
* Function calls directly on amplitude have been deprecated. Please call methods on the default shared instance: amplitude.getInstance() instead.
13
-
* See [Readme]{@link https://github.com/amplitude/Amplitude-Javascript#300-update-and-logging-events-to-multiple-amplitude-apps} for more information about this change.
15
+
*
16
+
* See the [3.0.0 changelog](https://github.com/amplitude/Amplitude-JavaScript/blob/ed405afb5f06d5cf5b72539a5d09179abcf7e1fe/README.md#300-update-and-logging-events-to-multiple-amplitude-apps) for more information about this change.
14
17
* @constructor Amplitude
15
18
* @public
19
+
* @deprecated
16
20
* @example var amplitude = new Amplitude();
17
21
*/
18
22
varAmplitude=functionAmplitude(){
@@ -66,7 +70,7 @@ if (BUILD_COMPAT_2_0) {
66
70
* @param {string} apiKey - The API key for your app.
67
71
* @param {string} opt_userId - (optional) An identifier for this user.
Copy file name to clipboardExpand all lines: src/revenue.js
+4-9Lines changed: 4 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -2,19 +2,13 @@ import constants from './constants';
2
2
importtypefrom'./type';
3
3
importutilsfrom'./utils';
4
4
5
-
/*
6
-
* Wrapper for logging Revenue data. Revenue objects get passed to amplitude.logRevenueV2 to send to Amplitude servers.
7
-
* Note: price is the only required field. If quantity is not specified, then defaults to 1.
8
-
*/
9
-
10
5
/**
11
-
* Revenue API - instance constructor. Revenue objects are a wrapper for revenue data.
6
+
* Revenue API - instance constructor. Wrapper for logging Revenue data. Revenue objects get passed to amplitude.logRevenueV2 to send to Amplitude servers.
12
7
* Each method updates a revenue property in the Revenue object, and returns the same Revenue object,
13
8
* allowing you to chain multiple method calls together.
9
+
*
14
10
* Note: price is a required field to log revenue events.
15
11
* If quantity is not specified then defaults to 1.
16
-
* See [Readme]{@link https://github.com/amplitude/Amplitude-Javascript#tracking-revenue} for more information
17
-
* about logging Revenue.
18
12
* @constructor Revenue
19
13
* @public
20
14
* @example var revenue = new amplitude.Revenue();
@@ -68,7 +62,8 @@ Revenue.prototype.setQuantity = function setQuantity(quantity) {
68
62
69
63
/**
70
64
* Set a value for the price. This field is required for all revenue being logged.
71
-
* Note revenue amount is calculated as price * quantity.
65
+
*
66
+
* Note: revenue amount is calculated as price * quantity.
72
67
* @public
73
68
* @param {number} price - Double value for the quantity.
74
69
* @return {Revenue} Returns the same Revenue object, allowing you to chain multiple method calls together.
0 commit comments