flowgrid-sdk 1.2.0 → 1.2.1
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/README.md
CHANGED
|
@@ -29,11 +29,11 @@ npm install flowgrid-sdk
|
|
|
29
29
|
Drop this into any HTML page — works on WordPress, Wix, Bubble, Squarespace, Webflow, etc.
|
|
30
30
|
|
|
31
31
|
```html
|
|
32
|
-
<script src="https://cdn.
|
|
32
|
+
<script src="https://cdn.flow-grid.xyz/flowgrid.min.js"></script>
|
|
33
33
|
<script>
|
|
34
34
|
FlowGrid.init({
|
|
35
35
|
webId: 'web_abc123',
|
|
36
|
-
endpoint: 'https://api.
|
|
36
|
+
endpoint: 'https://api.flow-grid.xyz',
|
|
37
37
|
apiKey: 'key_xxx',
|
|
38
38
|
});
|
|
39
39
|
</script>
|
|
@@ -55,7 +55,7 @@ import {
|
|
|
55
55
|
Experiment,
|
|
56
56
|
} from 'flowgrid-sdk';
|
|
57
57
|
|
|
58
|
-
const events = new Events('web_123', 'https://api.
|
|
58
|
+
const events = new Events('web_123', 'https://api.flow-grid.xyz', 'key_xxx');
|
|
59
59
|
await events.track({ eventName: 'signup', properties: { plan: 'pro' } });
|
|
60
60
|
```
|
|
61
61
|
|
|
@@ -69,7 +69,7 @@ const consent = new ConsentManager();
|
|
|
69
69
|
|
|
70
70
|
function App() {
|
|
71
71
|
return (
|
|
72
|
-
<FlowGridProvider webId="web_123" endpoint="https://api.
|
|
72
|
+
<FlowGridProvider webId="web_123" endpoint="https://api.flow-grid.xyz" apiKey="key_xxx">
|
|
73
73
|
<MyApp />
|
|
74
74
|
<CookieBanner consent={consent} config={{ title: 'We use cookies' }} />
|
|
75
75
|
</FlowGridProvider>
|
|
@@ -111,7 +111,7 @@ const consent = new ConsentManager();
|
|
|
111
111
|
|
|
112
112
|
export default function RootLayout({ children }) {
|
|
113
113
|
return (
|
|
114
|
-
<FlowGridProvider webId="web_123" endpoint="https://api.
|
|
114
|
+
<FlowGridProvider webId="web_123" endpoint="https://api.flow-grid.xyz" apiKey="key_xxx">
|
|
115
115
|
<PageViewTracker />
|
|
116
116
|
{children}
|
|
117
117
|
<CookieBanner consent={consent} />
|
|
@@ -237,8 +237,8 @@ Add to your theme's `functions.php` or use a custom HTML block:
|
|
|
237
237
|
|
|
238
238
|
```php
|
|
239
239
|
function flowgrid_tracking() {
|
|
240
|
-
echo '<script src="https://cdn.
|
|
241
|
-
echo '<script>FlowGrid.init({ webId: "web_123", endpoint: "https://api.
|
|
240
|
+
echo '<script src="https://cdn.flow-grid.xyz/flowgrid.min.js"></script>';
|
|
241
|
+
echo '<script>FlowGrid.init({ webId: "web_123", endpoint: "https://api.flow-grid.xyz", apiKey: "key_xxx" });</script>';
|
|
242
242
|
}
|
|
243
243
|
add_action('wp_footer', 'flowgrid_tracking');
|
|
244
244
|
```
|