mixpanel-react-native 1.3.3 → 1.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/MixpanelReactNative.podspec +1 -1
- package/__tests__/index.test.js +1 -1
- package/android/build.gradle +1 -1
- package/docs/Mixpanel.html +1 -1
- package/docs/MixpanelGroup.html +1 -1
- package/docs/People.html +1 -1
- package/docs/index.html +1 -1
- package/docs/index.js.html +1 -1
- package/ios/Constants.swift +0 -1
- package/ios/MixpanelReactNative.swift +1 -1
- package/package.json +1 -1
- package/release.py +3 -3
- package/Samples/ContextAPIMixpanel/.buckconfig +0 -6
- package/Samples/ContextAPIMixpanel/.editorconfig +0 -3
- package/Samples/ContextAPIMixpanel/.eslintrc.js +0 -4
- package/Samples/ContextAPIMixpanel/.flowconfig +0 -66
- package/Samples/ContextAPIMixpanel/.gitattributes +0 -3
- package/Samples/ContextAPIMixpanel/.prettierrc.js +0 -7
- package/Samples/ContextAPIMixpanel/.watchmanconfig +0 -1
- package/Samples/ContextAPIMixpanel/Analytics.js +0 -18
- package/Samples/ContextAPIMixpanel/App.js +0 -17
- package/Samples/ContextAPIMixpanel/Screens/SampleScreen.js +0 -17
- package/Samples/ContextAPIMixpanel/__tests__/App-test.js +0 -14
- package/Samples/ContextAPIMixpanel/android/app/BUCK +0 -55
- package/Samples/ContextAPIMixpanel/android/app/build.gradle +0 -222
- package/Samples/ContextAPIMixpanel/android/app/build_defs.bzl +0 -19
- package/Samples/ContextAPIMixpanel/android/app/debug.keystore +0 -0
- package/Samples/ContextAPIMixpanel/android/app/proguard-rules.pro +0 -10
- package/Samples/ContextAPIMixpanel/android/app/src/debug/AndroidManifest.xml +0 -13
- package/Samples/ContextAPIMixpanel/android/app/src/debug/java/com/contextapimixpanel/ReactNativeFlipper.java +0 -72
- package/Samples/ContextAPIMixpanel/android/app/src/main/AndroidManifest.xml +0 -25
- package/Samples/ContextAPIMixpanel/android/app/src/main/java/com/contextapimixpanel/MainActivity.java +0 -15
- package/Samples/ContextAPIMixpanel/android/app/src/main/java/com/contextapimixpanel/MainApplication.java +0 -80
- package/Samples/ContextAPIMixpanel/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/Samples/ContextAPIMixpanel/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/Samples/ContextAPIMixpanel/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/Samples/ContextAPIMixpanel/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/Samples/ContextAPIMixpanel/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/Samples/ContextAPIMixpanel/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/Samples/ContextAPIMixpanel/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/Samples/ContextAPIMixpanel/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/Samples/ContextAPIMixpanel/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/Samples/ContextAPIMixpanel/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/Samples/ContextAPIMixpanel/android/app/src/main/res/values/strings.xml +0 -3
- package/Samples/ContextAPIMixpanel/android/app/src/main/res/values/styles.xml +0 -9
- package/Samples/ContextAPIMixpanel/android/build.gradle +0 -38
- package/Samples/ContextAPIMixpanel/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/Samples/ContextAPIMixpanel/android/gradle/wrapper/gradle-wrapper.properties +0 -5
- package/Samples/ContextAPIMixpanel/android/gradle.properties +0 -28
- package/Samples/ContextAPIMixpanel/android/gradlew +0 -185
- package/Samples/ContextAPIMixpanel/android/gradlew.bat +0 -89
- package/Samples/ContextAPIMixpanel/android/settings.gradle +0 -3
- package/Samples/ContextAPIMixpanel/app.json +0 -4
- package/Samples/ContextAPIMixpanel/babel.config.js +0 -3
- package/Samples/ContextAPIMixpanel/index.js +0 -9
- package/Samples/ContextAPIMixpanel/ios/ContextAPIMixpanel/AppDelegate.h +0 -8
- package/Samples/ContextAPIMixpanel/ios/ContextAPIMixpanel/AppDelegate.m +0 -62
- package/Samples/ContextAPIMixpanel/ios/ContextAPIMixpanel/Images.xcassets/AppIcon.appiconset/Contents.json +0 -38
- package/Samples/ContextAPIMixpanel/ios/ContextAPIMixpanel/Images.xcassets/Contents.json +0 -6
- package/Samples/ContextAPIMixpanel/ios/ContextAPIMixpanel/Info.plist +0 -55
- package/Samples/ContextAPIMixpanel/ios/ContextAPIMixpanel/LaunchScreen.storyboard +0 -47
- package/Samples/ContextAPIMixpanel/ios/ContextAPIMixpanel/main.m +0 -9
- package/Samples/ContextAPIMixpanel/ios/ContextAPIMixpanel-Bridging-Header.h +0 -4
- package/Samples/ContextAPIMixpanel/ios/ContextAPIMixpanel.xcodeproj/project.pbxproj +0 -694
- package/Samples/ContextAPIMixpanel/ios/ContextAPIMixpanel.xcodeproj/xcshareddata/xcschemes/ContextAPIMixpanel.xcscheme +0 -88
- package/Samples/ContextAPIMixpanel/ios/ContextAPIMixpanel.xcworkspace/contents.xcworkspacedata +0 -10
- package/Samples/ContextAPIMixpanel/ios/ContextAPIMixpanel.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/Samples/ContextAPIMixpanel/ios/ContextAPIMixpanelTests/ContextAPIMixpanelTests.m +0 -65
- package/Samples/ContextAPIMixpanel/ios/ContextAPIMixpanelTests/Info.plist +0 -24
- package/Samples/ContextAPIMixpanel/ios/File.swift +0 -8
- package/Samples/ContextAPIMixpanel/ios/Podfile +0 -29
- package/Samples/ContextAPIMixpanel/metro.config.js +0 -17
- package/Samples/ContextAPIMixpanel/package.json +0 -30
- package/Samples/ContextAPIMixpanel/yarn.lock +0 -6770
- package/Samples/MixpanelDemo/.buckconfig +0 -6
- package/Samples/MixpanelDemo/.eslintrc.js +0 -4
- package/Samples/MixpanelDemo/.flowconfig +0 -73
- package/Samples/MixpanelDemo/.gitattributes +0 -1
- package/Samples/MixpanelDemo/.prettierrc.js +0 -6
- package/Samples/MixpanelDemo/.watchmanconfig +0 -1
- package/Samples/MixpanelDemo/Analytics.js +0 -15
- package/Samples/MixpanelDemo/App.js +0 -11
- package/Samples/MixpanelDemo/Router.js +0 -35
- package/Samples/MixpanelDemo/__tests__/App-test.js +0 -3
- package/Samples/MixpanelDemo/android/app/BUCK +0 -55
- package/Samples/MixpanelDemo/android/app/build.gradle +0 -219
- package/Samples/MixpanelDemo/android/app/build_defs.bzl +0 -19
- package/Samples/MixpanelDemo/android/app/debug.keystore +0 -0
- package/Samples/MixpanelDemo/android/app/proguard-rules.pro +0 -10
- package/Samples/MixpanelDemo/android/app/src/debug/AndroidManifest.xml +0 -8
- package/Samples/MixpanelDemo/android/app/src/debug/java/com/mixpaneldemo/ReactNativeFlipper.java +0 -72
- package/Samples/MixpanelDemo/android/app/src/main/AndroidManifest.xml +0 -27
- package/Samples/MixpanelDemo/android/app/src/main/java/com/MixpanelDemo/MainActivity.java +0 -15
- package/Samples/MixpanelDemo/android/app/src/main/java/com/MixpanelDemo/MainApplication.java +0 -81
- package/Samples/MixpanelDemo/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/Samples/MixpanelDemo/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/Samples/MixpanelDemo/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/Samples/MixpanelDemo/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/Samples/MixpanelDemo/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/Samples/MixpanelDemo/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/Samples/MixpanelDemo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/Samples/MixpanelDemo/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/Samples/MixpanelDemo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/Samples/MixpanelDemo/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/Samples/MixpanelDemo/android/app/src/main/res/values/strings.xml +0 -3
- package/Samples/MixpanelDemo/android/app/src/main/res/values/styles.xml +0 -9
- package/Samples/MixpanelDemo/android/build.gradle +0 -37
- package/Samples/MixpanelDemo/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/Samples/MixpanelDemo/android/gradle/wrapper/gradle-wrapper.properties +0 -5
- package/Samples/MixpanelDemo/android/gradle.properties +0 -28
- package/Samples/MixpanelDemo/android/gradlew +0 -183
- package/Samples/MixpanelDemo/android/gradlew.bat +0 -103
- package/Samples/MixpanelDemo/android/settings.gradle +0 -5
- package/Samples/MixpanelDemo/app.json +0 -5
- package/Samples/MixpanelDemo/babel.config.js +0 -3
- package/Samples/MixpanelDemo/index.js +0 -9
- package/Samples/MixpanelDemo/ios/Empty.swift +0 -8
- package/Samples/MixpanelDemo/ios/MixpanelDemo/AppDelegate.h +0 -8
- package/Samples/MixpanelDemo/ios/MixpanelDemo/AppDelegate.m +0 -58
- package/Samples/MixpanelDemo/ios/MixpanelDemo/Images.xcassets/AppIcon.appiconset/Contents.json +0 -38
- package/Samples/MixpanelDemo/ios/MixpanelDemo/Images.xcassets/Contents.json +0 -6
- package/Samples/MixpanelDemo/ios/MixpanelDemo/Info.plist +0 -57
- package/Samples/MixpanelDemo/ios/MixpanelDemo/LaunchScreen.storyboard +0 -58
- package/Samples/MixpanelDemo/ios/MixpanelDemo/main.m +0 -9
- package/Samples/MixpanelDemo/ios/MixpanelDemo-Bridging-Header.h +0 -4
- package/Samples/MixpanelDemo/ios/MixpanelDemo-tvOS/Info.plist +0 -53
- package/Samples/MixpanelDemo/ios/MixpanelDemo-tvOSTests/Info.plist +0 -24
- package/Samples/MixpanelDemo/ios/MixpanelDemo.xcodeproj/project.pbxproj +0 -997
- package/Samples/MixpanelDemo/ios/MixpanelDemo.xcodeproj/xcshareddata/xcschemes/MixpanelDemo-tvOS.xcscheme +0 -88
- package/Samples/MixpanelDemo/ios/MixpanelDemo.xcodeproj/xcshareddata/xcschemes/MixpanelDemo.xcscheme +0 -88
- package/Samples/MixpanelDemo/ios/MixpanelDemo.xcworkspace/contents.xcworkspacedata +0 -10
- package/Samples/MixpanelDemo/ios/MixpanelDemo.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/Samples/MixpanelDemo/ios/MixpanelDemoTests/Info.plist +0 -24
- package/Samples/MixpanelDemo/ios/MixpanelDemoTests/MixpanelDemoTests.m +0 -65
- package/Samples/MixpanelDemo/ios/Podfile +0 -24
- package/Samples/MixpanelDemo/metro.config.js +0 -17
- package/Samples/MixpanelDemo/package.json +0 -40
- package/Samples/MixpanelDemo/screens/EventScreen.js +0 -156
- package/Samples/MixpanelDemo/screens/GDPRScreen.js +0 -63
- package/Samples/MixpanelDemo/screens/GroupScreen.js +0 -142
- package/Samples/MixpanelDemo/screens/Home.js +0 -54
- package/Samples/MixpanelDemo/screens/ProfileScreen.js +0 -184
- package/Samples/MixpanelDemo/yarn.lock +0 -6945
- package/Samples/README.md +0 -39
- package/Samples/SimpleMixpanel/.buckconfig +0 -6
- package/Samples/SimpleMixpanel/.editorconfig +0 -3
- package/Samples/SimpleMixpanel/.eslintrc.js +0 -4
- package/Samples/SimpleMixpanel/.flowconfig +0 -66
- package/Samples/SimpleMixpanel/.gitattributes +0 -3
- package/Samples/SimpleMixpanel/.prettierrc.js +0 -7
- package/Samples/SimpleMixpanel/.watchmanconfig +0 -1
- package/Samples/SimpleMixpanel/App.js +0 -42
- package/Samples/SimpleMixpanel/__tests__/App-test.js +0 -14
- package/Samples/SimpleMixpanel/android/app/BUCK +0 -55
- package/Samples/SimpleMixpanel/android/app/build.gradle +0 -222
- package/Samples/SimpleMixpanel/android/app/build_defs.bzl +0 -19
- package/Samples/SimpleMixpanel/android/app/debug.keystore +0 -0
- package/Samples/SimpleMixpanel/android/app/proguard-rules.pro +0 -10
- package/Samples/SimpleMixpanel/android/app/src/debug/AndroidManifest.xml +0 -13
- package/Samples/SimpleMixpanel/android/app/src/debug/java/com/simplemixpanel/ReactNativeFlipper.java +0 -72
- package/Samples/SimpleMixpanel/android/app/src/main/AndroidManifest.xml +0 -25
- package/Samples/SimpleMixpanel/android/app/src/main/java/com/simplemixpanel/MainActivity.java +0 -15
- package/Samples/SimpleMixpanel/android/app/src/main/java/com/simplemixpanel/MainApplication.java +0 -80
- package/Samples/SimpleMixpanel/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
- package/Samples/SimpleMixpanel/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
- package/Samples/SimpleMixpanel/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
- package/Samples/SimpleMixpanel/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
- package/Samples/SimpleMixpanel/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
- package/Samples/SimpleMixpanel/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
- package/Samples/SimpleMixpanel/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
- package/Samples/SimpleMixpanel/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
- package/Samples/SimpleMixpanel/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
- package/Samples/SimpleMixpanel/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
- package/Samples/SimpleMixpanel/android/app/src/main/res/values/strings.xml +0 -3
- package/Samples/SimpleMixpanel/android/app/src/main/res/values/styles.xml +0 -9
- package/Samples/SimpleMixpanel/android/build.gradle +0 -38
- package/Samples/SimpleMixpanel/android/gradle/wrapper/gradle-wrapper.jar +0 -0
- package/Samples/SimpleMixpanel/android/gradle/wrapper/gradle-wrapper.properties +0 -5
- package/Samples/SimpleMixpanel/android/gradle.properties +0 -28
- package/Samples/SimpleMixpanel/android/gradlew +0 -185
- package/Samples/SimpleMixpanel/android/gradlew.bat +0 -89
- package/Samples/SimpleMixpanel/android/settings.gradle +0 -3
- package/Samples/SimpleMixpanel/app.json +0 -4
- package/Samples/SimpleMixpanel/babel.config.js +0 -3
- package/Samples/SimpleMixpanel/index.js +0 -9
- package/Samples/SimpleMixpanel/ios/File.swift +0 -8
- package/Samples/SimpleMixpanel/ios/Podfile +0 -29
- package/Samples/SimpleMixpanel/ios/SimpleMixpanel/AppDelegate.h +0 -8
- package/Samples/SimpleMixpanel/ios/SimpleMixpanel/AppDelegate.m +0 -62
- package/Samples/SimpleMixpanel/ios/SimpleMixpanel/Images.xcassets/AppIcon.appiconset/Contents.json +0 -38
- package/Samples/SimpleMixpanel/ios/SimpleMixpanel/Images.xcassets/Contents.json +0 -6
- package/Samples/SimpleMixpanel/ios/SimpleMixpanel/Info.plist +0 -55
- package/Samples/SimpleMixpanel/ios/SimpleMixpanel/LaunchScreen.storyboard +0 -47
- package/Samples/SimpleMixpanel/ios/SimpleMixpanel/main.m +0 -9
- package/Samples/SimpleMixpanel/ios/SimpleMixpanel-Bridging-Header.h +0 -4
- package/Samples/SimpleMixpanel/ios/SimpleMixpanel.xcodeproj/project.pbxproj +0 -694
- package/Samples/SimpleMixpanel/ios/SimpleMixpanel.xcodeproj/xcshareddata/xcschemes/SimpleMixpanel.xcscheme +0 -88
- package/Samples/SimpleMixpanel/ios/SimpleMixpanel.xcworkspace/contents.xcworkspacedata +0 -10
- package/Samples/SimpleMixpanel/ios/SimpleMixpanel.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -8
- package/Samples/SimpleMixpanel/ios/SimpleMixpanelTests/Info.plist +0 -24
- package/Samples/SimpleMixpanel/ios/SimpleMixpanelTests/SimpleMixpanelTests.m +0 -65
- package/Samples/SimpleMixpanel/metro.config.js +0 -17
- package/Samples/SimpleMixpanel/package.json +0 -30
- package/Samples/SimpleMixpanel/yarn.lock +0 -6770
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {Text, TouchableOpacity, StyleSheet, View, ScrollView} from 'react-native';
|
|
3
|
-
import {MixpanelInstance} from '../Analytics';
|
|
4
|
-
|
|
5
|
-
export default class GroupScreen extends React.Component {
|
|
6
|
-
|
|
7
|
-
constructor(props) {
|
|
8
|
-
super(props);
|
|
9
|
-
this.mixpanel = MixpanelInstance;
|
|
10
|
-
this.group = this.mixpanel.getGroup("company_id", 12345);
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
setProperty = () => {
|
|
14
|
-
this.group.set("prop_key", "prop_value");
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
setPropertyOnce = () => {
|
|
18
|
-
this.group.setOnce("prop_key", "prop_value");
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
unsetProperty = () => {
|
|
22
|
-
this.group.unset("aaa");
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
removeProperty = () => {
|
|
26
|
-
this.group.remove("prop_key", "334");
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
unionProperty = () => {
|
|
30
|
-
this.group.union("prop_key", ["prop_value_a", "prop_value_b"]);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
deleteGroup = () => {
|
|
34
|
-
this.mixpanel.deleteGroup("company_id", 12345);
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
setGroup = () => {
|
|
38
|
-
this.mixpanel.setGroup("company_id", 12345);
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
addGroup = () => {
|
|
42
|
-
this.mixpanel.addGroup("company_id", 111);
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
removeGroup = () => {
|
|
46
|
-
this.mixpanel.removeGroup("company_id", 323);
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
trackWithGroups = () => {
|
|
50
|
-
this.mixpanel.trackWithGroups("tracked with groups", {"a": 1, "b": 2.3}, {"company_id": "Mixpanel"});
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
flush = () => {
|
|
54
|
-
this.mixpanel.flush();
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
render() {
|
|
58
|
-
return (
|
|
59
|
-
<ScrollView>
|
|
60
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
61
|
-
<TouchableOpacity style={styles.button} onPress={this.setProperty}>
|
|
62
|
-
<Text style={styles.buttonText}>Set One Property</Text>
|
|
63
|
-
</TouchableOpacity>
|
|
64
|
-
</View>
|
|
65
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
66
|
-
<TouchableOpacity style={styles.button} onPress={this.setPropertyOnce}>
|
|
67
|
-
<Text style={styles.buttonText}>Set Properties Once</Text>
|
|
68
|
-
</TouchableOpacity>
|
|
69
|
-
</View>
|
|
70
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
71
|
-
<TouchableOpacity style={styles.button} onPress={this.unsetProperty}>
|
|
72
|
-
<Text style={styles.buttonText}>Unset Property</Text>
|
|
73
|
-
</TouchableOpacity>
|
|
74
|
-
</View>
|
|
75
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
76
|
-
<TouchableOpacity style={styles.button} onPress={this.removeProperty}>
|
|
77
|
-
<Text style={styles.buttonText}>Remove Property</Text>
|
|
78
|
-
</TouchableOpacity>
|
|
79
|
-
</View>
|
|
80
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
81
|
-
<TouchableOpacity style={styles.button} onPress={this.unionProperty}>
|
|
82
|
-
<Text style={styles.buttonText}>Union Properties</Text>
|
|
83
|
-
</TouchableOpacity>
|
|
84
|
-
</View>
|
|
85
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
86
|
-
<TouchableOpacity style={styles.button} onPress={this.deleteGroup}>
|
|
87
|
-
<Text style={styles.buttonText}>Delete Group</Text>
|
|
88
|
-
</TouchableOpacity>
|
|
89
|
-
</View>
|
|
90
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
91
|
-
<TouchableOpacity style={styles.button} onPress={this.setGroup}>
|
|
92
|
-
<Text style={styles.buttonText}>Set Group</Text>
|
|
93
|
-
</TouchableOpacity>
|
|
94
|
-
</View>
|
|
95
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
96
|
-
<TouchableOpacity style={styles.button} onPress={this.addGroup}>
|
|
97
|
-
<Text style={styles.buttonText}>Add Group</Text>
|
|
98
|
-
</TouchableOpacity>
|
|
99
|
-
</View>
|
|
100
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
101
|
-
<TouchableOpacity style={styles.button} onPress={this.removeGroup}>
|
|
102
|
-
<Text style={styles.buttonText}>Remove Group</Text>
|
|
103
|
-
</TouchableOpacity>
|
|
104
|
-
</View>
|
|
105
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
106
|
-
<TouchableOpacity style={styles.button} onPress={this.trackWithGroups}>
|
|
107
|
-
<Text style={styles.buttonText}>Track with Groups</Text>
|
|
108
|
-
</TouchableOpacity>
|
|
109
|
-
</View>
|
|
110
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
111
|
-
<TouchableOpacity style={styles.button} onPress={this.flush}>
|
|
112
|
-
<Text style={styles.buttonText}>Flush</Text>
|
|
113
|
-
</TouchableOpacity>
|
|
114
|
-
</View>
|
|
115
|
-
</ScrollView>
|
|
116
|
-
);
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
|
-
|
|
120
|
-
const styles = StyleSheet.create({
|
|
121
|
-
button: {
|
|
122
|
-
backgroundColor: '#1E90FF',
|
|
123
|
-
width: '100%',
|
|
124
|
-
alignItems: 'center',
|
|
125
|
-
marginVertical: 10,
|
|
126
|
-
paddingVertical: 10,
|
|
127
|
-
},
|
|
128
|
-
buttonText: {
|
|
129
|
-
fontSize: 16,
|
|
130
|
-
fontWeight: '500',
|
|
131
|
-
color: '#ffffff',
|
|
132
|
-
textAlign: "center"
|
|
133
|
-
},
|
|
134
|
-
touchableOpacity: {
|
|
135
|
-
backgroundColor: '#1E90FF',
|
|
136
|
-
borderRadius: 25,
|
|
137
|
-
width: '100%',
|
|
138
|
-
alignItems: 'center',
|
|
139
|
-
marginVertical: 10,
|
|
140
|
-
paddingVertical: 10,
|
|
141
|
-
}
|
|
142
|
-
})
|
|
@@ -1,54 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {StyleSheet, SafeAreaView, View, Button, ScrollView} from 'react-native';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
const Separator = () => (
|
|
6
|
-
<View style={styles.separator} />
|
|
7
|
-
);
|
|
8
|
-
|
|
9
|
-
class HomeScreen extends React.Component {
|
|
10
|
-
/**
|
|
11
|
-
Navigate screen to Welcome page
|
|
12
|
-
*/
|
|
13
|
-
navigateEvent = () => {
|
|
14
|
-
this.props.navigation.navigate('Event');
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
navigateProfile = () => {
|
|
18
|
-
this.props.navigation.navigate('Profile');
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
navigateGDPR = () => {
|
|
22
|
-
this.props.navigation.navigate('GDPR');
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
navigateGroup = () => {
|
|
26
|
-
this.props.navigation.navigate('Group');
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
render() {
|
|
30
|
-
return (
|
|
31
|
-
<SafeAreaView>
|
|
32
|
-
<ScrollView >
|
|
33
|
-
<Separator />
|
|
34
|
-
<Button onPress={this.navigateEvent} title='Event' />
|
|
35
|
-
<Separator />
|
|
36
|
-
<Button onPress={this.navigateProfile} title='Profile' />
|
|
37
|
-
<Separator />
|
|
38
|
-
<Button onPress={this.navigateGDPR} title='GDPR' />
|
|
39
|
-
<Separator />
|
|
40
|
-
<Button onPress={this.navigateGroup} title='Group' />
|
|
41
|
-
<Separator />
|
|
42
|
-
</ScrollView>
|
|
43
|
-
</SafeAreaView>
|
|
44
|
-
);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
const styles = StyleSheet.create({
|
|
49
|
-
separator: {
|
|
50
|
-
marginVertical: 15,
|
|
51
|
-
}
|
|
52
|
-
})
|
|
53
|
-
|
|
54
|
-
export default HomeScreen;
|
|
@@ -1,184 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import {Text, TouchableOpacity, StyleSheet, View, ScrollView} from 'react-native';
|
|
3
|
-
import {MixpanelInstance} from '../Analytics';
|
|
4
|
-
|
|
5
|
-
export default class ProfileScreen extends React.Component {
|
|
6
|
-
|
|
7
|
-
constructor(props) {
|
|
8
|
-
super(props);
|
|
9
|
-
this.mixpanel = MixpanelInstance;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
createAlias = () => {
|
|
13
|
-
this.mixpanel.alias("New Alias", "testDistinctId");
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
reset = () => {
|
|
17
|
-
this.mixpanel.reset();
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
setProperty = () => {
|
|
21
|
-
this.mixpanel.getPeople().set({
|
|
22
|
-
"a": 1,
|
|
23
|
-
"b": 2.3,
|
|
24
|
-
"c": ["4", 5],
|
|
25
|
-
});
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
setOneProperty = () => {
|
|
29
|
-
this.mixpanel.getPeople().set("d", "yo");
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
setOnePropertyOnce = () => {
|
|
33
|
-
this.mixpanel.getPeople().setOnce("c", "just once");
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
unsetProperties = () => {
|
|
37
|
-
this.mixpanel.getPeople().unset("a");
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
incrementProperty = () => {
|
|
41
|
-
this.mixpanel.getPeople().increment("a", 1.2);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
removePropertyValue = () => {
|
|
45
|
-
this.mixpanel.getPeople().remove("c", 5);
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
appendProperties = () => {
|
|
49
|
-
this.mixpanel.getPeople().append("e", "Hello");
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
unionProperties = () => {
|
|
53
|
-
this.mixpanel.getPeople().union("a", ["goodbye", "hi"]);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
trackChargeWithoutProperties = () => {
|
|
57
|
-
this.mixpanel.getPeople().trackCharge(22.8);
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
trackCharge = () => {
|
|
61
|
-
this.mixpanel.getPeople().trackCharge(12.8, {"sandwich": 1});
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
clearCharges = () => {
|
|
65
|
-
this.mixpanel.getPeople().clearCharges();
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
deleteUser = () => {
|
|
69
|
-
this.mixpanel.getPeople().deleteUser();
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
Push all queued Mixpanel events and People Analytics changes to Mixpanel servers.
|
|
74
|
-
*/
|
|
75
|
-
flush = () => {
|
|
76
|
-
this.mixpanel.flush();
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
render() {
|
|
80
|
-
return (
|
|
81
|
-
<ScrollView>
|
|
82
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
83
|
-
<TouchableOpacity style={styles.button} onPress={this.createAlias}>
|
|
84
|
-
<Text style={styles.buttonText}>Create Alias</Text>
|
|
85
|
-
</TouchableOpacity>
|
|
86
|
-
</View>
|
|
87
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
88
|
-
<TouchableOpacity style={styles.button} onPress={this.reset}>
|
|
89
|
-
<Text style={styles.buttonText}>Reset</Text>
|
|
90
|
-
</TouchableOpacity>
|
|
91
|
-
</View>
|
|
92
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
93
|
-
<TouchableOpacity style={styles.button} onPress={this.setProperty}>
|
|
94
|
-
<Text style={styles.buttonText}>Set Properties</Text>
|
|
95
|
-
</TouchableOpacity>
|
|
96
|
-
</View>
|
|
97
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
98
|
-
<TouchableOpacity style={styles.button} onPress={this.setOneProperty}>
|
|
99
|
-
<Text style={styles.buttonText}>Set One Property</Text>
|
|
100
|
-
</TouchableOpacity>
|
|
101
|
-
</View>
|
|
102
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
103
|
-
<TouchableOpacity style={styles.button} onPress={this.setOnePropertyOnce}>
|
|
104
|
-
<Text style={styles.buttonText}>Set Properties Once</Text>
|
|
105
|
-
</TouchableOpacity>
|
|
106
|
-
</View>
|
|
107
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
108
|
-
<TouchableOpacity style={styles.button} onPress={this.unsetProperties}>
|
|
109
|
-
<Text style={styles.buttonText}>Unset Properties</Text>
|
|
110
|
-
</TouchableOpacity>
|
|
111
|
-
</View>
|
|
112
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
113
|
-
<TouchableOpacity style={styles.button} onPress={this.incrementProperty}>
|
|
114
|
-
<Text style={styles.buttonText}>Increment Property</Text>
|
|
115
|
-
</TouchableOpacity>
|
|
116
|
-
</View>
|
|
117
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
118
|
-
<TouchableOpacity style={styles.button} onPress={this.removePropertyValue}>
|
|
119
|
-
<Text style={styles.buttonText}>Remove Property Value</Text>
|
|
120
|
-
</TouchableOpacity>
|
|
121
|
-
</View>
|
|
122
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
123
|
-
<TouchableOpacity style={styles.button} onPress={this.appendProperties}>
|
|
124
|
-
<Text style={styles.buttonText}>Append Properties</Text>
|
|
125
|
-
</TouchableOpacity>
|
|
126
|
-
</View>
|
|
127
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
128
|
-
<TouchableOpacity style={styles.button} onPress={this.unionProperties}>
|
|
129
|
-
<Text style={styles.buttonText}>Union Properties</Text>
|
|
130
|
-
</TouchableOpacity>
|
|
131
|
-
</View>
|
|
132
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
133
|
-
<TouchableOpacity style={styles.button} onPress={this.trackChargeWithoutProperties}>
|
|
134
|
-
<Text style={styles.buttonText}>Track Charge w/o Properties</Text>
|
|
135
|
-
</TouchableOpacity>
|
|
136
|
-
</View>
|
|
137
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
138
|
-
<TouchableOpacity style={styles.button} onPress={this.trackCharge}>
|
|
139
|
-
<Text style={styles.buttonText}>Track Charge w Properties</Text>
|
|
140
|
-
</TouchableOpacity>
|
|
141
|
-
</View>
|
|
142
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
143
|
-
<TouchableOpacity style={styles.button} onPress={this.clearCharges}>
|
|
144
|
-
<Text style={styles.buttonText}>Clear Charges</Text>
|
|
145
|
-
</TouchableOpacity>
|
|
146
|
-
</View>
|
|
147
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
148
|
-
<TouchableOpacity style={styles.button} onPress={this.deleteUser}>
|
|
149
|
-
<Text style={styles.buttonText}>Delete User</Text>
|
|
150
|
-
</TouchableOpacity>
|
|
151
|
-
</View>
|
|
152
|
-
<View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
|
|
153
|
-
<TouchableOpacity style={styles.button} onPress={this.flush}>
|
|
154
|
-
<Text style={styles.buttonText}>Flush</Text>
|
|
155
|
-
</TouchableOpacity>
|
|
156
|
-
</View>
|
|
157
|
-
</ScrollView>
|
|
158
|
-
);
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
const styles = StyleSheet.create({
|
|
163
|
-
button: {
|
|
164
|
-
backgroundColor: '#1E90FF',
|
|
165
|
-
width: '100%',
|
|
166
|
-
alignItems: 'center',
|
|
167
|
-
marginVertical: 10,
|
|
168
|
-
paddingVertical: 10,
|
|
169
|
-
},
|
|
170
|
-
buttonText: {
|
|
171
|
-
fontSize: 16,
|
|
172
|
-
fontWeight: '500',
|
|
173
|
-
color: '#ffffff',
|
|
174
|
-
textAlign: "center"
|
|
175
|
-
},
|
|
176
|
-
touchableOpacity: {
|
|
177
|
-
backgroundColor: '#1E90FF',
|
|
178
|
-
borderRadius: 25,
|
|
179
|
-
width: '100%',
|
|
180
|
-
alignItems: 'center',
|
|
181
|
-
marginVertical: 10,
|
|
182
|
-
paddingVertical: 10,
|
|
183
|
-
}
|
|
184
|
-
})
|