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
* Increment a user property by a given value (can also be negative to decrement). If the user property does not have a value set yet, it will be initialized to 0 before being incremented.
65
65
* @public
66
66
* @param {string} property - The user property key.
67
-
* @param {number/string} value - The amount by which to increment the user property. Allows numbers as strings (ex: '123').
67
+
* @param {number|string} value - The amount by which to increment the user property. Allows numbers as strings (ex: '123').
68
68
* @return {Identify_object} Returns the same Identify object, allowing you to chain multiple method calls together.
69
69
* @example var identify = new amplitude.Identify().add('karma', 1).add('friends', 1);
70
70
* amplitude.identify(identify); // send the Identify call
* If the user property has an existing value and it is not a list, the existing value will be converted into a list with the new values appended.
85
85
* @public
86
86
* @param {string} property - The user property key.
87
-
* @param {number/string/list/object} value - A value or values to append. Values can be numbers, strings, lists, or object (key:value dict will be flattened).
87
+
* @param {number|string|list|object} value - A value or values to append. Values can be numbers, strings, lists, or object (key:value dict will be flattened).
88
88
* @return {Identify_object} Returns the same Identify object, allowing you to chain multiple method calls together.
89
89
* @example var identify = new amplitude.Identify().append('ab-tests', 'new-user-tests');
* If the user property has an existing value and it is not a list, the existing value will be converted into a list with the new values prepended.
120
120
* @public
121
121
* @param {string} property - The user property key.
122
-
* @param {number/string/list/object} value - A value or values to prepend. Values can be numbers, strings, lists, or object (key:value dict will be flattened).
122
+
* @param {number|string|list|object} value - A value or values to prepend. Values can be numbers, strings, lists, or object (key:value dict will be flattened).
123
123
* @return {Identify_object} Returns the same Identify object, allowing you to chain multiple method calls together.
124
124
* @example var identify = new amplitude.Identify().prepend('ab-tests', 'new-user-tests');
* Sets the value of a given user property. If a value already exists, it will be overwriten with the new value.
135
135
* @public
136
136
* @param {string} property - The user property key.
137
-
* @param {number/string/list/object} value - A value or values to set. Values can be numbers, strings, lists, or object (key:value dict will be flattened).
137
+
* @param {number|string|list|object} value - A value or values to set. Values can be numbers, strings, lists, or object (key:value dict will be flattened).
138
138
* @return {Identify_object} Returns the same Identify object, allowing you to chain multiple method calls together.
139
139
* @example var identify = new amplitude.Identify().set('user_type', 'beta');
140
140
* identify.set('name', {'first': 'John', 'last': 'Doe'}); // dict is flattened and becomes name.first: John, name.last: Doe
* Useful for capturing properties such as 'initial_signup_date', 'initial_referrer', etc.
151
151
* @public
152
152
* @param {string} property - The user property key.
153
-
* @param {number/string/list/object} value - A value or values to set once. Values can be numbers, strings, lists, or object (key:value dict will be flattened).
153
+
* @param {number|string|list|object} value - A value or values to set once. Values can be numbers, strings, lists, or object (key:value dict will be flattened).
154
154
* @return {Identify_object} Returns the same Identify object, allowing you to chain multiple method calls together.
155
155
* @example var identify = new amplitude.Identify().setOnce('sign_up_date', '2016-04-01');
156
156
* amplitude.identify(identify); // send the Identify call
Copy file name to clipboardExpand all lines: src/identify.js
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -36,7 +36,7 @@ var Identify = function() {
36
36
* Increment a user property by a given value (can also be negative to decrement). If the user property does not have a value set yet, it will be initialized to 0 before being incremented.
37
37
* @public
38
38
* @param {string} property - The user property key.
39
-
* @param {number/string} value - The amount by which to increment the user property. Allows numbers as strings (ex: '123').
39
+
* @param {number|string} value - The amount by which to increment the user property. Allows numbers as strings (ex: '123').
40
40
* @return {Identify_object} Returns the same Identify object, allowing you to chain multiple method calls together.
41
41
* @example var identify = new amplitude.Identify().add('karma', 1).add('friends', 1);
42
42
* amplitude.identify(identify); // send the Identify call
* If the user property has an existing value and it is not a list, the existing value will be converted into a list with the new values appended.
57
57
* @public
58
58
* @param {string} property - The user property key.
59
-
* @param {number/string/list/object} value - A value or values to append. Values can be numbers, strings, lists, or object (key:value dict will be flattened).
59
+
* @param {number|string|list|object} value - A value or values to append. Values can be numbers, strings, lists, or object (key:value dict will be flattened).
60
60
* @return {Identify_object} Returns the same Identify object, allowing you to chain multiple method calls together.
61
61
* @example var identify = new amplitude.Identify().append('ab-tests', 'new-user-tests');
* If the user property has an existing value and it is not a list, the existing value will be converted into a list with the new values prepended.
92
92
* @public
93
93
* @param {string} property - The user property key.
94
-
* @param {number/string/list/object} value - A value or values to prepend. Values can be numbers, strings, lists, or object (key:value dict will be flattened).
94
+
* @param {number|string|list|object} value - A value or values to prepend. Values can be numbers, strings, lists, or object (key:value dict will be flattened).
95
95
* @return {Identify_object} Returns the same Identify object, allowing you to chain multiple method calls together.
96
96
* @example var identify = new amplitude.Identify().prepend('ab-tests', 'new-user-tests');
* Sets the value of a given user property. If a value already exists, it will be overwriten with the new value.
107
107
* @public
108
108
* @param {string} property - The user property key.
109
-
* @param {number/string/list/object} value - A value or values to set. Values can be numbers, strings, lists, or object (key:value dict will be flattened).
109
+
* @param {number|string|list|object} value - A value or values to set. Values can be numbers, strings, lists, or object (key:value dict will be flattened).
110
110
* @return {Identify_object} Returns the same Identify object, allowing you to chain multiple method calls together.
111
111
* @example var identify = new amplitude.Identify().set('user_type', 'beta');
112
112
* identify.set('name', {'first': 'John', 'last': 'Doe'}); // dict is flattened and becomes name.first: John, name.last: Doe
* Useful for capturing properties such as 'initial_signup_date', 'initial_referrer', etc.
123
123
* @public
124
124
* @param {string} property - The user property key.
125
-
* @param {number/string/list/object} value - A value or values to set once. Values can be numbers, strings, lists, or object (key:value dict will be flattened).
125
+
* @param {number|string|list|object} value - A value or values to set once. Values can be numbers, strings, lists, or object (key:value dict will be flattened).
126
126
* @return {Identify_object} Returns the same Identify object, allowing you to chain multiple method calls together.
127
127
* @example var identify = new amplitude.Identify().setOnce('sign_up_date', '2016-04-01');
128
128
* amplitude.identify(identify); // send the Identify call
0 commit comments