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/functions/destination-functions.md
+15-1
Original file line number
Diff line number
Diff line change
@@ -408,7 +408,21 @@ If any of your deployed function instances are failing consistently, they will a
408
408
409
409
### Data control
410
410
411
-
You can use [Destination Filters](/docs/connections/destinations/destination-filters/) or [Privacy Portal](/docs/privacy/portal/) to manage what events and, of those events, which event properties are sent to your destination function.
411
+
In addition to using [Destination Filters](/docs/connections/destinations/destination-filters/) and the [Privacy Portal](/docs/privacy/portal/) to manage which events and properties are sent to your destination function, you can reference the destination function directly in the integrations object of the Segment payload. For example:
412
+
413
+
```json
414
+
...
415
+
"integrations": {
416
+
"All": false,
417
+
"Amplitude": true,
418
+
"Customer.io": true,
419
+
"Google Analytics": true,
420
+
"My Destination Function (My Workspace)": true
421
+
}
422
+
...
423
+
```
424
+
425
+
In the example above, the integrations object directly references and enables the `My Destination Function`. Be sure to include the workspace name in which the Destination Function is created, as shown. Like all items in the integration object, Destination Functions (and workspace names) are case sensitive.
Copy file name to clipboardexpand all lines: src/connections/sources/catalog/libraries/website/javascript/custom-proxy.md
+51-131
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,12 @@ Custom domains allow you to proxy Analytics.js and proxy all tracking event requ
10
10
11
11
To set up a custom domain, you need:
12
12
13
-
1. Access to your site DNS settings
14
-
2. A CDN you can serve assets from
15
-
3. Access to the CDN settings
13
+
- Access to your site DNS settings
14
+
- A CDN you can serve assets from
15
+
- Access to the CDN settings
16
+
- A security certificate for the proxy domain
16
17
17
-
This guide explains how to set up a custom domain in CloudFront. The same principles can be applied to almost any modern CDN that supports proxies.
18
+
This guide explains how to set up a custom domain in CloudFront. You can apply these principles to almost any modern CDN that supports proxies.
18
19
19
20
You need to set up two important parts, regardless of the CDN provider you use:
20
21
@@ -36,143 +37,62 @@ This is {person} from {company}. I would like to configure a proxy for the follo
36
37
37
38
Double-check the source link, the Source ID, and the API proxy host to make sure they are correct.
38
39
39
-
A Segment Customer Success team member will respond that they have enabled this option for your account. When you receive this confirmation, go to your workspace, then navigate to your source settings, go to Analytics.js, and modify the "Host Address" setting. Change it from `api.segment.io/v1` to `[your proxy host]/v1`.
40
+
A Segment Customer Success team member will respond that they have enabled this option for your account. When you receive this confirmation, open the source in your workspace, and navigate to Settings > Analytics.j. Update the **Host Address** setting from `api.segment.io/v1` to `[your proxy host]/v1`.
41
+
42
+
> info ""
43
+
> The **Host Address** field does not appear in source settings until it's enabled by Segment Customer Success.
40
44
41
45
## CloudFront
42
46
43
-
### CDN Proxy
47
+
These instructions refer to Amazon CloudFront, but apply more generally to other providers as well.
44
48
45
-
First log in to AWS and navigate to CloudFront.
46
-
47
-

48
-
49
-
Click **Create Distribution**.
50
-
51
-
Select a delivery method for your content. Click **Get Started** in the **Web** section.
52
-
53
-

54
-
55
-
Next, configure the distribution settings. Under Origin Settings, update the following values:
56
-
57
-

