Skip to content

Commit 9572198

Browse files
committed
Update docs
1 parent f91710f commit 9572198

File tree

5 files changed

+52
-28
lines changed

5 files changed

+52
-28
lines changed

docs/Mixpanel.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3872,7 +3872,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Mixpanel.
38723872
<br class="clear">
38733873

38743874
<footer>
3875-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Thu May 20 2021 13:57:45 GMT-0700 (Pacific Daylight Time)
3875+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Thu Jun 24 2021 13:41:26 GMT-0700 (Pacific Daylight Time)
38763876
</footer>
38773877

38783878
<script> prettyPrint(); </script>

docs/MixpanelGroup.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -957,7 +957,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Mixpanel.
957957
<br class="clear">
958958

959959
<footer>
960-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Thu May 20 2021 13:57:45 GMT-0700 (Pacific Daylight Time)
960+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Thu Jun 24 2021 13:41:26 GMT-0700 (Pacific Daylight Time)
961961
</footer>
962962

963963
<script> prettyPrint(); </script>

docs/People.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1625,7 +1625,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Mixpanel.
16251625
<br class="clear">
16261626

16271627
<footer>
1628-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Thu May 20 2021 13:57:45 GMT-0700 (Pacific Daylight Time)
1628+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Thu Jun 24 2021 13:41:26 GMT-0700 (Pacific Daylight Time)
16291629
</footer>
16301630

16311631
<script> prettyPrint(); </script>

docs/index.html

