mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Merge pull request #21471 from Manduro/mixpanel
mixpanel: 2.14 with new method
This commit is contained in:
Vendored
+16
-1
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Mixpanel 2.13
|
||||
// Type definitions for Mixpanel 2.14
|
||||
// Project: https://mixpanel.com/
|
||||
// https://github.com/mixpanel/mixpanel-js
|
||||
// Definitions by: Knut Eirik Leira Hjelle <https://github.com/hjellek>
|
||||
@@ -348,6 +348,21 @@ declare namespace Mixpanel {
|
||||
set_once(prop: string, value: any, callback?: () => void): void;
|
||||
set_once(keys: { [index: string]: any }, callback?: () => void): void;
|
||||
|
||||
/**
|
||||
* Unset properties on a user record (permanently removes the properties and their values from a profile).
|
||||
*
|
||||
* ### Usage:
|
||||
*
|
||||
* mixpanel.people.unset('gender');
|
||||
*
|
||||
* // or unset multiple properties at once
|
||||
* mixpanel.people.unset(['gender', 'Company']);
|
||||
*
|
||||
* @param prop If a string, this is the name of the property. If an array, this is a list of property names.
|
||||
* @param callback If provided, the callback will be called after the tracking event
|
||||
*/
|
||||
unset(prop: string | string[], callback?: () => void): void;
|
||||
|
||||
/**
|
||||
* Increment/decrement numeric people analytics properties.
|
||||
*
|
||||
|
||||
@@ -95,6 +95,11 @@ function mixpanel_people() {
|
||||
'Starting Plan': 'Premium'
|
||||
}, () => {});
|
||||
|
||||
mixpanel.people.unset('Company');
|
||||
mixpanel.people.unset('Company', () => {});
|
||||
mixpanel.people.unset(['Company', 'Plan']);
|
||||
mixpanel.people.unset(['Company', 'Plan'], () => {});
|
||||
|
||||
mixpanel.people.increment('page_views');
|
||||
mixpanel.people.increment('page_views', 1);
|
||||
mixpanel.people.increment('credits_left', -1);
|
||||
|
||||
Reference in New Issue
Block a user