Skip to content

Commit 65aa96f

Browse files
stayseesongmarkzegarelli
andauthored
Apply suggestions from code review
Co-authored-by: markzegarelli <[email protected]>
1 parent 79da9d5 commit 65aa96f

File tree

1 file changed

+5
-5
lines changed
  • src/connections/sources/catalog/libraries/website/javascript

1 file changed

+5
-5
lines changed

src/connections/sources/catalog/libraries/website/javascript/index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -722,12 +722,12 @@ No, there is no change in behavior to Middlewares.
722722
No, there is no impact to how events filter.
723723

724724
## Plugin Architecture
725-
When developing against Analytics 2.0, the plugins you write can augment functionality, enrich data, and control the flow and delivery of events. From modifying event payloads to changing analytics functionality, plugins help to speed up the process of getting things done.
725+
When you develop against Analytics 2.0, the plugins you write can augment functionality, enrich data, and control the flow and delivery of events. From modifying event payloads to changing analytics functionality, plugins help to speed up the process of getting things done.
726726

727727
### Plugin Categories
728728
Plugins are bound by Analytics 2.0 which handles operations such as observability, retries, and error handling. There are two different categories of plugins:
729729
* **Critical Plugins**: Analytics.js expects this plugin to be loaded before starting event delivery. Failure to load a critical plugin halts event delivery. Use this category sparingly, and only for plugins that are critical to your tracking.
730-
* **Non-critical Plugins**: Analytics.js can start event delivery before this plugin finishes loading. This means your plugin can fail to load independently from all other plugins. For example, every Analytics.js destination is a non-critical plugin. This makes it possible for Analytics.js to continue working in case a partner destination fails to load, or in case users have ad blockers turned on that are targeting specific destinations.
730+
* **Non-critical Plugins**: Analytics.js can start event delivery before this plugin finishes loading. This means your plugin can fail to load independently from all other plugins. For example, every Analytics.js destination is a non-critical plugin. This makes it possible for Analytics.js to continue working if a partner destination fails to load, or if users have ad blockers turned on that are targeting specific destinations.
731731

732732
> info ""
733733
> Non-critical plugins are only non-critical from a loading standpoint. A crash in a before plugin can still halt the event delivery pipeline.
@@ -743,7 +743,7 @@ Type | Details
743743
`utility` | Executes only with manual calls such as Logging. <br><br>These are plugins that change the Analytics 2.0 functionality. Utility plugins run outside of the event pipeline, and only execute once.
744744

745745
### Example Plugins
746-
Here's an example of a plugin that converts all track event names to lowercase before the event gets sent through the rest of the pipeline:
746+
Here's an example of a plugin that converts all track event names to lowercase before the event goes through the rest of the pipeline:
747747

748748
```js
749749
export const lowercase: Plugin = {
@@ -765,7 +765,7 @@ const identityStitching = () => {
765765

766766
const identity = {
767767
// Identifies your plugin in the Plugins stack.
768-
// You can see the full list by accessing: `window.analytics.queue.plugins`
768+
// Access `window.analytics.queue.plugins` to see the full list of plugins
769769
name: 'Identity Stitching',
770770
// Defines where in the event timeline a plugin should run
771771
type: 'enrichment',
@@ -812,7 +812,7 @@ await window.analytics.register(identityStitching())
812812

813813
You can view Segment's [existing plugins](https://github.com/segmentio/analytics-next/tree/master/src/plugins) to see more examples.
814814

815-
### Registering a plugin
815+
### Register a plugin
816816
Registering plugins enable you to modify your analytics implementation to best fit your needs. You can register a plugin using this:
817817

818818
```js

0 commit comments

Comments
 (0)