Lines changed: 48 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -47,43 +47,49 @@ <h3> </h3>
4747
<img src="https://github.com/mixpanel/mixpanel-android/blob/assets/mixpanel.png?raw=true" alt="Mixpanel React Native Library" height="150"/>
4848
</div>
4949
<h5></h5>
50-
<h1>Table of Contents</h1>
50+
<h2>Table of Contents</h2>
5151
<!-- MarkdownTOC -->
5252
<ul>
5353
<li><a href="#introduction">Introduction</a></li>
5454
<li><a href="#quick-start-guide">Quick Start Guide</a>
5555
<ul>
56-
<li><a href="#installation">Installation</a></li>
57-
<li><a href="#integration">Integration</a></li>
56+
<li><a href="#1-install-mixpanel">Install Mixpanel</a></li>
57+
<li><a href="#2-initialize-mixpanel">Initialize Mixpanel</a></li>
58+
<li><a href="#3-send-data">Send Data</a></li>
59+
<li><a href="#4-check-for-success">Check for Success</a></li>
5860
</ul>
5961
</li>
62+
<li><a href="#faq">FAQ</a></li>
6063
<li><a href="#i-want-to-know-more">I want to know more!</a></li>
6164
</ul>
6265
<!-- /MarkdownTOC -->
63-
<h1>Introduction</h1>
66+
<h2>Introduction</h2>
6467
<p>Welcome to the official Mixpanel React Native library.
6568
The Mixpanel React Native library is an open-source project, and we'd love to see your contributions!
66-
We'd also love for you to come and work with us! Check out <strong><a href="https://mixpanel.com/jobs/#openings">Jobs</a></strong> for details</p>
67-
<h1>Quick Start Guide</h1>
69+
We'd also love for you to come and work with us! Check out <strong><a href="https://mixpanel.com/jobs/#openings">Jobs</a></strong> for details.</p>
70+
<h2>Quick Start Guide</h2>
6871
<p>Mixpanel's React Native SDK is a wrapper around Mixpanel’s native iOS and Android SDKs and it supports offline tracking. Check out our <strong><a href="https://developer.mixpanel.com/docs/react-native">official documentation</a></strong> for more in depth information on installing and using Mixpanel on React Native.</p>
6972
<p><a name="installation"></a></p>
70-
<h2>Installation</h2>
71-
<h3>Prerequisite</h3>
73+
<h3>1. Install Mixpanel</h3>
74+
<h4>Prerequisites</h4>
7275
<ul>
7376
<li>React Native v0.6+</li>
7477
<li><a href="https://reactnative.dev/docs/environment-setup">Setup development environment for React Native</a></li>
7578
</ul>
76-
<h3>Steps</h3>
79+
<h4>Steps</h4>
7780
<ol>
78-
<li>Under your app's root directory, install Mixpanel React Native SDK
79-
<code>npm install mixpanel-react-native</code></li>
80-
<li>Under your application's ios folder, run
81-
<code>pod install</code>
82-
At this point, you are ready to use Mixpanel React Native SDK.
83-
Note: If you experience compile issues in iOS under Xcode 12.5+ and iOS 14.5+, please refer to this <strong><a href="https://github.com/mixpanel/mixpanel-react-native/issues/43#issuecomment-829599732">workaround</a></strong>.</li>
81+
<li>Under your app's root directory, install Mixpanel React Native SDK.</li>
8482
</ol>
85-
<h2>Integration</h2>
86-
<h3>Initialization</h3>
83+
<pre class="prettyprint source"><code>npm install mixpanel-react-native
84+
</code></pre>
85+
<ol start="2">
86+
<li>Under your application's ios folder, run</li>
87+
</ol>
88+
<pre class="prettyprint source"><code>pod install
89+
</code></pre>
90+
<p>Please note: You do not need to update your Podfile to add Mixpanel.
91+
3. For Xcode 12.5+, there is a known compile issue, please refer to this <strong><a href="https://github.com/mixpanel/mixpanel-react-native/issues/43#issuecomment-829599732">workaround</a></strong>.</p>
92+
<h3>2. Initialize Mixpanel</h3>
8793
<p>To start tracking with the library you must first initialize with your project token. To initialize the library, first add <code>import { Mixpanel }</code> and call <code>Mixpanel.init(token)</code> with your project token as it's argument.</p>
8894
<pre class="prettyprint source lang-js"><code>import { Mixpanel } from 'mixpanel-react-native';
8995
...
@@ -99,17 +105,35 @@ <h3>Initialization</h3>
99105
...
100106
</code></pre>
101107
<p>Once you've called this method once, you can access <code>mixpanel</code> throughout the rest of your application.</p>
102-
<h3>Tracking</h3>
103-
<p>Once you've initialized the library, Mixpanel will <a href="https://mixpanel.com/help/questions/articles/which-common-mobile-events-can-mixpanel-collect-on-my-behalf-automatically" target="_blank">automatically collect common mobile events</a>. You can enable/ disable automatic collection through your <a href="https://mixpanel.com/help/questions/articles/how-do-i-enable-common-mobile-events-if-i-have-already-implemented-mixpanel" target="_blank">project settings</a>.
104-
With the <code>mixpanel</code> object created in <a href="#integration">the last step</a> a call to <code>track</code> is all you need to send additional events to Mixpanel.</p>
108+
<h3>3. Send Data</h3>
109+
<p>Let's get started by sending event data. You can send an event from anywhere in your application. Better understand user behavior by storing details that are specific to the event (properties). After initializing the library, Mixpanel will <a href="https://mixpanel.com/help/questions/articles/which-common-mobile-events-can-mixpanel-collect-on-my-behalf-automatically">automatically collect common mobile events</a>. You can enable/disable automatic collection through your project settings. Also, Mixpanel automatically tracks some properties by default. <a href="https://help.mixpanel.com/hc/en-us/articles/115004613766-Default-Properties-Collected-by-Mixpanel">learn more</a></p>
105110
<pre class="prettyprint source lang-js"><code>// Track with event-name
106111
mixpanel.track('Sent Message');
107112
// Track with event-name and property
108113
mixpanel.track('Plan Selected', {'Plan': 'Premium'});
109114
</code></pre>
110-
<p>You're done! You've successfully integrated the Mixpanel React Native SDK into your app. To stay up to speed on important SDK releases and updates, star or watch our repository on <a href="https://github.com/mixpanel/mixpanel-react-native">Github</a>.</p>
111-
<p><a name="i-want-to-know-more"></a></p>
112-
<h1>I want to know more!</h1>
115+
<p>In addition to event data, you can also send <a href="https://developer.mixpanel.com/docs/react-native#storing-user-profiles">user profile data</a>. We recommend this after completing the quickstart guide.</p>
116+
<h3>4. Check for Success</h3>
117+
<p><a href="http://mixpanel.com/report/live">Open up Live View in Mixpanel</a> to view incoming events.
118+
Once data hits our API, it generally takes ~60 seconds for it to be processed, stored, and queryable in your project.
119+
<a name="i-want-to-know-more"></a></p>
120+
<h2>FAQ</h2>
121+
<p><strong>I want to stop tracking an event/event property in Mixpanel. Is that possible?</strong><br>
122+
Yes, in Lexicon, you can intercept and drop incoming events or properties. Mixpanel won’t store any new data for the event or property you select to drop. <a href="https://help.mixpanel.com/hc/en-us/articles/360001307806#dropping-events-and-properties">See this article for more information</a>.</p>
123+
<p><strong>I have a test user I would like to opt out of tracking. How do I do that?</strong><br>
124+
Mixpanel’s client-side tracking library contains the <a href="https://mixpanel.github.io/mixpanel-react-native/Mixpanel.html#optOutTracking">optOutTracking()</a> method, which will set the user’s local opt-out state to “true” and will prevent data from being sent from a user’s device. More detailed instructions can be found in the section, <a href="https://developer.mixpanel.com/docs/react-native#opting-users-out-of-tracking">Opting users out of tracking</a>.</p>
125+
<p><strong>Why aren't my events showing up?</strong><br>
126+
To preserve battery life and customer bandwidth, the Mixpanel library doesn't send the events you record immediately. Instead, it sends batches to the Mixpanel servers every 60 seconds while your application is running, as well as when the application transitions to the background. You can call <a href="https://mixpanel.github.io/mixpanel-react-native/Mixpanel.html#flush">flush()</a> manually if you want to force a flush at a particular moment.</p>
127+
<pre class="prettyprint source"><code>mixpanel.flush();
128+
</code></pre>
129+
<p>If your events are still not showing up after 60 seconds, check if you have opted out of tracking. You can also enable Mixpanel debugging and logging, it allows you to see the debug output from the Mixpanel library. To enable it, call <a href="https://mixpanel.github.io/mixpanel-swift/Classes/MixpanelInstance.html#/s:8Mixpanel0A8InstanceC14loggingEnabledSbvp">setLoggingEnabled</a> to true, then run your iOS project with Xcode or android project with Android Studio. The logs should be available in the console.</p>
130+
<pre class="prettyprint source"><code>mixpanel.setLoggingEnabled(true);
131+
</code></pre>
132+
<p><strong>Starting with iOS 14.5, do I need to request the user’s permission through the AppTrackingTransparency framework to use Mixpanel?</strong><br>
133+
No, Mixpanel does not use IDFA so it does not require user permission through the AppTrackingTransparency(ATT) framework.</p>
134+
<p><strong>If I use Mixpanel, how do I answer app privacy questions for the App Store?</strong><br>
135+
Please refer to our <a href="https://mixpanel.com/legal/app-store-privacy-details/">Apple App Developer Privacy Guidance</a></p>
136+
<h2>I want to know more!</h2>
113137
<p>No worries, here are some links that you will find useful:</p>
114138
<ul>
115139
<li><strong><a href="https://github.com/mixpanel/mixpanel-react-native/tree/master/MixpanelDemo">Sample app</a></strong></li>
@@ -132,7 +156,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Mixpanel.
132156
<br class="clear">
133157

134158
<footer>
135-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Thu May 20 2021 13:57:45 GMT-0700 (Pacific Daylight Time)
159+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Thu Jun 24 2021 13:41:26 GMT-0700 (Pacific Daylight Time)
136160
</footer>
137161

138162
<script> prettyPrint(); </script>

docs/index.js.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -871,7 +871,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Mixpanel.
871871
<br class="clear">
872872

873873
<footer>
874-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Thu May 20 2021 13:57:45 GMT-0700 (Pacific Daylight Time)
874+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Thu Jun 24 2021 13:41:26 GMT-0700 (Pacific Daylight Time)
875875
</footer>
876876

877877
<script> prettyPrint(); </script>

0 commit comments

Comments
 (0)