Skip to content
This repository was archived by the owner on Sep 3, 2022. It is now read-only.

Commit 08a9d4f

Browse files
author
Julio Farah
authored
[Noop] Fix typo on Readme (#231)
1 parent da9d071 commit 08a9d4f

File tree

1 file changed

+18
-15
lines changed

1 file changed

+18
-15
lines changed

README.md

+18-15
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ If you use analytics.js-core as an npm module, you can use its types out of the
1818

1919
### Using types with the AJS Snippet
2020

21-
If you create a source at https://app.segment.com, Segement automatically generates a JS snippet that you can add to your website. (for more information visit our [documentation](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/quickstart/)).
21+
If you create a source at https://app.segment.com, Segment automatically generates a JS snippet that you can add to your website. (for more information visit our [documentation](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/quickstart/)).
2222

2323
To use types with the snippet, add `analytics` as part of the global module.
2424
Something like this:
@@ -34,46 +34,49 @@ declare global {
3434
```
3535

3636
## Using as a standalone `npm` package
37-
We recommend using the CDN version of `analytics.js` as it offers all the project and workspace specific settings, enabled integrations, and middleware. But if you prefer to use `analytics.js-core` as a standalone npm package using your own tooling & workflow, you can do the following:
3837

39-
1- Install the dependencies
38+
We recommend using the CDN version of `analytics.js` as it offers all the project and workspace specific settings, enabled integrations, and middleware. But if you prefer to use `analytics.js-core` as a standalone npm package using your own tooling & workflow, you can do the following:
39+
40+
1- Install the dependencies
41+
4042
```
4143
yarn add @segment/analytics.js-core
4244
yarn add @segment/analytics.js-integration-segmentio
4345
// you may need this depending on the bundler
44-
yarn add uuid@^3.4
46+
yarn add uuid@^3.4
4547
```
4648

47-
2- Import the dependencies
49+
2- Import the dependencies
50+
4851
```javascript
49-
import Analytics from "@segment/analytics.js-core/build/analytics";
50-
import SegmentIntegration from "@segment/analytics.js-integration-segmentio";
52+
import Analytics from '@segment/analytics.js-core/build/analytics';
53+
import SegmentIntegration from '@segment/analytics.js-integration-segmentio';
5154
```
5255

53-
3- Initialize Segment and add Segment's own integration
56+
3- Initialize Segment and add Segment's own integration
57+
5458
```javascript
5559
// instantiate the library
5660
const analytics = new Analytics();
5761

58-
// add Segment's own integration ( or any other device mode integration )
62+
// add Segment's own integration ( or any other device mode integration )
5963
analytics.use(SegmentIntegration);
6064

61-
// define the integration settings object.
62-
// Since we are using only Segment integration in this example, we only have
65+
// define the integration settings object.
66+
// Since we are using only Segment integration in this example, we only have
6367
// "Segment.io" in the integrationSettings object
6468
const integrationSettings = {
65-
"Segment.io": {
66-
apiKey: "<YOUR SEGMENT WRITE KEY>",
69+
'Segment.io': {
70+
apiKey: '<YOUR SEGMENT WRITE KEY>',
6771
retryQueue: true,
6872
addBundledMetadata: true
6973
}
7074
};
7175

72-
7376
// Initialize the library
7477
analytics.initialize(integrationSettings);
7578

76-
// Happy tracking!
79+
// Happy tracking!
7780
analytics.track('🚀');
7881
```
7982

0 commit comments

Comments
 (0)