Skip to content

Commit c27127d

Browse files
committed
FAQ cleanup
1 parent 4176a8c commit c27127d

File tree

1 file changed

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

1 file changed

+13
-12
lines changed

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

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ Analytics.js doesn't automatically collect IPv6 addresses. If IPv6 is available
99

1010
## Is there a size limit on requests?
1111

12-
Yes, the limit is 32KB per event message. Events with a payload larger than 32KB are not accepted by Analytics.js. Segment servers return a 400 response with the error message: `Exceed payload limit`.
12+
Yes, the limit is 32 KB per event message. Events with a payload larger than 32 KB are not accepted by Analytics.js. Segment servers return a 400 response with the error message: `Exceed payload limit`.
1313

1414
## If Analytics.js fails to load, are callbacks not fired?
1515

16-
In the event that Analytics.js does not load, callbacks passed into your API calls do not fire. This is as designed, because the purpose of callbacks are to provide an estimate that the event was delivered and if the library never loads, the events won't be delivered.
16+
In the event that Analytics.js does not load, callbacks passed into your API calls do not fire. This is by design, because the purpose of a callback is to provide an indication that the event was delivered. If the library never loads, the events won't be delivered.
1717

1818
## Is there an updated version of the Segment snippet?
1919
Segment released an updated version of the Analytics.js snippet, which introduces several enhancements and fixes that might improve your setup. For a full list of version updates, see the Analytics.js snippet's [Releases](https://github.com/segmentio/snippet/releases){:target="_blank”}.
2020

21-
You can find the latest version of the Segment snippet in your JavaScript source's Overview tab or in the [Quickstart: Analytics.js](/docs/connections/sources/catalog/libraries/website/javascript/quickstart/#step-2a-add-the-segment-snippet) documentation.
21+
You can find the latest version of the Segment snippet in your JavaScript source's **Overview** tab or in the [Quickstart: Analytics.js](/docs/connections/sources/catalog/libraries/website/javascript/quickstart/#step-2a-add-the-segment-snippet) documentation.
2222

2323
While there is no deadline to upgrade your snippet to the latest version, upgrading lets you use the latest improvements in the Segment library.
2424

@@ -27,16 +27,16 @@ While there is no deadline to upgrade your snippet to the latest version, upgrad
2727

2828
In May 2018, Segment began collecting client-side performance metrics in Analytics.js. This includes metrics like:
2929

30-
- When client side integrations are initialized and when they fail
31-
- When messages are sent to client side integrations and when they fail
30+
- When client-side integrations are initialized and when they fail
31+
- When messages are sent to client-side integrations and when they fail
3232

33-
Segment added these metrics to proactively identify and resolve issues with individual client-side integrations. These metrics are connected to alerts that notify Segment's on-call engineers to take action on these quickly.
33+
Segment added these metrics to proactively identify and resolve issues with individual client-side integrations. These metrics trigger alerts that notify Segment's on-call engineers to take action promptly.
3434

3535
There should be no noticeable impact to your data flow. You may notice Analytics.js make an extra network request in the network tab to carry the metrics data to Segment's servers. This extra network request is not made frequently, since the data is sampled and batched every 30 seconds.
3636

3737
## How are properties with `null` and `undefined` values treated?
3838

39-
Segment treats property values set to `null` as null values and drops events set to`undefined`.
39+
Segment treats property values set to `null` as null values and drops events set to `undefined`.
4040

4141
For example:
4242

@@ -48,6 +48,7 @@ console.log(JSON.stringify({ x: undefined, y: 6 }));
4848
// expected output: "{"y":6}"
4949
```
5050
Segment uses the [`JSON.stringify()`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify){:target="blank"} method under the hood.
51+
5152
## Can I overwrite the context fields?
5253

5354
Yes. This can be useful if some of these fields contain information you don't want to collect.
@@ -65,7 +66,7 @@ analytics.track("Receipt Viewed", {}, {
6566
```
6667
This works for any [context field](/docs/connections/spec/common/#context) that Segment automatically collects.
6768

68-
When working with Page calls, you can overwrite context fields by following the above instructions. However, because the `context.page` fields are also available in the `properties` parameter for page calls, you must also prevent the same fields in the `properties` parameter from being included in your Page call. Use the code in the following example to overwrite `url` available in context field `page.url` and properties parameter:
69+
When working with Page calls, you can overwrite context fields by following the above instructions. However, because the `context.page` fields are also available in the `properties` parameter for Page calls, you must also prevent the same fields in the `properties` parameter from being included in your Page call. Use the code in the following example to overwrite `url` available in context field `page.url` and properties parameter:
6970

7071
```js
7172
analytics.page("Receipt Page", {
@@ -79,7 +80,7 @@ analytics.page("Receipt Page", {
7980

8081
## Can I add context fields that do not already exist?
8182

82-
Yes. You can add context fields by passing them into the options object as the third argument of the event call. For example, the analytics.js library does not automatically collect location information, but you can add it to the context object. To add location information into the context object, pass it into the third argument as in the following example:
83+
Yes. You can add context fields by passing them into the options object as the third argument of the event call. For example, the Analytics.js library does not automatically collect location information, but you can add it to the context object. To add location information into the context object, pass it into the third argument as in the following example:
8384

8485
```js
8586
analytics.track("Order Completed", {}, {
@@ -97,7 +98,7 @@ Some destinations accept properties only. As a result, custom context fields you
9798

9899
## What is the impact of exposing the source's write keys?
99100

100-
Segment's library architecture requires you to expose the write key for client-side tracking to work. Other major tools, like Google Analytics, Mixpanel, Kissmetrics, Hubspot, and Marketo, also require you to expose your write key.
101+
Segment's library architecture requires you to expose the write key for client-side tracking to work. Other major tools, like Google Analytics, Mixpanel, Kissmetrics, HubSpot, and Marketo, also require you to expose your write key.
101102

102103
If you see any unusual behavior associated with your write key, generate a new key immediately. To generate a new key, navigate to **Connections > Sources** and select your source. On the **Settings** tab, go to the **API Keys** section and click **Generate New Key**.
103104

@@ -126,7 +127,7 @@ You'll also need to modify the Segment script with your `nonce` tag, which shoul
126127
127128
## How is the referrer value set?
128129

129-
The Analytics.js library sets the `context.page.referrer` value from the [`window.document.referrer` property](https://developer.mozilla.org/en-US/docs/Web/API/Document/referrer){:target="_blank"} set in the browser. If you notice unexpected referrer values reaching Segment, check how this value is being set on your website.
130+
The Analytics.js library sets the `context.page.referrer` value from the [`window.document.referrer` property](https://developer.mozilla.org/en-US/docs/Web/API/Document/referrer){:target="_blank"} set in the browser. If you notice unexpected referrer values reaching Segment, check how this value is set on your website.
130131

131132
## Are there any rate limits in place for the CDN settings endpoint?
132133

@@ -142,4 +143,4 @@ If you need this functionality, you have a couple of options:
142143
**Use a third-party API**: Alternatively, you can use third-party services like Geolocation API to convert IP addresses to geolocation data. Afterward, you can pass this information as a trait in Identify calls or as a property in Track calls to Segment. This allows you to manage geolocation data according to your specific needs, though it will likely require engineering resources.
143144

144145
## Why is my payload populating incorrectly?
145-
Payload parameters aren't populated in a guaranteed order. Your payload should still be ingested as long as all necessary parameters are included.
146+
Payload parameters aren't populated in a guaranteed order. Your payload will still be ingested as long as all necessary parameters are included.

0 commit comments

Comments
 (0)