58
-
59
-
<table>
60
-
<tr>
61
-
<td>**Field**</td>
62
-
<td>**Value**</td>
63
-
<td>**Description**</td>
64
-
</tr>
65
-
<tr>
66
-
<td>Origin Domain Name</td>
67
-
<td>`cdn.segment.com`</td>
68
-
<td>The domain name you want the proxy to be served to</td>
69
-
</tr>
70
-
<tr>
71
-
<td>Origin ID (optional)</td>
72
-
<td>The Segment CDN</td>
73
-
<td>A Description of the origin. This can be anything you want that describes the origin domain name.</td>
74
-
</tr>
75
-
<tr>
76
-
<td>Origin Protocol Policy</td>
77
-
<td>Set to `HTTPS Only`</td>
78
-
<td></td>
79
-
</tr>
80
-
<tr>
81
-
<td>Alternate Domain Names (CNAMEs)</td>
82
-
<td>`analytics.yourdomain.com`</td>
83
-
<td>Enter the subdomain you are using as a proxy to Segment. If you don't do this you will get an error.</td>
84
-
</tr>
85
-
</table>
86
-
87
-
Next, configure the **Default Cache Behavior Settings**.
88
-
89
-
<table>
90
-
<tr>
91
-
<td>**Field**</td>
92
-
<td>**Value**</td>
93
-
<td>**Description**</td>
94
-
</tr>
95
-
<tr>
96
-
<td>Viewer Protocol Policy</td>
97
-
<td>Redirect HTTP to HTTPS</td>
98
-
<td>Ensure that all traffic goes through HTTPS</td>
99
-
</tr>
100
-
<tr>
101
-
<td>Allowed HTTP Methods</td>
102
-
<td>GET, HEAD, OPTIONS, PUT, POST, PATCH, DELETE</td>
103
-
<td>Select which HTTP methods are allowed to be proxied.</td>
104
-
</tr>
105
-
<tr>
106
-
<td>Forward Cookies</td>
107
-
<td>All</td>
108
-
<td>Ensure that cookies are forwarded.</td>
109
-
</tr>
110
-
<tr>
111
-
<td>Query String Forwarding and Caching</td>
112
-
<td>Forward all, cache based on all</td>
113
-
<td>Ensure that all query string values are forwarded and properly cached.</td>
114
-
</tr>
115
-
</table>
116
-
117
-
Click **Create Distribution** at the bottom of the page. This distribution displays as being "In Progress" until it finishes deploying.
118
-
119
-
You need the "Domain Name" for the next step, so keep this browser window open.
49
+
### CDN Proxy
50
+
To set up your CDN Proxy:
51
+
1. Log in to the AWS console and navigate to CloudFront.
52
+
2. Click **Create Distribution**.
53
+
3. Configure the distribution settings. In the Origin section, update the following values:
54
+
-**Origin Domain Name**: `cdn.segment.com`
55
+
-**Protocol**: `HTTPS only`
56
+
4. In the Default cache behavior section, configure the following values:
57
+
-**Viewer protocol policy**: `Redirect HTTP to HTTPS`
58
+
-**Allowed HTTP Methods**: `GET, HEAD, OPTIONS, PUT, POST, PATCH, DELETE`
59
+
5. In the Settings section, configure the following values:
60
+
-**Alternate domain name (CNAME)**: `analytics.<yourdomain>.com`
61
+
-**Custom SSL certificate**: Select an existing or new certificate to validate the authorization to use the **Alternate domain name (CNAME)** value. For more information, see Amazon's documentation [Requirements for using alternate domain names](https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/CNAMEs.html#alternate-domain-names-requirements){:target="_blank"}.
62
+
6. Click **Create Distribution**.
63
+
64
+
Take note of the Domain Name for use in the next step.
120
65
121
66
#### Add CNAME Record to DNS
122
67
123
-
Next, add a CNAME record for the Segment proxy to your organizations DNS settings. Use a name that makes it clear what you are using the subdomain for, for example `analytics.mysite.com`. Go to your domain registrar and add a new record to your DNS of type "CNAME".
124
-
125
-
<table>
126
-
<tr>
127
-
<td>**Field**</td>
128
-
<td>**Value**</td>
129
-
</tr>
130
-
<tr>
131
-
<td>Name</td>
132
-
<td>{subdomain_name}.yourdomain.com</td>
133
-
</tr>
134
-
<tr>
135
-
<td>Value</td>
136
-
<td>CloudFront Distribution Domain Name</td>
137
-
</tr>
138
-
</table>
139
-
140
-
Save your record. This might take some time to take effect, depending on your TTL settings. Make a `curl` request to your domain to verify that it's proxying correctly.
68
+
To add a CNAME record for the Segment proxy to your organizations DNS settings:
69
+
1. Use a name that makes it clear what you are using the subdomain for, for example `analytics.mysite.com`.
70
+
2. Go to your domain registrar and add a new record to your DNS of type "CNAME".
71
+
3. Configure these values:
72
+
-**Name**: `<subdomain_name>.yourdomain.com`
73
+
-**Value**: The Domain Name value from CloudFront
74
+
4. Save your record. This might take some time to take effect, depending on your TTL settings.
75
+
5. Make a `curl` request to your domain to verify that the proxy works.
76
+
77
+
141
78
142
79
### Tracking API Proxy
143
80
144
-
Next, set up a proxy for the tracking API so that all calls are proxied through your domain. In this step, we set up a CloudFront distribution that's very similar to the previous step, with a few minor changes:
145
-
146
-
<table>
147
-
<tr>
148
-
<td>**Field**</td>
149
-
<td>**Value**</td>
150
-
<td>**Description**</td>
151
-
</tr>
152
-
<tr>
153
-
<td>Origin Domain Name</td>
154
-
<td>`api.segment.io`</td>
155
-
<td>The domain name you would like the proxy to be served to</td>
156
-
</tr>
157
-
</table>
81
+
Set up a proxy for the tracking API so that all calls proxy through your domain. To do this, set up a CloudFront distribution that's similar to the one in the previous section, with the exception of the Origin Domain Name:
| Origin Domain Name |`api.segment.io`| The domain name to which the proxy is served |
86
+
158
87
159
88
#### Add CNAME Record to DNS
160
89
161
-
Next, add a CNAME record to your DNS settings. Go to your domain registrar and add a new record to your DNS of type "CNAME". This time use the CloudFront distribution for the tracking API proxy.
162
-
163
-
<table>
164
-
<tr>
165
-
<td>**Field**</td>
166
-
<td>**Value**</td>
167
-
</tr>
168
-
<tr>
169
-
<td>Name</td>
170
-
<td>{subdomain_name}.yourdomain.com</td>
171
-
</tr>
172
-
<tr>
173
-
<td>Value</td>
174
-
<td>Tracking API CloudFront Distribution Domain Name</td>
175
-
</tr>
176
-
</table>
177
-
178
-
Save your record. This might take some time to take effect, depending on your TTL settings. Try running `curl` on your domain to check if the proxy is working correctly.
90
+
To add a CNAME record to your DNS settings:
91
+
1. Go to your domain registrar and add a new record to your DNS of type "CNAME". This time use the CloudFront distribution for the tracking API proxy.
92
+
2. Enter values for these fields:
93
+
-**Name**: `<subdomain_name>.yourdomain.com`
94
+
-**Value**: Tracking API CloudFront Distribution Domain Name
95
+
3. Save your record. This might take some time to take effect, depending on your TTL settings.
96
+
4. Run `curl` on your domain to check if the proxy is working correctly.
0 commit comments