You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/connections/sources/catalog/libraries/website/javascript/quickstart.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,21 +10,21 @@ Want to learn more? Check out the [Analytics.js reference](/docs/connections/sou
10
10
11
11
## Step 1: Create a Source in the Segment app
12
12
13
-
Before you begin, you need a Workspace (which is a container that holds all of the sources and destinations which are billed together for an organization). If you already created one, great! If not, you can sign up for a free Segment account and create one.
13
+
Before you begin, you need a Workspace (which is a container that holds all of the Sources and Destinations that are billed together for an organization). If you already created one, great! If not, you can sign up for a free Segment account and create one.
14
14
15
15
Next create an Analytics.js source from your Workspace:
16
16
17
17
1. Click **Add Source**.
18
-
2. From the source catalog page, click **Javascript**.
18
+
2. From the source catalog page, click **JavaScript**.
19
19
3. Click **Add Source** again from the informational panel that appears to the right.
20
20
4. Give the source a display name, and enter the URL the source will collect data from.
21
21
22
-
When you create a Source in the Segment web app, it tells the Segment servers that you'll be sending data from a specific source type. When you create (or change!) a Source in the Segment app, Segment generates a new Write Key for that source. You use the write key in your website code to tell the Segment servers where the data is coming from, so Segment can route it to your destinations and other tools.
22
+
When you create a Source in the Segment web app, it tells the Segment servers that you'll be sending data from a specific source type. When you create (or change!) a Source in the Segment app, Segment generates a new Write Key for that source. You use the write key in your website code to tell Segment servers where the data is coming from, so Segment can route it to your Destinations and other tools.
23
23
24
24
25
25
## Step 2: Copy the Segment Snippet
26
26
27
-
Installing Segment is easy, just paste this snippet into the `<head>` tag of your site.
27
+
Paste this snippet into the `<head>` tag of your site to install Segment.
28
28
29
29
{% include content/snippet-helper.md %}
30
30
@@ -33,7 +33,7 @@ Next, replace `YOUR_WRITE_KEY` in the snippet you pasted with your Segment proje
33
33
> note ""
34
34
> **Note:** When you use Analytics.js in device-mode the source's Write Key is public, because it runs in a user's browser and can be accessed using the browser's developer tools. If this is not acceptable to your organization, you can explore [other Segment Sources](/docs/connections/sources/catalog/) which collect data from a server-based installation, and which are not accessible to the user.
35
35
36
-
That snippet loads Analytics.js onto the page _asynchronously_, so it won't affect your page load speed. Once the snippet is running on your site, you can turn on destinations from the destinations page in your workspace and they start loading on your site automatically!
36
+
That snippet loads Analytics.js onto the page _asynchronously_, so it won't affect your page load speed. Once the snippet is running on your site, you can turn on Destinations from the Destinations page in your workspace and they start loading on your site automatically.
37
37
38
38
Note that you should remove other native third-party destination code that you might have on your site. For example, if you're using Segment to send data to Google Analytics, make sure you remove the Google Analytics snippet from your site source code to prevent sending the data twice.
39
39
@@ -64,7 +64,7 @@ That identifies Michael by his unique User ID (in this case, `f4ca124298`, which
64
64
65
65
To do that, we recommend that you use a backend template to inject an `identify` call into the footer of **every page** of your site where the user is logged in. That way, no matter what page the user first lands on, they will always be identified. You don't need to call `identify` if your unique identifier (`userId`) is not known.
66
66
67
-
Depending on your templating language, your actual identify call might look something like this:
67
+
Depending on your templating language, your actual `identify` call might look something like this:
68
68
69
69
```js
70
70
{% raw %}
@@ -108,7 +108,7 @@ If you're just getting started, some of the events you should track are events t
108
108
109
109
To get started, we recommend that you track just a few important events. You can always add more later!
110
110
111
-
Once you add a few `track` calls, **you're done with this tutorial!** You successfully installed Analytics.js tracking. Now you're ready to turn on any destination you like from our interface, margarita in hand.
111
+
Once you add a few `track` calls, **you're done with this tutorial!** You successfully installed Analytics.js tracking. Now you're ready to turn on any Destination you like from our interface, margarita in hand.
0 commit comments