Skip to content

Commit 0e19dfe

Browse files
author
markzegarelli
authored
Merge pull request #1085 from segmentio/link-checker
Link checker
2 parents 85122a5 + 34a6cab commit 0e19dfe

File tree

34 files changed

+2756
-154
lines changed

34 files changed

+2756
-154
lines changed

devguide.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,3 +143,5 @@ There is as also some manual testing scripts that can be run to validate the bui
143143
3. `tests/imageSizes/getImageSizes.js`: used to get the 10 largest images in the repo.
144144

145145
4. `npx mdspell 'src/**/*.md' -r --en-us`: used to validate spelling in docs, needs to be configured to add Segment terms.
146+
147+
5. Included is the [Hyperlink](https://www.npmjs.com/package/hyperlink) NPM module. Run `bundle install` to install that, plus the tap-spot plugin for pretty output. To check all links on the site, prior to build, run `yarn run hyperlink ./_site/index.html --canonicalroot https://segment.com/docs -i -r --skip 0.0.0.0 | yarn run tap-spot`. This module checks hyper links, images, and anchor tags to ensure that everything linked internally resolves to a location. **TODO**: Add support for external links.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
"ajv": "6.10.2",
4040
"clipboard": "^2.0.6",
4141
"dotenv": "8.2.0",
42+
"hyperlink": "^4.5.2",
43+
"tap-spot": "^1.1.1",
4244
"tippy.js": "^5.2.0",
4345
"typewriter": "7.0.1"
4446
}

