Skip to content

Commit 4afdc85

Browse files
Merge branch 'master' into patch-1
2 parents 1b8fc65 + 57a3f35 commit 4afdc85

File tree

21 files changed

+284
-233
lines changed

21 files changed

+284
-233
lines changed

CHANGELOG.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,24 @@
11
#
22

3+
## [v2.0.1](https://github.com/mixpanel/mixpanel-react-native/tree/v2.0.1) (2022-09-12)
4+
5+
### Fixes
6+
7+
- update typescript and iOS bridging header [\#158](https://github.com/mixpanel/mixpanel-react-native/pull/158)
8+
9+
#
10+
11+
## [v2.0.0](https://github.com/mixpanel/mixpanel-react-native/tree/v2.0.0) (2022-09-09)
12+
13+
### BREAKING CHANGE:
14+
This major release removes all remaining calls to Mixpanel's `/decide` API endpoint. The main effect of this is that the SDK no longer fetches the remote status of your [project's "Automatically collect common mobile events" setting](https://help.mixpanel.com/hc/en-us/articles/115004596186#enable-or-disable-common-mobile-events). From this version forward, automatic event tracking can only be controlled by the, now required, parameter `trackAutomaticEvents`. Upon upgrading, existing implementations will need to add this parameter to their Mixpanel initializer calls.
15+
16+
### Enhancements
17+
18+
- make trackAutomaticEvents required and bump versions to deprecate Decide [\#153](https://github.com/mixpanel/mixpanel-react-native/pull/153)
19+
20+
#
21+
322
## [v1.5.0](https://github.com/mixpanel/mixpanel-react-native/tree/v1.5.0) (2022-06-24)
423

524
### Enhancements
@@ -216,5 +235,9 @@ Report issues or give us any feedback is appreciated!
216235

217236

218237

238+
239+
240+
241+
219242

220243

LICENSE renamed to LICENSE.md

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,9 @@
11
Copyright 2022 Mixpanel, Inc.
22

3-
Licensed under the Apache License, Version 2.0 (the "License");
4-
you may not use this work except in compliance with the License.
5-
You may obtain a copy of the License below, or at:
6-
7-
http://www.apache.org/licenses/LICENSE-2.0
8-
9-
Unless required by applicable law or agreed to in writing, software
10-
distributed under the License is distributed on an "AS IS" BASIS,
11-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12-
See the License for the specific language governing permissions and
13-
limitations under the License.
143

154
Apache License
165
Version 2.0, January 2004
17-
http://www.apache.org/licenses/
6+
https://www.apache.org/licenses/
187

198
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
209

MixpanelReactNative.podspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,5 +19,5 @@ Pod::Spec.new do |s|
1919
s.pod_target_xcconfig = { 'DEFINES_MODULE' => 'YES' }
2020

2121
s.dependency "React-Core"
22-
s.dependency "Mixpanel-swift", '3.3.0'
22+
s.dependency "Mixpanel-swift", '4.0.1'
2323
end

README.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ To start tracking with the library you must first initialize with your project t
5555
```js
5656
import { Mixpanel } from 'mixpanel-react-native';
5757

58-
const mixpanel = new Mixpanel("Your Project Token");
58+
const trackAutomaticEvents = true;
59+
const mixpanel = new Mixpanel("Your Project Token", trackAutomaticEvents);
5960
mixpanel.init();
6061

6162
```
@@ -70,7 +71,7 @@ mixpanel.track('Plan Selected', {'Plan': 'Premium'});
7071
```
7172
In addition to event data, you can also send [user profile data](https://developer.mixpanel.com/docs/react-native#storing-user-profiles). We recommend this after completing the quickstart guide.
7273
### 4. Check for Success
73-
[Open up Live View in Mixpanel](http://mixpanel.com/report/live) to view incoming events.
74+
[Open up Events in Mixpanel](http://mixpanel.com/report/events) to view incoming events.
7475
Once data hits our API, it generally takes ~60 seconds for it to be processed, stored, and queryable in your project.
7576
<a name="i-want-to-know-more"></a>
7677

@@ -81,7 +82,8 @@ import React from 'react';
8182
import { Button, SafeAreaView } from "react-native";
8283
import { Mixpanel } from 'mixpanel-react-native';
8384

84-
const mixpanel = new Mixpanel("Your Project Token");
85+
const trackAutomaticEvents = true;
86+
const mixpanel = new Mixpanel("Your Project Token", trackAutomaticEvents);
8587
mixpanel.init();
8688

8789
const SampleApp = () => {
@@ -99,6 +101,7 @@ export default SampleApp;
99101

100102
```
101103

104+
👋 👋 Tell us about the Mixpanel developer experience! [https://www.mixpanel.com/devnps](https://www.mixpanel.com/devnps) 👍 👎
102105

103106

104107
## FAQ

Samples/ContextAPIMixpanel/Analytics.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ export const MixpanelProvider = ({children}) => {
99
const [mixpanel, setMixpanel] = React.useState(null);
1010

1111
React.useEffect(() => {
12-
const mixpanelInstance = new Mixpanel(`Your Project Token`);
12+
const trackAutomaticEvents = true;
13+
const mixpanelInstance = new Mixpanel(`Your Project Token`, trackAutomaticEvents);
1314
mixpanelInstance.init();
1415
setMixpanel(mixpanelInstance);
1516
}, []);

Samples/MixpanelDemo/Analytics.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import {Mixpanel} from 'mixpanel-react-native';
2-
import {token as MixpanelToken} from './app.json';
2+
import {token as MixpanelToken, trackAutomaticEvents} from './app.json';
33

44

55
export class MixpanelManager {
66
static sharedInstance = MixpanelManager.sharedInstance || new MixpanelManager();
77

88
constructor() {
9-
this.mixpanel = new Mixpanel(MixpanelToken);
9+
this.mixpanel = new Mixpanel(MixpanelToken, trackAutomaticEvents);
1010
this.mixpanel.init();
1111
this.mixpanel.setLoggingEnabled(true);
1212
}

Samples/MixpanelDemo/app.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"name": "MixpanelDemo",
33
"displayName": "MixpanelDemo",
4-
"token": "YOUR_PROJECT_TOKEN"
4+
"token": "YOUR_PROJECT_TOKEN",
5+
"trackAutomaticEvents": true
56
}

Samples/SimpleMixpanel/App.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,8 @@ import React, { Component } from 'react';
22
import { Button, SafeAreaView } from "react-native";
33
import { Mixpanel } from 'mixpanel-react-native';
44

5-
const mixpanel = new Mixpanel("Your Project Token");
5+
const trackAutomaticEvents = true;
6+
const mixpanel = new Mixpanel("Your Project Token", trackAutomaticEvents);
67
mixpanel.init();
78

89
// *************************************

0 commit comments

Comments
 (0)