Skip to content

Commit bcb762d

Browse files
committed
Update docs
1 parent e48ec09 commit bcb762d

File tree

5 files changed

+30
-7
lines changed

5 files changed

+30
-7
lines changed

docs/Mixpanel.html

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

45184518
<footer>
4519-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Mon Apr 15 2024 22:35:54 GMT-0700 (Pacific Daylight Time)
4519+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri May 10 2024 11:47:39 GMT-0700 (Pacific Daylight Time)
45204520
</footer>
45214521

45224522
<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 Mon Apr 15 2024 22:35:54 GMT-0700 (Pacific Daylight Time)
960+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri May 10 2024 11:47:39 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 Mon Apr 15 2024 22:35:54 GMT-0700 (Pacific Daylight Time)
1628+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri May 10 2024 11:47:39 GMT-0700 (Pacific Daylight Time)
16291629
</footer>
16301630

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

docs/index.html

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,8 +138,31 @@ <h3>Complete Code Example</h3>
138138
export default SampleApp;
139139

140140
</code></pre>
141-
<h3>Expo and React Native for Web support</h3>
142-
<p>Starting from version 3.0.0, we have introduced support for Expo, React Native for Web, and other platforms utilizing React Native that do not support iOS and Android directly. To enable this feature, initialize Mixpanel with an additional parameter, <code>useNative</code>, set to false(<code>const mixpanel = new Mixpanel( &quot;YOUR_MIXPANEL_TOKEN&quot;, trackAutomaticEvents, useNative );</code>). This will activate JavaScript mode. Please note that this functionality is currently in beta testing. For further details and installation guidelines, refer to the release notes available at Mixpanel React Native <a href="https://github.com/mixpanel/mixpanel-react-native/releases/tag/v3.0.0-beta.1">v3.0.0-beta.1</a>.</p>
141+
<h3>Expo and React Native for Web support (3.0.2 and above)</h3>
142+
<p>Starting from version 3.0.2, we have introduced support for Expo, React Native for Web, and other platforms utilizing React Native that do not support iOS and Android directly.
143+
To enable this feature,
144+
<br>Step 1:</p>
145+
<pre class="prettyprint source"><code>npm install @react-native-async-storage/async-storage
146+
</code></pre>
147+
<p>When JavaScript mode is enabled, Mixpanel utilizes <a href="https://react-native-async-storage.github.io/async-storage/">AsyncStorage</a> to persist data. If you prefer not to use it, or if AsyncStorage is unavailable in your target environment, you can import or define a different storage class. However, it must follow a subset (see: <a href="index.d.ts"><code>MixpanelAsyncStorage</code></a>) of the same interface as <a href="https://react-native-async-storage.github.io/async-storage/">AsyncStorage</a> The following example demonstrates how to use a custom storage solution:</p>
148+
<pre class="prettyprint source"><code>// Optional: if you do not want to use the default AsyncStorage
149+
const MyAsyncStorage = require(&quot;@my-org/&lt;library-path>/AsyncStorage&quot;);
150+
const trackAutomaticEvents = false;
151+
const useNative = false;
152+
const mixpanel = new Mixpanel('YOUR_TOKEN', trackAutomaticEvents, useNative, MyAsyncStorage);
153+
mixpanel.init();
154+
</code></pre>
155+
<p><br>Step 2:
156+
Initialize Mixpanel with an additional parameter, <code>useNative</code>, set to false.</p>
157+
<pre class="prettyprint source"><code>const trackAutomaticEvents = false;
158+
const useNative = false;
159+
const mixpanel = new Mixpanel(
160+
&quot;YOUR_MIXPANEL_TOKEN&quot;,
161+
trackAutomaticEvents,
162+
useNative
163+
);
164+
</code></pre>
165+
<p>This will activate JavaScript mode.</p>
143166
<p>👋 👋 Tell us about the Mixpanel developer experience! <a href="https://www.mixpanel.com/devnps">https://www.mixpanel.com/devnps</a> 👍 👎</p>
144167
<h2>FAQ</h2>
145168
<p><strong>I want to stop tracking an event/event property in Mixpanel. Is that possible?</strong><br>
@@ -180,7 +203,7 @@ <h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Mixpanel.
180203
<br class="clear">
181204

182205
<footer>
183-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Mon Apr 15 2024 22:35:54 GMT-0700 (Pacific Daylight Time)
206+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri May 10 2024 11:47:39 GMT-0700 (Pacific Daylight Time)
184207
</footer>
185208

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

docs/index.js.html

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

10501050
<footer>
1051-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Mon Apr 15 2024 22:35:54 GMT-0700 (Pacific Daylight Time)
1051+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Fri May 10 2024 11:47:39 GMT-0700 (Pacific Daylight Time)
10521052
</footer>
10531053

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

0 commit comments

Comments
 (0)