Skip to content

comment out source demo code tool, replace ajs-> javascript #339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Nov 25, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/_data/catalog/destinations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8442,7 +8442,7 @@ items:
page **synchronously** but analytics.js is loaded **asynchronously**. To
prevent errors, please ensure you are interacting with the Forms API
inside an
[analytics.ready](https://segment.com/docs/sources/website/analytics.js/#ready)
[analytics.ready](https://segment.com/docs/sources/website/javascript/#ready)
callback.
settings: []
- name: portalId
Expand Down
2 changes: 1 addition & 1 deletion src/_includes/content/whats-a-source.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ In Segment, you create a source (or more than one!) for each website or app you
Sources belong to a workspace, and the URL for a source looks something like this:
`https://segment.com/<my-workspace>/sources/<my-source-name>/`

You can create new sources using the button in the workspace view. Each source you create has a write key, which is used to send data to that source. For example, to load [`analytics.js`, the Segment JavaScript library](https://segment.com/docs/connections/sources/catalog/libraries/website/analytics.js/) on your page, the snippet on the [Quickstart Guide](https://segment.com/docs/connections/sources/catalog/libraries/website/analytics.js/quickstart/) includes:
You can create new sources using the button in the workspace view. Each source you create has a write key, which is used to send data to that source. For example, to load [`analytics.js`, the Segment JavaScript library](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/) on your page, the snippet on the [Quickstart Guide](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/quickstart/) includes:

```js
analytics.load("YOUR_WRITE_KEY");
Expand Down
2 changes: 1 addition & 1 deletion src/config-api/tutorial-javascript-google-analytics.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ $ curl \

> Analytics.js
>
> The Javascript source requires that you add analytics.js to your website to collect data. See the [Quickstart: Analytics.js](https://segment.com/docs/connections/sources/catalog/libraries/website/analytics.js/quickstart/) guide for full details.
> The Javascript source requires that you add analytics.js to your website to collect data. See the [Quickstart: Analytics.js](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/quickstart/) guide for full details.

## Create a Google Analytics Destination

Expand Down
4 changes: 2 additions & 2 deletions src/connections/destinations/catalog/amplitude/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ Amplitude will create two users - one for each of the `deviceID`'s set per the f

You can grab `deviceID` from Amplitude on the client-side to send server-side
by calling this method within the
[`ready`](https://segment.com/docs/connections/sources/catalog/libraries/website/analytics.js/#ready)
[`ready`](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/#ready)
function on the client-side to send server-side:

```js
Expand Down Expand Up @@ -268,7 +268,7 @@ analytics.track({
```

Many of these properties will automatically be sent for you if you use one of Segment's browser or mobile libraries such as
[Analytics.js](/docs/connections/sources/catalog/libraries/website/analytics.js/), [iOS](/docs/connections/sources/catalog/libraries/mobile/ios/), or [Android](/docs/connections/sources/catalog/libraries/mobile/android/).
[Analytics.js](/docs/connections/sources/catalog/libraries/website/javascript/), [iOS](/docs/connections/sources/catalog/libraries/mobile/ios/), or [Android](/docs/connections/sources/catalog/libraries/mobile/android/).

For a complete list of special `context` keys see [our common fields spec](/docs/connections/spec/common/).

Expand Down
4 changes: 2 additions & 2 deletions src/connections/destinations/catalog/braze/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ The `inAppMessages` parameter will be an array of [`appboy.ab.InAppMessage`](htt
window.appboy.registerAppboyPushMessages();
});
```
**Note:** We recommend placing this snippet outside of your [Segment Snippet](https://segment.com/docs/connections/sources/catalog/libraries/website/analytics.js/quickstart/#step-1-copy-the-snippet) within your `script` tag.
**Note:** We recommend placing this snippet outside of your [Segment Snippet](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/quickstart/#step-1-copy-the-snippet) within your `script` tag.

**Note:** This will immediately request push permission from the user.

Expand Down Expand Up @@ -368,7 +368,7 @@ The `inAppMessages` parameter will be an array of [`appboy.ab.InAppMessage`](htt
```
For more details on this snippet, check out the Braze's docs [here](https://www.Braze.com/documentation/Web/#soft-push-prompts).

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

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

Expand Down
4 changes: 2 additions & 2 deletions src/connections/destinations/catalog/criteo/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Currently this destination supports events originating from Mobile or Web source
To get started with Criteo Events and Segment, you'll need:

1. An existing account with [Criteo](http://www.criteo.com/).
2. A data source integrated with either one of our mobile SDK's ([iOS](/docs/connections/sources/catalog/libraries/mobile/ios/) or [Android](https://segment.com/docs/connections/sources/catalog/libraries/mobile/android/)) or Javascript library ([Analytics.js](/docs/connections/sources/catalog/libraries/website/analytics.js/))
2. A data source integrated with either one of our mobile SDK's ([iOS](/docs/connections/sources/catalog/libraries/mobile/ios/) or [Android](https://segment.com/docs/connections/sources/catalog/libraries/mobile/android/)) or Javascript library ([Analytics.js](/docs/connections/sources/catalog/libraries/website/javascript/))

Assuming both of these criteria are met, you can add Criteo Events as a destination for your desired source in your Segment account.

Expand Down Expand Up @@ -344,7 +344,7 @@ Criteo Events' `viewHome` tag tracks top of funnel visits to your site's home pa

There are two ways of letting Segment know which `.page` event should trigger this tag:

1. You can define the [`name`](/docs/connections/sources/catalog/libraries/website/analytics.js/#page) argument in the `.page` method as 'Home':
1. You can define the [`name`](/docs/connections/sources/catalog/libraries/website/javascript/#page) argument in the `.page` method as 'Home':

```js
analytics.page('Home')
Expand Down
4 changes: 2 additions & 2 deletions src/connections/destinations/catalog/cxense/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Currently this destination supports events originating from Web sources (not Ser
To get started with Cxense and Segment, you'll need the following:

1. An existing account with [Cxense](http://www.cxense.com/).
2. A data source integrated with Segment's Javascript SDK ([Analytics.js](/docs/connections/sources/catalog/libraries/website/analytics.js/)).
2. A data source integrated with Segment's Javascript SDK ([Analytics.js](/docs/connections/sources/catalog/libraries/website/javascript/)).
3. Your Cxense Site Id.

Assuming these criteria are met, you can add Cxense as a destination for your desired source in your Segment account.
Expand All @@ -21,7 +21,7 @@ Assuming these criteria are met, you can add Cxense as a destination for your de

## Page

Tracking pageviews is a key component of Cxense's offering. We integrate with this capability via our `.page()` method. When you trigger a `.page()` event the integration will invoke Cxense's corresponding `sendPageView` functionality. We will also pass along any [custom properties](https://segment.com/docs/connections/sources/catalog/libraries/website/analytics.js/#page) you define. Here is an example:
Tracking pageviews is a key component of Cxense's offering. We integrate with this capability via our `.page()` method. When you trigger a `.page()` event the integration will invoke Cxense's corresponding `sendPageView` functionality. We will also pass along any [custom properties](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/#page) you define. Here is an example:

```js
analytics.page('My Page Name', { author: 'Chris Nixon' });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Here's an example for tracking a `page` event with the name **Confirmation**:

Please ensure you enter the name case sensitively.

Reference our [docs](/docs/connections/sources/catalog/libraries/website/analytics.js/#page) for more on the `name` parameter.
Reference our [docs](/docs/connections/sources/catalog/libraries/website/javascript/#page) for more on the `name` parameter.

### Pages with categories

Expand All @@ -83,7 +83,7 @@ For example, if you had a `page` event with the name as **Confirmation** that wa

**Viewed Checkout Confirmation Page**

Reference our [docs](/docs/connections/sources/catalog/libraries/website/analytics.js/#page) for more on the `category` paramter.
Reference our [docs](/docs/connections/sources/catalog/libraries/website/javascript/#page) for more on the `category` paramter.

## Setting up Custom Variables

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ If you have events that use any of those keys for non-PII properties, you can ma

The most common reason for Facebook conversion pixels to fire inconsistently is that the page redirects or reloads before the pixel has time to be loaded on the page. Make sure your page does not redirect or reload for at least 300ms after the conversion event happens. In some cases a delay of 500ms is necessary.

We recommend using our `trackLink` or `trackForm` helpers to delay the page redirect. [Documentation here](/docs/connections/sources/catalog/libraries/website/analytics.js#track-link). You can extend the delay by [setting the timeout to 500ms](/docs/connections/sources/catalog/libraries/website/analytics.js#extending-timeout).
We recommend using our `trackLink` or `trackForm` helpers to delay the page redirect. [Documentation here](/docs/connections/sources/catalog/libraries/website/javascript#track-link). You can extend the delay by [setting the timeout to 500ms](/docs/connections/sources/catalog/libraries/website/javascript#extending-timeout).

### Extra or Duplicate Conversions

Expand Down
2 changes: 1 addition & 1 deletion src/connections/destinations/catalog/frontleaf/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ beta: true
---

### Browser Tracking
If you're using our client-side javascript library ([Analytics.js](/docs/connections/sources/catalog/libraries/website/analytics.js/)), we will begin loading Frontleaf on your page through your Segment snippet within minutes after you enable it on your project destinations page.
If you're using our client-side javascript library ([Analytics.js](/docs/connections/sources/catalog/libraries/website/javascript/)), we will begin loading Frontleaf on your page through your Segment snippet within minutes after you enable it on your project destinations page.

Frontleaf uses our `page`, `identify`, `track`, and `group` methods.

Expand Down
6 changes: 3 additions & 3 deletions src/connections/destinations/catalog/gainsight/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ This document was last updated on October 18, 2018. If you notice any gaps, outd

## Identify

If you haven't had a chance to review our spec, please take a look to understand what the [Identify method](https://segment.com/docs/connections/spec/identify/) does. An example call would look like this ([analytics.js](https://segment.com/docs/connections/sources/catalog/libraries/website/analytics.js/)):
If you haven't had a chance to review our spec, please take a look to understand what the [Identify method](https://segment.com/docs/connections/spec/identify/) does. An example call would look like this ([analytics.js](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/)):

```js
analytics.identify('123', {
Expand All @@ -36,7 +36,7 @@ You can map `identify` calls to Salesforce by including the Salesforce Account I

**Important**: You should only send the `track` events you need to Gainsight. You can whitelist the names of the events you need in your Segment UI settings for Gainsight. Once you pre-map your events, we will only send those events to Gainsight for you. However, if you do *not* map any events, we will by default send all your track events to Gainsight.

If you haven't had a chance to review our spec, please take a look to understand what the [Track method](https://segment.com/docs/connections/spec/track/) does. An example call would look like this ([analytics.js](https://segment.com/docs/connections/sources/catalog/libraries/website/analytics.js/)):
If you haven't had a chance to review our spec, please take a look to understand what the [Track method](https://segment.com/docs/connections/spec/track/) does. An example call would look like this ([analytics.js](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/)):

```js
analytics.track('Account Created', {
Expand All @@ -52,7 +52,7 @@ If they haven't been identified, pass the Salesforce Account ID as a property li

## Group

If you haven't had a chance to review our spec, please take a look to understand what the [Group method](https://segment.com/docs/connections/spec/group/) does. An example call would look like this ([analytics.js](https://segment.com/docs/connections/sources/catalog/libraries/website/analytics.js/)):
If you haven't had a chance to review our spec, please take a look to understand what the [Group method](https://segment.com/docs/connections/spec/group/) does. An example call would look like this ([analytics.js](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/)):

```js
analytics.group('555', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ Keep in mind that the conversion data must be processed by Google before it show

The most common reason for Google Ads (Classic) conversion pixels to fire inconsistently is that the page redirects or reloads before the pixel has time to be loaded on the page. Make sure your page does not redirect or reload for at least 300ms after the conversion event happens.

We recommend using our `trackLink` or `trackForm` helpers to delay the page redirect. [Documentation here](/docs/connections/sources/catalog/libraries/website/analytics.js#track-link).
We recommend using our `trackLink` or `trackForm` helpers to delay the page redirect. [Documentation here](/docs/connections/sources/catalog/libraries/website/javascript#track-link).

## Mobile & Server

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -630,7 +630,7 @@ Analytics.track(

### UTM Parameters

If you want to send UTM parameters to Google Analytics via one of the Segment server-side sources they need to be passed manually. The client-side Javascript library ([Analytics.js](/docs/connections/sources/catalog/libraries/website/analytics.js)) is highly recommended for collecting this data since it all happens automatically.
If you want to send UTM parameters to Google Analytics via one of the Segment server-side sources they need to be passed manually. The client-side Javascript library ([Analytics.js](/docs/connections/sources/catalog/libraries/website/javascript)) is highly recommended for collecting this data since it all happens automatically.

Your UTM params need to be passed in the `context` object in `context.campaign`. For Google Analytics `campaign.name`, `campaign.source` and `campaign.medium` all need to be sent together for things to show up in reports. The other two params (`campaign.term` and `campaign.content`) are both optional, but will be forwarded to GA if you send them to Segment.

Expand Down
4 changes: 2 additions & 2 deletions src/connections/destinations/catalog/hubspot/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ If you haven't had a chance to review our spec, please take a look to understand
```
analytics.page()
```
**IMPORTANT:** An initial `page` call is required for data to be sent to HubSpot via Analytics.js. This is included by default in your [Segment snippet](/docs/connections/sources/catalog/libraries/website/analytics.js/quickstart/#step-1-copy-the-snippet).
**IMPORTANT:** An initial `page` call is required for data to be sent to HubSpot via Analytics.js. This is included by default in your [Segment snippet](/docs/connections/sources/catalog/libraries/website/javascript/quickstart/#step-1-copy-the-snippet).

## Identify

Expand Down Expand Up @@ -194,7 +194,7 @@ When using any of our server-side sources, our connector will infer `traits.life
### Loading Forms SDK
Segment gives you the option to load the [HubSpot Forms SDK](https://developers.hubspot.com/docs/methods/forms/advanced_form_options) alongside their tracking library. This can be done by enabling the **Load Forms SDK** setting when configuring your HubSpot integration.

**Please Note:** The Forms SDK expects to be loaded synchronously but analytics.js is loaded asynchronously. Therefore, in order to interact with the API, you need to run your code inside an [analytics.ready](https://segment.com/docs/connections/sources/catalog/libraries/website/analytics.js/#ready) callback. Here's an example:
**Please Note:** The Forms SDK expects to be loaded synchronously but analytics.js is loaded asynchronously. Therefore, in order to interact with the API, you need to run your code inside an [analytics.ready](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/#ready) callback. Here's an example:

```js
analytics.ready(function(){
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ To track events from web / server locations, you will need to choose the Action

#### Click Id

Impact passes a query parameter named `CLICKID` as a part of their tracking urls. The value associated with this parameter is used to perform attribution analysis on their end. By default, if you are using our [Javascript source](https://segment.com/docs/connections/sources/catalog/libraries/website/analytics.js/), we will automatically look for this parameter and if it exists, pass it as a contextual property of any events that happen **on the same pageview**. However, we do not cache this id anywhere so any subsequent events the user takes outside of that initial pageview will not have the ClickId as part of the event.
Impact passes a query parameter named `CLICKID` as a part of their tracking urls. The value associated with this parameter is used to perform attribution analysis on their end. By default, if you are using our [Javascript source](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/), we will automatically look for this parameter and if it exists, pass it as a contextual property of any events that happen **on the same pageview**. However, we do not cache this id anywhere so any subsequent events the user takes outside of that initial pageview will not have the ClickId as part of the event.

Impact recommends you cache this value in the users browser (using a cookie or local storage) if you want to attribute any subsequent user interactions to the initial ad source. We ask that you continue doing this if you are using this integration to track web conversions and pass the cached id as part of the `context.referrer` object. It should look like this:

Expand Down
2 changes: 1 addition & 1 deletion src/connections/destinations/catalog/intercom/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ Analytics.with(context).identify("123", traits, options);

#### Identity verification plus filtering via Destinations Object

If using Intercom identity verification AND [selective destinations functionality](https://segment.com/docs/connections/sources/catalog/libraries/website/analytics.js/#selecting-integrations), the context object will look like this:
If using Intercom identity verification AND [selective destinations functionality](https://segment.com/docs/connections/sources/catalog/libraries/website/javascript/#selecting-integrations), the context object will look like this:

```json
{
Expand Down
Loading