Skip to content

Commit ae9e64c

Browse files
authored
Merge pull request #2891 from segmentio/2856-bug-duplicated-properties-and-descriptions-for-trackform
Update Analytics.js trackForm Table #2856
2 parents 35439ab + 24bade8 commit ae9e64c

File tree

1 file changed

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

1 file changed

+12
-12
lines changed

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

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Analytics.js 2.0, the latest version of Segment's JavaScript source, enables you
1212

1313
> info ""
1414
> Analytics.js 2.0 is available as an [open-source project](https://github.com/segmentio/analytics-next/){:target="_blank"}.
15-
> <br><br> All sources created on April 5, 2022 and after default to use Analytics.js 2.0.
15+
> <br><br> All sources created on April 5, 2022 and after default to use Analytics.js 2.0.
1616
1717

1818
## Benefits of Analytics.js 2.0
@@ -43,7 +43,7 @@ Use the [Analytics.js QuickStart Guide](/docs/connections/sources/catalog/librar
4343

4444
For information about upgrading to Analytics.js 2.0, see [Upgrade to Analytics.js 2.0](/docs/connections/sources/catalog/libraries/website/javascript/upgrade-to-ajs2).
4545

46-
### Upgrade your existing Javascript sources
46+
### Upgrade your existing JavaScript sources
4747

4848
For information about upgrading your existing JavaScript sources, see [Upgrade to Analytics.js 2.0](/docs/connections/sources/catalog/libraries/website/javascript/upgrade-to-ajs2).
4949

@@ -185,10 +185,10 @@ analytics.trackForm(form, event, [properties])
185185
Field | | Type | Description
186186
----- | | ---- | -----------
187187
`form(s)` | | Element or Array | The form element to track or an array of form elements or jQuery objects. _Note: trackForm takes an element, not a CSS selector._
188-
`event` | | Element or Array | The form element to track or an array of form elements or jQuery objects. _Note: trackForm takes an element, not a CSS selector._
189-
`form(s)` | | Element or Array | The form element to track or an array of form elements or jQuery objects. _Note: trackForm takes an element, not a CSS selector._
188+
`event` | | String or Function | The name of the event, passed to the `track` method. Or a **function** that returns a string to use as the name of the `track` event.
190189
`properties` | optional | Object or Function | A dictionary of properties to pass with the track method. Or a **function** that returns an object to use as the `properties` of the event.
191190

191+
192192
Example:
193193

194194
```js
@@ -302,7 +302,7 @@ Find more details about `group`, including the `group` payload, in [the Group Sp
302302

303303
The Alias method combines two unassociated user identities. Segment usually handles aliasing automatically when you call `identify` on a user, however some tools require an explicit `alias` call.
304304

305-
This is an advanced method, but it is required to manage user identities successfully in *some* of our destinations such as [Kissmetrics](/docs/connections/destinations/catalog/kissmetrics/#alias) and [Mixpanel](/docs/connections/destinations/catalog/mixpanel/#alias). <!-- TODO: LR Dests question: is this still true? Is there a list of the ones that require this?-->
305+
This is an advanced method, but it is required to manage user identities successfully in *some* Segment destinations like [Kissmetrics](/docs/connections/destinations/catalog/kissmetrics/#alias) and [Mixpanel](/docs/connections/destinations/catalog/mixpanel/#alias). <!-- TODO: LR Dests question: is this still true? Is there a list of the ones that require this?-->
306306

307307
The Alias method follows the format below:
308308

@@ -319,7 +319,7 @@ Field | | Type | Description
319319
`options` | optional | Object | A dictionary of options. For example, [enable or disable specific destinations](#managing-data-flow-with-the-integrations-object) for the call.
320320
`callback` | optional | Function | A function that is executed after a short timeout, giving the browser time to make outbound requests first.
321321

322-
For more details about Alias, including the **`alias` call payload**, check out our [Spec](/docs/connections/spec/alias/).
322+
For more details about Alias, including the **`alias` call payload**, check out the [Segment Spec](/docs/connections/spec/alias/).
323323

324324

325325
## Utility Methods
@@ -418,7 +418,7 @@ analytics.timeout(500);
418418
```
419419

420420
> success "Tip"
421-
> If you're triggering ad network conversion pixels, we recommend extending timeout to 500ms to account for slow load times.
421+
> If you're triggering ad network conversion pixels, Segment recommends extending timeout to 500ms to account for slow load times.
422422
423423

424424
### Reset or Logout
@@ -478,7 +478,7 @@ You don't need to include `'All': true` in this call because it is implied as th
478478
Destination flags are **case sensitive** and match [the destination's name in the docs](/docs/connections/destinations/) (for example, "AdLearn Open Platform", "awe.sm", "Mailchimp", etc). If a Destination has more than one acceptable name, this appears in the documentation for that destination.
479479

480480
> success "Tip"
481-
> Business tier customers can filter Track calls from the Source Schema page in the Segment UI. We recommend that you use the UI to simplify filter management and make updates without changing your site's code.
481+
> Business tier customers can filter Track calls from the Source Schema page in the Segment UI. Segment recommends that you use the UI to simplify filter management and make updates without changing your site's code.
482482
483483

484484
### Load Options
@@ -553,7 +553,7 @@ analytics.load("<write_key>", {
553553
You can check to see if batching works by checking your source's debugger in **Sources > Debugger**. When you select an event and view the **Raw** code, the `receivedAt` time of all the events in the batch should be the same.
554554

555555
#### Batch size
556-
The batch size is the threshold that forces all batched events to be sent once it's reached. For example, `size: 10` means that after triggering 10 events, Analytics.js sends those 10 events together as a batch to Segment.
556+
The batch size is the threshold that forces all batched events to be sent once it's reached. For example, `size: 10` means that after triggering 10 events, Analytics.js sends those 10 events together as a batch to Segment.
557557

558558
Your total batched events can't exceed the maximum payload size of 500 KB, with a limit of 32 KB for each event in the batch. If the 500 KB limit is reached, the batch will be split.
559559

@@ -677,7 +677,7 @@ const identityStitching = () => {
677677
return identity
678678
}
679679

680-
// Registers our new plugin into Analytics.js
680+
// Registers Segment's new plugin into Analytics.js
681681
await window.analytics.register(identityStitching())
682682
```
683683

@@ -707,7 +707,7 @@ window.analytics.ready(() => {
707707
})
708708
```
709709

710-
You can view Segment's [existing plugins](https://github.com/segmentio/analytics-next/tree/master/src/plugins){:target="_blank"} to see more examples.
710+
You can view Segment's [existing plugins](https://github.com/segmentio/analytics-next/tree/master/src/plugins){:target="_blank"} to see more examples.
711711

712712
### Register a plugin
713713
Registering plugins enable you to modify your analytics implementation to best fit your needs. You can register a plugin using this:
@@ -727,7 +727,7 @@ Segment offers video player 'plugins' so you can quickly collect video events us
727727

728728
## Cross-Subdomain Analytics
729729

730-
Analytics.js tracks across subdomains out of the box; all of our destinations fully support this feature.
730+
Analytics.js tracks across subdomains out of the box; all Segment destinations fully support this feature.
731731

732732

733733
## Analytics.js Performance

0 commit comments

Comments
 (0)