Skip to content

Commit 62173c4

Browse files
authored
docs: fix importing module (#5)
1 parent 63b68f0 commit 62173c4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ npm install parse-server-any-analytics-adapter --save
3131
## Server
3232

3333
```javascript
34-
import AnyAnalyticsAdapter from 'parse-server-any-analytics-adapter'
35-
import googleAnalytics from '@analytics/google-analytics'
36-
import customerIo from '@analytics/customerio'
34+
const { AnyAnalyticsAdapter } = require('parse-server-any-analytics-adapter');
35+
const { init: googleAnalytics } = require('@analytics/google-analytics');
36+
const { init: customerIo } = require('@analytics/customerio');
3737

3838
/* Initialize AnyAnalytics with with any and all 3rd party analytics of your choosing. */
39-
const anyAnalytics = AnyAnalyticsAdapter({
39+
const anyAnalytics = new AnyAnalyticsAdapter({
4040
app: 'my-app-name', /* Name of site / app */
4141
version: 100, /* Version of your app */
4242
plugins: [ /* Array of analytics plugins */
@@ -47,7 +47,7 @@ const anyAnalytics = AnyAnalyticsAdapter({
4747
siteId: '123-xyz'
4848
})
4949
]
50-
})
50+
});
5151

5252
/* Initialize parse server */
5353
const api = new ParseServer({

0 commit comments

Comments
 (0)