Skip to content

Commit 7eaea94

Browse files
committed
Querystring edits
1 parent ea72d84 commit 7eaea94

File tree

1 file changed

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

1 file changed

+6
-7
lines changed

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

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,20 @@ Here are the *optional* query parameters to use:
1515
| `ajs_prop_<property>` | A property to pass to the Track call. | This won't implicitly trigger an event and is dependent on you also passing `ajs_event`. This property is included in the resulting Track call. |
1616
| `ajs_trait_<trait>` | A trait to pass to the Identify call. | This won't implicitly trigger any call and is dependent on you also passing `ajs_uid`. This trait is included in the resulting Identify call. |
1717

18-
For example, this URL:
18+
For example, this URL would create the following events on the page:
1919

2020
```text
2121
http://segment.com/?ajs_uid=123456789abcd&ajs_event=Clicked%20Email&ajs_aid=abc123&ajs_prop_emailCampaign=First+Touch&ajs_trait_name=Karl+Jr.
2222
```
23-
24-
would create the following events on the page.
23+
Each trigger parameter is optional. You can pass up to **1 of each trigger parameter**, as shown in the following example:
2524

2625
```js
2726
analytics.identify('123456789abcd', { name: 'Karl Jr.' });
2827
analytics.track('Clicked Email', { 'emailCampaign': 'First Touch' });
2928
analytics.user().anonymousId('abc123');
3029
```
3130

32-
Each trigger parameter is optional. You can pass up to **one of each trigger parameter** as shown in the example above.
31+
3332

3433

3534
## How can I control query string processing?
@@ -47,13 +46,13 @@ You can also keep query string processing on, but enforce validation rules. For
4746
```js
4847
analytics.load('<WRITE_KEY>', {
4948
useQueryString: {
50-
// set a pattern for anonymous id
49+
// set a pattern for anonymousId
5150
aid: /([A-Z]{10})/,
52-
// set a pattern for user id
51+
// set a pattern for userId
5352
uid: /([A-Z]{6})/
5453
}
5554
})
5655
```
5756

5857
> info ""
59-
> The `useQueryString` option is **only** available when you load analytics.js through the [NPM package](https://www.npmjs.com/package/@segment/analytics-next){:target="_blank"}.
58+
> The `useQueryString` option is **only** available when you load Analytics.js through the [npm package](https://www.npmjs.com/package/@segment/analytics-next){:target="_blank"}.

0 commit comments

Comments
 (0)