src/_data/glossary.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ AWS: |
1717
Amazon Web Services, a large cloud service provider.
1818
1919
Catalog: |
20-
Segment's list of available sources, destinations, and warehouses. You can access the catalog from the [Segment website](https://segment.com/catalog/), and from inside the Segment app.
20+
Segment's list of available sources, destinations, and warehouses. You can access the catalog from the [Segment website](/catalog/), and from inside the Segment app.
2121
2222
CDN: |
2323
Content Delivery Network. CDNs are a network of servers which make downloading files faster for the user, by placing them all around the world to reduce data transit time. When you have servers in a CDN, they're much closer on average to the end user. If someone is using Segment in Asia, they don't have to download our files all the way from California, they can get them from a server much closer to them in the network.
@@ -51,7 +51,7 @@ Destination: |
5151
A destination is a target for Segment to forward data to, and represents a tool or storage destination.
5252
5353
Device mode: |
54-
*Device mode*, (or [client-side](#client-side)) libraries are loaded on the on the user's client (for example their web browser, or mobile device), which means they can collect contextual data about the user. The three main libraries that are considered "device mode" are [Analytics.js](https://segment.com/docs/connections/sources/catalog/libraries/javascript/), which is used on websites, our [iOS SDK](https://segment.com/docs/connections/sources/catalog/libraries/ios/), and our [Android SDK](https://segment.com/docs/connections/sources/catalog/libraries/android/). Device mode libraries can maintain a cache of information about each user on the device so we know that device belongs to a consistent `anonymousId` or `userId`, and has a consistent list of traits like name, email, etc.
54+
*Device mode*, (or [client-side](#client-side)) libraries are loaded on the on the user's client (for example their web browser, or mobile device), which means they can collect contextual data about the user. The three main libraries that are considered "device mode" are [Analytics.js](/docs/connections/sources/catalog/libraries/javascript/), which is used on websites, our [iOS SDK](/docs/connections/sources/catalog/libraries/ios/), and our [Android SDK](/docs/connections/sources/catalog/libraries/android/). Device mode libraries can maintain a cache of information about each user on the device so we know that device belongs to a consistent `anonymousId` or `userId`, and has a consistent list of traits like name, email, etc.
5555
5656
5757
DMP: |
@@ -75,7 +75,7 @@ JSON: |
7575
Library: |
7676
A library is a reusable piece of code which acts as a building block for higher level pieces of code. It's the software equivalent of a 'tool'. For instance, take Instagram filters. In the good old days, to take a picture with an interesting filter, you had to adjust the aperture length, the focal length, the exposure and film speed to get the desired effect. But now, you can just use Instagram, and press a button to get the pre-tuned filter that you want. They've packaged those effects in software and made them re-usable.
7777
78-
The most common use case for this term at Segment is in reference to the libraries people use to send data to our API. [A full list of libraries can be found in our docs](https://segment.com/docs/sources/catalog/). Libraries can collect either in "[Device mode](#device-mode)" or "[Cloud mode](#cloud-mode)".
78+
The most common use case for this term at Segment is in reference to the libraries people use to send data to our API. [A full list of libraries can be found in our docs](/docs/sources/catalog/). Libraries can collect either in "[Device mode](#device-mode)" or "[Cloud mode](#cloud-mode)".
7979
8080
Lookback: |
8181
A “lookback window” limits the period of time in which data is considered when calculating a trait or audience. For example, you might set a lookback window of 7 days on an audience or trait like `new_users_7_days`, but you would not add a lookback window to a trait that isn’t time-bounded, such as `lifetime_value`.
@@ -84,7 +84,7 @@ Method: |
8484
A method is programming speak for "an action an object can take". It's a specific type of function that is attached to an object. All of our analytics tracking libraries create `analytics` objects, and then `track`, `identify`, `page`, [etc](/docs/connections/spec/) are methods you can invoke on those objects.
8585
8686
MTU: |
87-
Monthly Tracked Users. You can find more about how they are calculated [here](https://segment.com/docs/guides/usage-and-billing/mtus-and-throughput/#how-does-segment-calculate-mtus) but in short, they are calculated by adding the number unique userIds and number of unique anonymousIds that a customer tracks with Segment.
87+
Monthly Tracked Users. You can find more about how they are calculated [here](/docs/guides/usage-and-billing/mtus-and-throughput/#how-does-segment-calculate-mtus) but in short, they are calculated by adding the number unique userIds and number of unique anonymousIds that a customer tracks with Segment.
8888
8989
Object: |
9090
An object is a type of data that persists over time and can be updated, for example a Business or a User record. Objects have "traits" which record information about that object, and which can change over time. For example a "user" object could have a trait of "email" which doesn't change often, but could also have a [computed trait](#computed-trait) like `logged_in_last_7_days`. (Objects are in contrast to "[events](#event)" which happen at a single moment in time, and whose properties do not change.)
@@ -113,7 +113,7 @@ Schema: |
113113
In Segment, you can send data to a Warehouse which has a schema based on the types of data you collect and route through Segment, and which updates as the data you collect changes.
114114
115115
Server Side: |
116-
Refers to a group of libraries that can send data to Segment, in [Cloud mode](#cloud-mode), meaning through the Segment cloud. "Server side" can could refer to people sending data directly to [our HTTP API](https://segment.com/docs/connections/sources/catalog/libraries/http/) without using a "library". Usually used in contrast to [Client Side](#client-side).
116+
Refers to a group of libraries that can send data to Segment, in [Cloud mode](#cloud-mode), meaning through the Segment cloud. "Server side" can could refer to people sending data directly to [our HTTP API](/docs/connections/sources/catalog/libraries/http/) without using a "library". Usually used in contrast to [Client Side](#client-side).
117117
118118
119119
SDK: |

src/connections/destinations/catalog/adobe-analytics/settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ This page explains in detail how to configure your Segment Adobe Analytics Desti
88
Segment uses a user-action data model, which uses different types of calls to track a user's different activities on a website or app. Adobe Analytics uses page views as the basic unit of activity, and specific data variables such as "props", eVars, lVars, and hVars to add details that allow more granular analysis. The Adobe Analytics destination settings in the Segment App allow you to create mappings between properties in your Segment calls and Adobe's expected format.
99

1010
> success ""
11-
> **Tip**: Mobile implementations use the `ADBMobileConfig.json` file to store the settings that you would otherwise enter in the Adobe Analytics destination settings in the Segment app. This file includes the Report Suite ID, Timestamp Option, Tracking Server Secure URL, Tracking Server URL, and Use Secure URL for Server-side settings. See the [Segment Adobe Analytics Mobile documentation](/mobile) to learn more.
11+
> **Tip**: Mobile implementations use the `ADBMobileConfig.json` file to store the settings that you would otherwise enter in the Adobe Analytics destination settings in the Segment app. This file includes the Report Suite ID, Timestamp Option, Tracking Server Secure URL, Tracking Server URL, and Use Secure URL for Server-side settings. See the [Segment Adobe Analytics Mobile documentation](/docs/connections/destinations/catalog/adobe-analytics/mobile) to learn more.
1212
1313
## Implementing Success Events
1414

src/connections/destinations/catalog/appcues/index.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ For example, using the server-side destination, customer profile and event data
2727

2828
## Page
2929

30-
If you're not familiar with the Segment Specs, take a look to understand what the [Page method](https://segment.com/docs/connections/spec/page/) does. An example call would look like:
30+
If you're not familiar with the Segment Specs, take a look to understand what the [Page method](/docs/connections/spec/page/) does. An example call would look like:
3131

3232
```javascript
3333
analytics.page();
@@ -37,7 +37,7 @@ Appcues will check to see if a user qualifies for an experience every time the p
3737

3838
## Identify
3939

40-
If you're not familiar with the Segment Specs, take a look to understand what the [Identify method](https://segment.com/docs/connections/spec/identify/) does. An example call would look like:
40+
If you're not familiar with the Segment Specs, take a look to understand what the [Identify method](/docs/connections/spec/identify/) does. An example call would look like:
4141

4242
```javascript
4343
analytics.identify('12091906-01011992', {
@@ -55,7 +55,7 @@ To get the most out of Appcues, you should send as much user data as possible in
5555

5656
## Track
5757

58-
If you're not familiar with the Segment Specs, take a look to understand what the [Track method](https://segment.com/docs/connections/spec/track/) does. An example call would look like:
58+
If you're not familiar with the Segment Specs, take a look to understand what the [Track method](/docs/connections/spec/track/) does. An example call would look like:
5959

6060
```javascript
6161
analytics.track("step_activated", {
@@ -90,4 +90,4 @@ By default, Appcues will target based on the path of the URL. So if we created a
9090

9191
## Delete
9292

93-
When you trigger a user deletion using our [Privacy features](https://segment.com/docs/privacy-portal/user-deletion-and-suppression/), we will forward a delete notification to Appcues, who will act on the notification. You can read more about how Appcues handles deletion requests [in their docs here.](https://docs.appcues.com/article/443-gdpr-deletion-api)
93+
When you trigger a user deletion using our [Privacy features](/docs/privacy/user-deletion-and-suppression/), we will forward a delete notification to Appcues, who will act on the notification. You can read more about how Appcues handles deletion requests [in their docs here.](https://docs.appcues.com/article/443-gdpr-deletion-api)

src/connections/destinations/catalog/braze/index.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ hide-personas-partial: true
88

99
The Braze Destination is open-source on GitHub. You can browse the code on Github: [iOS](https://github.com/Appboy/appboy-segment-ios), [Android](https://github.com/Appboy/appboy-segment-android) (Android and iOS maintained by Braze), [Web](https://github.com/segment-integrations/analytics.js-integration-appboy), [Server](https://github.com/segmentio/integration-appboy) (Web and Server maintained by Segment). If you find any issues for mobile platforms, let Braze know, if the issues appear on web or server, let [us know](https://segment.com/help/contact).
1010

11-
_**NOTE:** There are currently two major versions of the Braze SDK. Make sure you read [important notes](https://segment.com/docs/connections/destinations/catalog/braze/#migrating-to-v2-of-the-braze-web-sdk) regarding migration from Version 1 to Version 2._
11+
_**NOTE:** There are currently two major versions of the Braze SDK. Make sure you read [important notes](/docs/connections/destinations/catalog/braze/#migrating-to-v2-of-the-braze-web-sdk) regarding migration from Version 1 to Version 2._
1212

1313
If you notice any gaps or outdated information in this document, or simply want to leave some feedback to help us improve, [let us know](https://segment.com/help/contact)!
1414

@@ -80,7 +80,7 @@ Braze has created a sample Android application that integrates Braze using Segme
8080

8181
## Page
8282

83-
If you're not familiar with the Segment Specs, take a look to understand what the [Page method](https://segment.com/docs/connections/spec/page/) does. An example call would look like:
83+
If you're not familiar with the Segment Specs, take a look to understand what the [Page method](/docs/connections/spec/page/) does. An example call would look like:
8484

8585
```js
8686
analytics.page();
@@ -90,7 +90,7 @@ Page calls are only sent to Braze if you have enabled either "Track All Pages" o
9090

9191
## Identify
9292

93-
If you're not familiar with the Segment Specs, take a look to understand what the [Identify method](https://segment.com/docs/connections/spec/identify/) does. An example call would look like:
93+
If you're not familiar with the Segment Specs, take a look to understand what the [Identify method](/docs/connections/spec/identify/) does. An example call would look like:
9494

9595
```js
9696
analytics.identify('ze8rt1u89', {
@@ -117,7 +117,7 @@ All other traits (except their [reserved keys](https://www.braze.com/documentati
117117

118118
## Track
119119

120-
If you're not familiar with the Segment Specs, take a look to understand what the [Track method](https://segment.com/docs/connections/spec/track/) does. An example call would look like:
120+
If you're not familiar with the Segment Specs, take a look to understand what the [Track method](/docs/connections/spec/track/) does. An example call would look like:
121121

122122
```
123123
analytics.track('Purchased Item', {
@@ -171,7 +171,7 @@ You can add more product details in the form of key-value pairs to the `properti
171171

172172
## Group
173173

174-
If you're not familiar with the Segment Specs, take a look to understand what the [Group method](https://segment.com/docs/connections/spec/group/) does. An example call would look like:
174+
If you're not familiar with the Segment Specs, take a look to understand what the [Group method](/docs/connections/spec/group/) does. An example call would look like:
175175

176176
```js
177177
analytics.group("1234", {
@@ -195,7 +195,7 @@ In-app messages will be registered for and requested by default. This functional
195195

196196
#### Web
197197

198-
Instructions on how to set this up within Braze can be found in their [docs](https://www.braze.com/academy/Best_Practices/#in-app-message-behavior). Once setup, it allows you to trigger in-app message display as a result of several different event types. By default, all In-App Messages that a user is eligible for are automatically delivered to the user upon a session start event. A new session automatically starts when a user loads your site. If you'd like to force a new session for a user, simply make an identify with the corresponding [userId](https://segment.com/docs/connections/spec/identify/#user-id) for that user.
198+
Instructions on how to set this up within Braze can be found in their [docs](https://www.braze.com/academy/Best_Practices/#in-app-message-behavior). Once setup, it allows you to trigger in-app message display as a result of several different event types. By default, all In-App Messages that a user is eligible for are automatically delivered to the user upon a session start event. A new session automatically starts when a user loads your site. If you'd like to force a new session for a user, simply make an identify with the corresponding [userId](/docs/connections/spec/identify/#user-id) for that user.
199199

200200
If you don't want your site to immediately display new In-App Messages when they're received, you can disable automatic display and register your own display subscribers. To do this:
201201

@@ -224,7 +224,7 @@ The `inAppMessages` parameter will be an array of [`appboy.ab.InAppMessage`](htt
224224

225225
#### iOS
226226

227-
1. Follow the directions to register for push at in [Segment's iOS library](https://segment.com/docs/connections/sources/catalog/libraries/mobile/ios/) docs.
227+
1. Follow the directions to register for push at in [Segment's iOS library](/docs/connections/sources/catalog/libraries/mobile/ios/) docs.
228228
2. Add the following to your application:didFinishLaunchingWithOptions
229229
230230
```
@@ -303,7 +303,7 @@ The `inAppMessages` parameter will be an array of [`appboy.ab.InAppMessage`](htt
303303
});
304304
```
305305
306-
**Note:** We recommend placing this snippet outside of your [Segment Snippet](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/quickstart/#step-2-copy-the-segment-snippet) within your `script` tag.
306+
**Note:** We recommend placing this snippet outside of your [Segment Snippet](/docs/connections/sources/catalog/libraries/website/javascript/quickstart/#step-2-copy-the-segment-snippet) within your `script` tag.
307307
308308
**Note:** This will immediately request push permission from the user.
309309
@@ -378,7 +378,7 @@ analytics.ready(function() {
378378

379379
For more details on this snippet, check out the Braze's docs [here](https://www.braze.com/documentation/Web/#soft-push-prompts).
380380

381-
**Note:** We recommend placing this snippet outside of your [Segment Snippet](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/quickstart/#step-2-copy-the-segment-snippet) within your `script` tag.
381+
**Note:** We recommend placing this snippet outside of your [Segment Snippet](/docs/connections/sources/catalog/libraries/website/javascript/quickstart/#step-2-copy-the-segment-snippet) within your `script` tag.
382382

383383
4. When you'd like to display the Soft Push to a user, call:
384384

@@ -532,7 +532,7 @@ If you use the Braze destination in either [cloud or device mode](/docs/connecti
532532

533533
#### Which ID does Segment match on when sending data to Braze?
534534

535-
By default, Personas data is sent to Braze by matching the `userId`. The Segment `userId` maps to Braze’s External ID. If the user is anonymous and does not have a `userId`, you can also choose to send data using the `braze_id` auto-generated by Braze. To use `braze_id`, you must pass the `braze_id` to Segment as a [Segment externalId](https://segment.com/docs/personas/identity-resolution/externalids/). If `braze_id` is sent as an `externalId` **and** `userId` is missing, Personas matches on `braze_id` when sending to Braze. You can check the **Identities** tab on a user’s Personas profile to confirm that `braze_id` was successfully picked up as an `externalId`.
535+
By default, Personas data is sent to Braze by matching the `userId`. The Segment `userId` maps to Braze’s External ID. If the user is anonymous and does not have a `userId`, you can also choose to send data using the `braze_id` auto-generated by Braze. To use `braze_id`, you must pass the `braze_id` to Segment as a [Segment externalId](/docs/personas/identity-resolution/externalids/). If `braze_id` is sent as an `externalId` **and** `userId` is missing, Personas matches on `braze_id` when sending to Braze. You can check the **Identities** tab on a user’s Personas profile to confirm that `braze_id` was successfully picked up as an `externalId`.
536536

537537
![](images/braze-anonid.png)
538538

0 commit comments

Comments
 (0)