diff --git a/src/_data/catalog/destination_categories.yml b/src/_data/catalog/destination_categories.yml index d88a8a7fa1..7f95e7cfdd 100644 --- a/src/_data/catalog/destination_categories.yml +++ b/src/_data/catalog/destination_categories.yml @@ -1,5 +1,5 @@ # AUTOGENERATED FROM PUBLIC API. DO NOT EDIT -# destination categories last updated 2025-08-28 +# destination categories last updated 2025-09-04 items: - display_name: A/B Testing slug: a-b-testing diff --git a/src/_data/catalog/destinations.yml b/src/_data/catalog/destinations.yml index 7bbcbddb67..5e7688f28f 100644 --- a/src/_data/catalog/destinations.yml +++ b/src/_data/catalog/destinations.yml @@ -1,5 +1,5 @@ # AUTOGENERATED FROM PUBLIC API. DO NOT EDIT -# destination data last updated 2025-08-28 +# destination data last updated 2025-09-04 items: - id: 637e8d185e2dec264895ea89 display_name: 1Flow @@ -29061,14 +29061,14 @@ items: url: connections/destinations/catalog/bucket previous_names: - Bucket - website: https://bucket.co + website: https://reflag.com status: PUBLIC categories: - Feature Flagging logo: - url: https://cdn-devcenter.segment.com/43726c23-4cc9-4992-a038-8b51612fe7b5.png + url: https://cdn-devcenter.segment.com/bd123113-c56d-4592-800a-005422cb8556.svg mark: - url: https://cdn-devcenter.segment.com/ce522835-9bf5-497b-b547-32a26c4f9b0a.svg + url: https://cdn-devcenter.segment.com/8761d6f6-28f6-439a-a0dd-ce6a39a3fae8.svg methods: track: true identify: true @@ -30741,6 +30741,419 @@ items: actions: [] presets: [] partnerOwned: true +- id: 6888c9ea14d648263fff811d + display_name: Clay + name: Clay + slug: clay + hidden: false + endpoints: + - US + regions: + - us-west-2 + - eu-west-1 + url: connections/destinations/catalog/clay + previous_names: + - Clay + website: https://clay.com + status: PUBLIC_BETA + categories: + - Enrichment + - Analytics + logo: + url: https://cdn-devcenter.segment.com/9e709c23-539a-4c50-9a9a-3212e726baa1.svg + mark: + url: https://cdn-devcenter.segment.com/887dae0e-f6a3-4f55-a5f1-157b65cccc20.svg + methods: + track: true + identify: true + group: true + alias: true + screen: false + page: true + platforms: + browser: true + mobile: false + server: true + warehouse: false + cloudAppObject: false + linkedAudiences: true + components: [] + browserUnbundlingSupported: false + browserUnbundlingPublic: false + replay: false + connection_modes: + device: + web: false + mobile: false + server: false + cloud: + web: true + mobile: false + server: true + settings: + - name: connection_key + type: string + defaultValue: '' + description: Your Clay connection key + required: true + label: Connection Key + - name: secret_key + type: string + defaultValue: '' + description: Your Clay secret key + required: true + label: Secret Key + actions: + - id: gUSzmxMhjKiV42v3kEYcs7 + name: Page Visit + slug: pageVisit + description: Send a page event to Clay + platform: CLOUD + hidden: false + defaultTrigger: type = "page" + fields: + - id: sX1WdWpopS5AgPp49ZKm6v + sortOrder: 0 + fieldKey: name + label: Event Name + type: STRING + description: The name of the page + placeholder: '' + defaultValue: + '@path': $.name + required: false + multiple: false + choices: null + dynamic: false + allowNull: false + - id: xwJR5guy98H5AUpoxrb6ry + sortOrder: 1 + fieldKey: timestamp + label: Timestamp + type: STRING + description: The timestamp of the page event + placeholder: '' + defaultValue: + '@path': $.timestamp + required: false + multiple: false + choices: null + dynamic: false + allowNull: false + - id: 8L3x2QKJ3tnnxXjhUgCXRV + sortOrder: 2 + fieldKey: page + label: Page + type: OBJECT + description: Information about the current page + placeholder: '' + defaultValue: + path: + '@path': $.context.page.path + referrer: + '@path': $.context.page.referrer + search: + '@path': $.context.page.search + title: + '@path': $.context.page.title + url: + '@path': $.context.page.url + required: false + multiple: false + choices: null + dynamic: false + allowNull: false + - id: qMdKqLV2qxUqmCHhwXihdE + sortOrder: 3 + fieldKey: ip + label: IP Address + type: STRING + description: IP address of the user + placeholder: '' + defaultValue: + '@path': $.context.ip + required: true + multiple: false + choices: null + dynamic: false + allowNull: false + - id: sZS6R7aiDpsCoLRMexQCL7 + sortOrder: 4 + fieldKey: userAgent + label: User Agent + type: STRING + description: User-Agent of the user + placeholder: '' + defaultValue: + '@path': $.context.userAgent + required: false + multiple: false + choices: null + dynamic: false + allowNull: false + - id: fHhCdgDSPRvZFX779tiA7Y + sortOrder: 5 + fieldKey: anonymousId + label: Anonymous ID + type: STRING + description: The anonymous ID associated with the user + placeholder: '' + defaultValue: + '@path': $.anonymousId + required: false + multiple: false + choices: null + dynamic: false + allowNull: false + - id: i58YP1P7K8V1WFRk1AhC2H + sortOrder: 6 + fieldKey: userId + label: User ID + type: STRING + description: The ID associated with the user + placeholder: '' + defaultValue: + '@path': $.userId + required: false + multiple: false + choices: null + dynamic: false + allowNull: false + - id: 3cUsV6yCTBW57npKKM7CN4 + sortOrder: 7 + fieldKey: messageId + label: MessageId + type: STRING + description: The Segment messageId + placeholder: '' + defaultValue: + '@path': $.messageId + required: true + multiple: false + choices: null + dynamic: false + allowNull: false + - id: 289FgXe5ESx8THUGZiDvru + sortOrder: 8 + fieldKey: properties + label: Properties + type: OBJECT + description: Properties to associate with the event + placeholder: '' + defaultValue: + '@path': $.properties + required: false + multiple: false + choices: null + dynamic: false + allowNull: false + - id: hx9d7AEiuZQBZ8A6wFtERp + name: Track + slug: track + description: Send a track event to Clay + platform: CLOUD + hidden: false + defaultTrigger: type = "track" + fields: + - id: eaA8C8KqqKyNyZXxgvEZGJ + sortOrder: 0 + fieldKey: event + label: Event Name + type: STRING + description: The name of the event + placeholder: '' + defaultValue: + '@path': $.event + required: true + multiple: false + choices: null + dynamic: false + allowNull: false + - id: hFRCCjBcYe75Qm6gZ1ht7d + sortOrder: 1 + fieldKey: timestamp + label: Timestamp + type: STRING + description: The timestamp of the track event + placeholder: '' + defaultValue: + '@path': $.timestamp + required: false + multiple: false + choices: null + dynamic: false + allowNull: false + - id: 8cPPRZZuTECf6MQbJL5ooc + sortOrder: 2 + fieldKey: page + label: Page + type: OBJECT + description: Information about the current page + placeholder: '' + defaultValue: + path: + '@path': $.context.page.path + referrer: + '@path': $.context.page.referrer + search: + '@path': $.context.page.search + title: + '@path': $.context.page.title + url: + '@path': $.context.page.url + required: false + multiple: false + choices: null + dynamic: false + allowNull: false + - id: jVqh6knAem7QugpUL1Vd95 + sortOrder: 3 + fieldKey: ip + label: IP Address + type: STRING + description: IP address of the user + placeholder: '' + defaultValue: + '@path': $.context.ip + required: true + multiple: false + choices: null + dynamic: false + allowNull: false + - id: zPEwrXLKVWv5TgVsFupUn + sortOrder: 4 + fieldKey: userAgent + label: User Agent + type: STRING + description: User-Agent of the user + placeholder: '' + defaultValue: + '@path': $.context.userAgent + required: false + multiple: false + choices: null + dynamic: false + allowNull: false + - id: 91BdemGAL9ujJzM1gKpTC8 + sortOrder: 5 + fieldKey: anonymousId + label: Anonymous ID + type: STRING + description: The anonymous ID associated with the user + placeholder: '' + defaultValue: + '@path': $.anonymousId + required: false + multiple: false + choices: null + dynamic: false + allowNull: false + - id: njR2CKNs1jVVFemcSVZM6c + sortOrder: 6 + fieldKey: userId + label: User ID + type: STRING + description: The ID associated with the user + placeholder: '' + defaultValue: + '@path': $.userId + required: false + multiple: false + choices: null + dynamic: false + allowNull: false + - id: cDb24edZsrgMVxJWm5kBcg + sortOrder: 7 + fieldKey: messageId + label: MessageId + type: STRING + description: The Segment messageId + placeholder: '' + defaultValue: + '@path': $.messageId + required: true + multiple: false + choices: null + dynamic: false + allowNull: false + - id: pRhfkFdKR88j5AcLFVJZFE + sortOrder: 8 + fieldKey: properties + label: Properties + type: OBJECT + description: Properties to associate with the event + placeholder: '' + defaultValue: + '@path': $.properties + required: false + multiple: false + choices: null + dynamic: false + allowNull: false + presets: + - actionId: gUSzmxMhjKiV42v3kEYcs7 + name: Page Visit + fields: + name: + '@path': $.name + timestamp: + '@path': $.timestamp + page: + path: + '@path': $.context.page.path + referrer: + '@path': $.context.page.referrer + search: + '@path': $.context.page.search + title: + '@path': $.context.page.title + url: + '@path': $.context.page.url + ip: + '@path': $.context.ip + userAgent: + '@path': $.context.userAgent + anonymousId: + '@path': $.anonymousId + userId: + '@path': $.userId + messageId: + '@path': $.messageId + properties: + '@path': $.properties + trigger: type = "page" + - actionId: hx9d7AEiuZQBZ8A6wFtERp + name: Track Calls + fields: + event: + '@path': $.event + timestamp: + '@path': $.timestamp + page: + path: + '@path': $.context.page.path + referrer: + '@path': $.context.page.referrer + search: + '@path': $.context.page.search + title: + '@path': $.context.page.title + url: + '@path': $.context.page.url + ip: + '@path': $.context.ip + userAgent: + '@path': $.context.userAgent + anonymousId: + '@path': $.anonymousId + userId: + '@path': $.userId + messageId: + '@path': $.messageId + properties: + '@path': $.properties + trigger: type = "track" + partnerOwned: true - id: 576af9ca80412f644ff13b87 display_name: Clearbit Enrichment name: Clearbit Enrichment @@ -38734,7 +39147,7 @@ items: hidden: false defaultTrigger: type = "identify" or type = "track" fields: - - id: orwr6RzPyt4fviXw28Xxhx + - id: tjsLDPoye9UnefqBE75nb1 sortOrder: 2 fieldKey: external_audience_id label: External Audience ID @@ -38751,7 +39164,7 @@ items: dynamic: false allowNull: false hidden: false - - id: mMEFHMEYun5zfDoxsULibn + - id: no3qVyCHPL5vf8PQDcMgoZ sortOrder: 3 fieldKey: segment_audience_key label: Audience Key @@ -38766,7 +39179,7 @@ items: dynamic: false allowNull: false hidden: false - - id: 9EMXNmRSjH8oWJEz3L6qNu + - id: 8F8ZHj9xaJMgHQZZ3PErrD sortOrder: 4 fieldKey: traits_or_props label: Traits or Properties @@ -77281,9 +77694,8 @@ items: defaultValue: plain description: >- Select the Authentication Mechanism to use. For SCRAM or PLAIN populate - the 'Username' and 'Password' fields. For AWS IAM populated the 'AWS - Access Key ID' and 'AWS Secret Key' fields. For 'Client Certificate' - populated the 'SSL Client Key' and 'SSL Client Certificate' fields + the 'Username' and 'Password' fields. For 'Client Certificate' populated + the 'SSL Client Key' and 'SSL Client Certificate' fields required: true label: Authentication Mechanism - name: password @@ -77362,7 +77774,7 @@ items: type = "track" or type = "identify" or type = "page" or type = "screen" or type = "group" fields: - - id: rpZx7yusdJ9rDLNZWpqKbp + - id: wfa2W5fgKZ1196oPBj1hRr sortOrder: 0 fieldKey: topic label: Topic @@ -77376,7 +77788,7 @@ items: choices: null dynamic: true allowNull: false - - id: jek3rN3NM43ABDQwNGDj6T + - id: nVPLRbJTsS9c5pZ4ZgaSjS sortOrder: 1 fieldKey: payload label: Payload @@ -77390,7 +77802,7 @@ items: choices: null dynamic: false allowNull: false - - id: 6wcAra8MykYWL5WbsLYtSb + - id: s47Dkc6DKqMUzbHgc9cByu sortOrder: 2 fieldKey: headers label: Headers @@ -77404,7 +77816,7 @@ items: choices: null dynamic: false allowNull: false - - id: mvT1o1a3d5974wRxa181HV + - id: utY6Z5xWftQLPnEdaYHEBG sortOrder: 3 fieldKey: partition label: Partition @@ -77416,7 +77828,7 @@ items: choices: null dynamic: false allowNull: false - - id: eXphzZzwSWdBg46Be7dXVN + - id: q1a5v4CcFknN3Gjp7b9vCH sortOrder: 4 fieldKey: default_partition label: Default Partition @@ -77428,7 +77840,7 @@ items: choices: null dynamic: false allowNull: false - - id: 6TULjFrtM8YnhWkHTmCRhh + - id: 9qq1Ff9g3xtogkTZJTPoQR sortOrder: 5 fieldKey: key label: Message Key @@ -77440,18 +77852,6 @@ items: choices: null dynamic: false allowNull: false - - id: mo6Msbirr6sPEMvspmeafb - sortOrder: 6 - fieldKey: enable_batching - label: Enable Batching? - type: BOOLEAN - description: When enabled, Segment will send events in batches. - defaultValue: false - required: false - multiple: false - choices: null - dynamic: false - allowNull: false presets: [] partnerOwned: false - id: 54751740db31d978f14a5bce @@ -84386,7 +84786,7 @@ items: hidden: false defaultTrigger: event = "Audience Entered" or event = "Audience Exited" fields: - - id: grzymw7kTgosuBnJ66iSbM + - id: tvjFQwz5qnovAJaFq9aBcN sortOrder: 0 fieldKey: dmp_segment_name label: DMP Segment Display Name @@ -84410,21 +84810,7 @@ items: dynamic: false allowNull: false hidden: false - - id: 8GJ1D1dX6wNsgaoro5cunP - sortOrder: 1 - fieldKey: enable_batching - label: Enable Batching - type: BOOLEAN - description: Enable batching of requests to the LinkedIn DMP Segment. - placeholder: '' - defaultValue: true - required: false - multiple: false - choices: null - dynamic: false - allowNull: false - hidden: false - - id: eyG2pmPE8nUSWfybrVqZbE + - id: cM1yoXiWvZ8rZjFgobE6rH sortOrder: 2 fieldKey: email label: User Email @@ -84446,7 +84832,7 @@ items: choices: null dynamic: false allowNull: false - - id: 6bubqqywwk5kvYDRCQj3KT + - id: kZhupfLACLngCyqcXrgKZZ sortOrder: 3 fieldKey: first_name label: User First Name @@ -84460,7 +84846,7 @@ items: choices: null dynamic: false allowNull: false - - id: tmXozQyG4GAC19yQt23x6r + - id: gLoYefQDKRLB82F6fQvbhg sortOrder: 4 fieldKey: last_name label: User Last Name @@ -84474,7 +84860,7 @@ items: choices: null dynamic: false allowNull: false - - id: 9jBroPjFYTKfJ8Zg1MVUUj + - id: 9wqD39Vnq7Z1b4pYs3fQuH sortOrder: 5 fieldKey: title label: User Title @@ -84488,7 +84874,7 @@ items: choices: null dynamic: false allowNull: false - - id: kTMpFrE5VfSiuTkvPmLATm + - id: 6NazS8SES86T2c35wYoYkW sortOrder: 6 fieldKey: company label: User Company @@ -84502,7 +84888,7 @@ items: choices: null dynamic: false allowNull: false - - id: i5uCBBgCwQJzXQWPPpyMKo + - id: byq6P4pfHkhDKrDFXenQ3m sortOrder: 7 fieldKey: country label: User Country @@ -84518,7 +84904,7 @@ items: choices: null dynamic: false allowNull: false - - id: hYv6SLh75LrtqFKsg4vF4D + - id: tQUuSSSc3rXE58E5uXRsv9 sortOrder: 10 fieldKey: personas_audience_key label: Segment Engage Audience Key @@ -84534,7 +84920,7 @@ items: dynamic: false allowNull: false hidden: false - - id: ucjmSCtjJVxHJ8AMQAV5No + - id: 3oG15nY3cDXqwckMU46x5Q sortOrder: 12 fieldKey: dmp_user_action label: DMP User Action @@ -124048,7 +124434,7 @@ items: display_name: Strikedeck name: Strikedeck slug: strikedeck - hidden: false + hidden: true endpoints: - US regions: diff --git a/src/_data/catalog/destinations_private.yml b/src/_data/catalog/destinations_private.yml index 5d000da89c..4ddeb30206 100644 --- a/src/_data/catalog/destinations_private.yml +++ b/src/_data/catalog/destinations_private.yml @@ -1,5 +1,5 @@ # AUTOGENERATED FROM PUBLIC API. DO NOT EDIT -# destination data last updated 2025-08-28 +# destination data last updated 2025-09-04 items: - id: 54521fd925e721e32a72eee1 display_name: Pardot diff --git a/src/_data/catalog/source_categories.yml b/src/_data/catalog/source_categories.yml index cc6a3f2206..391e115cd2 100644 --- a/src/_data/catalog/source_categories.yml +++ b/src/_data/catalog/source_categories.yml @@ -1,5 +1,5 @@ # AUTOGENERATED FROM PUBLIC API. DO NOT EDIT -# source categories last updated 2025-08-28 +# source categories last updated 2025-09-04 items: - display_name: A/B testing slug: a-b-testing diff --git a/src/_data/catalog/sources.yml b/src/_data/catalog/sources.yml index c760aa7615..9a0036b93a 100644 --- a/src/_data/catalog/sources.yml +++ b/src/_data/catalog/sources.yml @@ -1,5 +1,5 @@ # AUTOGENERATED FROM PUBLIC API. DO NOT EDIT -# sources last updated 2025-08-28 +# sources last updated 2025-09-04 items: - id: 8HWbgPTt3k display_name: .NET diff --git a/src/_includes/components/actions-fields.html b/src/_includes/components/actions-fields.html index 2223fb96ef..6624022fca 100644 --- a/src/_includes/components/actions-fields.html +++ b/src/_includes/components/actions-fields.html @@ -129,18 +129,28 @@ {% endif %} - + {% if action.id == 'dMYued7r3VjK4c2gBWUTZi' %}
-

You can use the Custom Object v2 Action to make multiple assosciations

+

You can use the Custom Object v2 Action to make multiple associations

For more information, see HubSpot's [Associate records](https://knowledge.hubspot.com/records/associate-records){:target="_blank”} documentation.

+ +
+
+
+

Handling one-to-many relationships

+

+ In HubSpot, one-to-many relationships allow a single contact to be associated with multiple companies, and a company can have multiple contacts. However, when using Segment, you can’t send multiple users or companies in a single API call. This means the one-to-many relationship can’t be directly established in a single request. To set this up, send multiple event payloads, each containing the information of one contact and one company. +

+
+
{% endif %} {% if action.fields.size > 0 %} diff --git a/src/api/public-api/index.md b/src/api/public-api/index.md index 4e6fc4af27..3c4bfd0b82 100644 --- a/src/api/public-api/index.md +++ b/src/api/public-api/index.md @@ -2,7 +2,7 @@ title: Public API plan: papi --- -The Segment Public API helps you manage your Segment workspaces and its resources. You can use the API to perform CRUD (create, read, update, delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. The Public API is available to Team and Business Tier customers. +The Segment Public API helps you manage your Segment workspaces and its resources. You can use the API to perform CRUD (create, read, update, and delete) operations at no extra charge. This includes working with resources such as Sources, Destinations, Warehouses, Tracking Plans, and the Segment Destinations and Sources Catalogs. The Public API is available to Team and Business Tier customers. All CRUD endpoints in the API follow REST conventions and use standard HTTP methods. Different URL endpoints represent different resources in a workspace. @@ -14,7 +14,7 @@ All CRUD endpoints in the API follow REST conventions and use standard HTTP meth %} > success "Getting started with the Public API" -> If your application is built in Javascript / Typescript, Go, Java, or Swift, check out [Segment's Public API SDKs](https://docs.segmentapis.com/tag/Getting-Started#section/Install-and-use-an-SDK){:target="_blank"}. +> If your application is built in JavaScript, Typescript, Go, Java, Swift, or C#, check out [Segment's Public API SDKs](https://docs.segmentapis.com/tag/Getting-Started#section/Install-and-use-an-SDK){:target="_blank"}. ## Config API vs Public API The Public API includes the following benefits over the Config API: @@ -28,24 +28,24 @@ The Public API includes the following benefits over the Config API: | Improved architecture | The Public API is built with improved security, checks for authentication, authorization, input validation, HTTPS exposed services, auto-scaling, and more in mind. | | Cleaner mapping | The Public API uses unique IDs for reference, in place of slugs in the Config API. Unique IDs are, by design, unique. | | Available in Europe | The Public API is accessible to both US and EU-based workspaces. | | -| Increased reliability | The Public API features more stable endpoints, and a 99.8% success rate | +| Increased reliability | The Public API features more stable endpoints, and a 99.8% success rate. | ## Create a Public API token > info "Only Workspace Owners can create a Public API token" -> Only users with the Workspace Owner role can create a Public API token. For more information about roles, see Segment's [Roles](/docs/segment-app/iam/roles/) documentation. +> Only users with the **Workspace Owner** role can create a Public API token. For more information about roles, see Segment's [Roles](/docs/segment-app/iam/roles/) documentation. To create a Public API token in your Segment workspace: -1. Navigate to Settings > Workspace settings > Access Management > Tokens. -2. Click the **+ Create Token** button. -3. Create a description for the token and assign it either Workspace Owner or Workspace Member access. +1. Navigate to **Settings** > **Workspace settings** > **Access Management** > **Tokens**. +2. Click **+ Create Token**. +3. Create a description for the token and assign it either **Workspace Owner** or **Workspace Member** access. 4. Click **Create**. 5. Copy your workspace token somewhere secure and click **Done**. -To begin sending requests to the Public API, make sure to include the Public API Token into your HTTP requests with the `Authorization` Header and configured with `Bearer Token` and the value of the newly generated Public API token. +To begin sending requests to the Public API, include the Public API Token in your HTTP requests. Configure the `Authorization` Header as a `Bearer Token` with the value of the newly generated Public API token. -## API Token Security +## API token security To enhance API token security, Segment partners with GitHub to prevent fraudulent use of exposed API tokens found in public git repositories. This helps to prevent malicious actors from using exposed tokens to perform unauthorized actions in your Segment workspace. @@ -55,7 +55,7 @@ Learn more about [GitHub's secret scanning program](https://docs.github.com/en/d ## FAQs #### What should I do if I see a notification that my token was exposed? -In most cases, identifying and revoking an exposed token takes seconds. Segment recommends you check the [audit trail](/docs/segment-app/iam/audit-trail/) to ensure no unauthorized actions were taken with the token. +In most cases, identifying and revoking an exposed token takes seconds. We recommend that you check the [audit trail](/docs/segment-app/iam/audit-trail/) to ensure no unauthorized actions were taken with the token. #### How did my token get exposed? Developers can accidentally commit tokens to public repositories, exposing them to the public. This can happen when developers use a token in a local development environment and forget to remove it before committing their code. @@ -70,10 +70,10 @@ This feature is automatically enabled for all workspaces on Team or Business tie If you see a CORS error, this means you're attempting to make a request to the Public API on the front-end. The Public API is used for server-side only. To get rid of the error, move all Public API requests to a server. #### What User Role / Workspace permissions are required to generate Public API tokens? -Only [users that have a `Workspace Owner` role](https://segment.com/docs/segment-app/iam/roles/#global-roles) can create Public API Tokens. +Only [users that have a **Workspace Owner** role](/docs/segment-app/iam/roles/#global-roles) can create Public API Tokens. ## Troubleshooting -#### The `Update Schema Settings in Source` endpoint returns error for field `forwardingViolationsTo` and `forwardingBlockedEventsTo` +#### The `Update Schema Settings in Source` endpoint returns an error for fields `forwardingViolationsTo` and `forwardingBlockedEventsTo` When you don't have a source to forward violations or blocked events to, then exclude the fields `forwardingViolationsTo` or `forwardingBlockedEventsTo` entirely from the request and the setting will be disabled. `PATCH` endpoint : `https://api.segmentapis.com/sources/{sourceId}/settings` diff --git a/src/connections/destinations/catalog/actions-hubspot-cloud/index.md b/src/connections/destinations/catalog/actions-hubspot-cloud/index.md index 8f1a219b6d..a21b6e64d8 100644 --- a/src/connections/destinations/catalog/actions-hubspot-cloud/index.md +++ b/src/connections/destinations/catalog/actions-hubspot-cloud/index.md @@ -1,5 +1,5 @@ --- -title: HubSpot Cloud Mode (Actions) Destination +title: HubSpot Cloud-Mode (Actions) Destination hide-boilerplate: true hide-dossier: false id: 632b1116e0cb83902f3fd717 @@ -12,12 +12,12 @@ versions: {% include content/plan-grid.md name="actions" %} -HubSpot is an all-in-one marketing tool that helps attract new leads and converts them into paying customers, with features like landing page creation and email automation. +[HubSpot](https://www.hubspot.com/){:target="_blank"} is an all-in-one marketing tool that helps attract new leads and converts them into paying customers, with features like landing page creation and email automation. -When you use the HubSpot Cloud Mode (Actions) destination, Segment sends your data to [HubSpot's REST API](https://developers.hubspot.com/docs/api/overview){:target="_blank"}. +When you use the HubSpot Cloud-Mode (Actions) destination, Segment sends your data to [HubSpot's REST API](https://developers.hubspot.com/docs/api/overview){:target="_blank"}. -Keep in mind that: -* The **Upsert Company** action is not compatible with the Mapping Tester on the mappings page if Associate Contact is set to **Yes**. As a result, Segment recommends using the Event Tester or other tools to test and troubleshoot creating and updating companies in HubSpot. For the company to contact association to work, you are required to trigger an Upsert Contact action before triggering an Upsert Company action. Contacts created with batch endpoint can not be associated to a Company from the Upsert Company Action. +### Things to know +* The **Upsert Company** action is not compatible with the Mapping Tester on the mappings page if Associate Contact is set to **Yes**. As a result, we recommend using the Event Tester or other tools to test and troubleshoot creating and updating companies in HubSpot. For the company-to-contact association to work, you are required to trigger an Upsert Contact action before triggering an Upsert Company action. Contacts created with batch endpoint can not be associated to a Company from the Upsert Company Action. * **Behavioral Events (Legacy)** are only supported with [Hubspot Classic Destination](/docs/connections/destinations/catalog/hubspot/). > warning "" @@ -30,26 +30,26 @@ Keep in mind that: > For further details, refer to the [HubSpot documentation](https://developers.hubspot.com/changelog/breaking-change-removed-support-for-referencing-custom-object-types-by-base-name){:target="_blank"}. -## Benefits of HubSpot Cloud Mode (Actions) vs HubSpot Classic -HubSpot Cloud Mode (Actions) provides the following benefits over the classic HubSpot destination: +## Benefits of HubSpot Cloud-Mode (Actions) vs HubSpot Classic +HubSpot Cloud-Mode (Actions) provides the following benefits over the classic HubSpot destination: -- **Fewer settings.** Data mapping for actions-based destinations happens during configuration, which eliminates the need for most settings. -- **Clearer mapping of data.** Actions-based destinations enable you to define the mapping between the data Segment receives from your source, and the data Segment sends to the destination. -- **Granular control over data sent.** You can customize the conditions under which the events are sent to HubSpot. -- **OAuth 2.0 support**. Authentication with HubSpot uses OAuth 2.0 instead of an API key. -- **Sandbox support**. Test with a HubSpot sandbox account before implementing in your main production account to feel confident in your configuration. -- **Support for custom behavioral events**. Send [custom behavioral events](https://developers.hubspot.com/docs/api/analytics/events){:target="_blank"} and event properties to HubSpot. -- **Create records in custom objects**. Use your Segment events to create records in any standard or custom object in your HubSpot account. +- **Fewer settings**: Data mapping for actions-based destinations happens during configuration, which eliminates the need for most settings. +- **Clearer mapping of data**: Actions-based destinations enable you to define the mapping between the data Segment receives from your source, and the data Segment sends to the destination. +- **Granular control over data sent**: You can customize the conditions under which the events are sent to HubSpot. +- **OAuth 2.0 support**: Authentication with HubSpot uses [OAuth 2.0](https://oauth.net/2/){:target="_blank"} instead of an API key. +- **Sandbox support**: Test with a HubSpot sandbox account before implementing in your main production account to feel confident in your configuration. +- **Support for custom behavioral events**: Send [custom behavioral events](https://developers.hubspot.com/docs/api/analytics/events){:target="_blank"} and event properties to HubSpot. +- **Create records in custom objects**: Use your Segment events to create records in any standard or custom object in your HubSpot account. - > info "" - > A HubSpot Enterprise Marketing Hub account is required to send Custom Behavioral Events. +> info "" +> A HubSpot Enterprise Marketing Hub account is required to send Custom Behavioral Events. ## Getting started 1. From the Segment web app, navigate to **Connections > Catalog**. -2. Search for **HubSpot Cloud Mode (Actions)** in the Destinations Catalog, and select the destination. -3. Click **Configure HubSpot Cloud Mode (Actions)**. -4. Select the source that will send data to HubSpot Cloud Mode (Actions) and follow the steps to name your destination. +2. Search for **HubSpot Cloud-Mode (Actions)** in the Destinations Catalog, and select the destination. +3. Click **Configure HubSpot Cloud-Mode (Actions)**. +4. Select the source that will send data to HubSpot Cloud-Mode (Actions) and follow the steps to name your destination. 5. On the **Settings** tab, authenticate with HubSpot using OAuth. Your user must be a [super admin](https://knowledge.hubspot.com/settings/hubspot-user-permissions-guide#super-admin){:target="_blank"} in the HubSpot account to authenticate the connection. Click **Connect app**. ![Hubspot Scope Approval Screen](images/scopeApproval.png) 6. Follow the steps in the Destinations Actions documentation on [Customizing mappings](/docs/connections/destinations/actions/#customize-mappings). @@ -65,7 +65,7 @@ HubSpot Cloud Mode (Actions) provides the following benefits over the classic Hu Segment's v2 Actions, [Custom Object v2](/docs/connections/destinations/catalog/actions-hubspot-cloud/#custom-object-v2) and [Custom Event v2](/docs/connections/destinations/catalog/actions-hubspot-cloud/#custom-event-v2), support the following features: -- **Sync modes**: Control how Segment updates your downstream destination by selecting a sync mode, or a strategy for updating your downstream data +- **Sync modes**: Control how Segment updates your downstream destination by selecting a sync mode, or a strategy for updating your downstream data. - **Dynamic dropdowns**: When creating or updating a mapping in the Segment app, the dropdown auto-populates all of the available properties directly from HubSpot. - **Create and modify data**: Use Sync modes to create objects in your downstream destination without having to leave the Segment app. @@ -85,63 +85,63 @@ Available sync modes for the Custom Object v2 and Custom Event v2 Actions includ ## Rate limits HubSpot's [API rate limit](https://developers.hubspot.com/docs/api/usage-details#rate-limits){:target="_blank"} is 100 API calls per 10 seconds. While Segment implements retries for temporary issues, large data volumes sent simultaneously might exceed this limit and result in incomplete data transmission. -For customers with substantial data volumes, Segment recommends segmenting the data into smaller batches and scheduling transfers over an extended period of time. This approach ensures successful data transmission to HubSpot without encountering rate limits. +For customers with substantial data volumes, we recommend segmenting the data into smaller batches and scheduling transfers over an extended period of time. This approach ensures successful data transmission to HubSpot without encountering rate limits. > info "HubSpot Associations might exacerbate rate limit issues" > [HubSpot Associations](https://developers.hubspot.com/docs/api/crm/associations){:target="_blank"} often require additional API calls. When working with Associations, carefully plan your strategy and consider a more gradual approach to creating them, especially for large datasets, to avoid reaching your API call limit. ## Support for association between two custom object records in upsert custom object records -To associate two records, it's mandatory to have these three fields: **Search Fields to associate** , **ObjectType to associate**, and **Association Label**. If any of these three fields aren't configured, the association skips. +To associate two records, you must have these three fields: **Search Fields to associate** , **ObjectType to associate**, and **Association Label**. If any of these three fields aren't configured, the association skips. Field | Details ----- | -------- Search Fields to associate | This finds a unique record of custom object based on key-value search properties so that records can be associated together.
* An association record fails if there is more than one record returned from the search association object.
* An association skips if no record is found with the data provided in key:value format. ObjectType to associate | To associate the newly created and updated custom object record with another object type, select the object type you want it to be associated with. -Association Label | Select an association label between both the object types. From the HubSpot Dashboard, you can create associations between any type of object. To create an association label:
1. Log in to the [HubSpot Dashboard](https://app.hubspot.com/){:target="_blank"}.
2. Go to **Data Management > Objects > Custom Objects**.
3. Go to the **Associations** tab and click **Create association label**. +Association Label | Select an association label between both the object types. From the [HubSpot Dashboard](https://app.hubspot.com/){:target="_blank"}, you can create associations between any type of object. To create an association label:
1. Log in to the HubSpot Dashboard.
2. Go to **Data Management > Objects > Custom Objects**.
3. Go to the **Associations** tab and click **Create association label**. ## FAQs and troubleshooting -### Why am I receiving a `Contact already exists` error? -This error only applies to integrations with 2 mappings that can create profiles in HubSpot. Initially, the Upsert Contact action seeks to update an existing contact. If no contact is found, a subsequent attempt is made to create a new contact, potentially leading to 3 separate HubSpot API requests. For example, an `Expired Authentication` error may occur if the token expires on the initial request, prompting a token refresh and a subsequent request. If the next error indicates `resource not found`, it means the contact wasn't located, leading to a second attempt to create the contact. However, this attempt might fail due to a `Conflict` error, suggesting the contact already exists. This situation can arise if you activate another mapping, which causes the contact to be created by the time the Upsert Contact Action attempts its final contact creation request, due to the Custom Behavioral Event Action being triggered as well. +#### Why am I receiving a `Contact already exists` error? +This error only applies to integrations with two mappings that can create profiles in HubSpot. Initially, the Upsert Contact action seeks to update an existing contact. If no contact is found, a subsequent attempt is made to create a new contact, potentially leading to three separate HubSpot API requests. For example, an `Expired Authentication` error may occur if the token expires on the initial request, prompting a token refresh and a subsequent request. If the next error indicates `resource not found`, it means the contact wasn't located, leading to a second attempt to create the contact. However, this attempt might fail due to a `Conflict` error, suggesting the contact already exists. This situation can arise if you activate another mapping, which causes the contact to be created by the time the Upsert Contact Action attempts its final contact creation request, due to the Custom Behavioral Event Action being triggered as well. -### How do I send other standard objects to HubSpot? -Segment provides prebuilt mappings for contacts and companies. If there are other standard objects you would like to create records in, please use the **Create Custom Object Record** action. For example, to create a deal in HubSpot, add a mapping for Create Custom Object Record, set up your Event Trigger criteria, and input a literal string of "deals" as the Object Type. You can use the Properties object to add fields that are in the [deals object](https://developers.hubspot.com/docs/api/crm/deals){:target="_blank"}, such as `dealname` and `dealstage`. The same can be done with other object types (for example, tickets, quotes, etc). Ending fields that are to go to HubSpot outside of the properties object isn't supported. This includes sending [associations](https://developers.hubspot.com/docs/api/crm/associations){:target="_blank"}. Please note, Segment only supports creating new records in these cases; updates to existing records are only supported for contacts and companies. +#### How do I send other standard objects to HubSpot? +Segment provides prebuilt mappings for contacts and companies. If there are other standard objects you would like to create records in, use the **Create Custom Object Record** action. For example, to create a deal in HubSpot, add a mapping for Create Custom Object Record, set up your Event Trigger criteria, and input a literal string of "deals" as the Object Type. You can use the Properties object to add fields that are in the [deals object](https://developers.hubspot.com/docs/api/crm/deals){:target="_blank"}, such as `dealname` and `dealstage`. The same can be done with other object types (for example, tickets, quotes, etc). Ending fields that are to go to HubSpot outside of the properties object isn't supported. This includes sending [associations](https://developers.hubspot.com/docs/api/crm/associations){:target="_blank"}. Note that Segment only supports creating new records in these cases; updates to existing records are only supported for contacts and companies. -### How do I send `Page` events to HubSpot? -The [Track Page View action](/docs/connections/destinations/catalog/actions-hubspot-web/#track-page-view) is only available in [HubSpot Web (Actions) destination](/docs/connections/destinations/catalog/actions-hubspot-web/). As a workaround, with HubSpot Cloud Mode (Actions) destination, you can use the [Custom Behavioral Event](/docs/connections/destinations/catalog/actions-hubspot-cloud/#send-custom-behavioral-event) to send Page events to Hubspot. You'll need to [follow Hubspot's instructions](https://knowledge.hubspot.com/analytics-tools/create-custom-behavioral-events-with-the-code-wizard){:target="_blank"} to create a custom behavioral event for `Page Viewed` in HubSpot. +#### How do I send `Page` events to HubSpot? +The [Track Page View action](/docs/connections/destinations/catalog/actions-hubspot-web/#track-page-view) is only available in [HubSpot Web (Actions) destination](/docs/connections/destinations/catalog/actions-hubspot-web/). As a workaround, with HubSpot Cloud-Mode (Actions) destination, you can use the [Custom Behavioral Event](/docs/connections/destinations/catalog/actions-hubspot-cloud/#send-custom-behavioral-event) to send Page events to Hubspot. Follow [Hubspot's instructions](https://knowledge.hubspot.com/analytics-tools/create-custom-behavioral-events-with-the-code-wizard){:target="_blank"} to create a custom behavioral event for `Page Viewed` in HubSpot. -### Why aren't my custom behavioral events appearing in HubSpot? -HubSpot has several limits for custom behavioral events, including a limit on the number of event properties per event. Each event can contain data for up to 50 properties. If this limit is exceeded, the request will fail. See [HubSpot documentation](https://knowledge.hubspot.com/analytics-tools/create-custom-behavioral-events#define-the-api-call){:target="_blank"} for other limits. +#### Why aren't my custom behavioral events appearing in HubSpot? +HubSpot has several limits for custom behavioral events, including a limit on the number of event properties per event. Each event can contain data for up to 50 properties. If this limit is exceeded, the request will fail. See the [HubSpot documentation](https://knowledge.hubspot.com/analytics-tools/create-custom-behavioral-events#define-the-api-call){:target="_blank"} for other limits. -### How do I resolve a `403` error for custom behavioral events? +#### How do I resolve a `403` error for custom behavioral events? `403` errors indicate that Segment is unable to send your event to HubSpot because the account connected doesn't have sufficient permissions. If you're observing `403` errors for Custom Behavioral Events, ensure that your HubSpot account is a `HubSpot Enterprise Marketing Hub` account. After upgrading your account to `Enterprise Marketing Hub`, **Reauthorize** from the **Settings** page of your destination to resolve the `403` errors. -### Why can't I set an entire object for the Other properties field? +#### Why can't I set an entire object for the Other properties field? This destination doesn't allow selecting an entire object for the Other properties field. HubSpot rejects API calls if a property name doesn't match with HubSpot's internal name. When working with a large object of key/value pairs, map each key/value pair to prevent rejection. This ensures that every key matches the pre-created property names in HubSpot. -### Does the HubSpot Cloud Mode (Actions) destination support EU data residency? +#### Does the HubSpot Cloud-Mode (Actions) destination support EU data residency? Yes. HubSpot will automatically redirect API requests directly to an EU data center if your HubSpot instance is on an EU data center. See more in HubSpot's [Routing API Traffic](https://product.hubspot.com/blog/routing-api-traffic){:target="_blank"} article. -### How do I attribute a custom behavioral event with a user token instead of Email? +#### How do I attribute a custom behavioral event with a user token instead of Email? Event payloads should contain an email with either a valid format, empty string, or a `null` value. As a result, the user token takes precedence and is validated in a `Send custom behavioral event` mapping. Segment can't deliver the event to your destination if the email is invalid. -### How can I update companies in HubSpot if they never were associated with a `segment_group_id`? +#### How can I update companies in HubSpot if they never were associated with a `segment_group_id`? Segment uses the `segment_group_id` field to create and update companies in HubSpot. Records that were created from a pipeline outside of Segment won't have the `segment_group_id` field. If your companies aren't associated with a `segment_group_id`, you must use another field that uniquely identifies the company in HubSpot, like the `hs_object_id` field, to make updates to your companies. To use your unique field to update companies, navigate to your Upsert Company mapping and provide the key/value pair assosciated with the `hs_object_id` field in the Company Search fields section. -### How can I disable or delete a destination from Segment? +#### How can I disable or delete a destination from Segment? Follow the instructions in the docs to [disable](/docs/connections/destinations/actions/#disable-a-destination-action) or [delete](/docs/connections/destinations/actions/#delete-a-destination-action) a destination action from Segment. -### How can I uninstall an app from my HubSpot account? +#### How can I uninstall an app from my HubSpot account? Follow the steps outlined in HubSpot's [Uninstall an app](https://knowledge.hubspot.com/integrations/connect-apps-to-hubspot#uninstall-an-app){:target="_blank"} docs to uninstall or disconnect an app from your HubSpot account. -### How does disconnecting and uninstalling affect a user's data and HubSpot account? +#### How does disconnecting and uninstalling affect a user's data and HubSpot account? Segment immediately stops sending data to HubSpot after you disconnect and uninstall a HubSpot account. -### Understanding HubSpot's `date` and dateTime` custom property types +#### Understanding HubSpot's `date` and dateTime` custom property types If you plan on sending a _date_ value that includes time data to your mapped HubSpot custom properties, select HubSpot's `dateTime` property type in HubSpot. If you plan to send a _date_ value that does not contain time data, select the `date` property value in HubSpot. For more information about custom property types, see HubSpot's [Custom objects](https://developers.hubspot.com/docs/api/crm/crm-custom-objects#properties){:target="_blank”} documentation. If you send a _date_ value that contains time data to a custom property in HubSpot with a `date` property type, the event might fail due to an "**Invalid Date Error**." diff --git a/src/connections/destinations/catalog/customer-io/images/cio-track-api-keys.png b/src/connections/destinations/catalog/customer-io/images/cio-track-api-keys.png new file mode 100644 index 0000000000..b8279a6a7d Binary files /dev/null and b/src/connections/destinations/catalog/customer-io/images/cio-track-api-keys.png differ diff --git a/src/connections/destinations/catalog/customer-io/images/segment-source-cio.png b/src/connections/destinations/catalog/customer-io/images/segment-source-cio.png index 09bbc34216..995d23861d 100644 Binary files a/src/connections/destinations/catalog/customer-io/images/segment-source-cio.png and b/src/connections/destinations/catalog/customer-io/images/segment-source-cio.png differ diff --git a/src/connections/destinations/catalog/customer-io/index.md b/src/connections/destinations/catalog/customer-io/index.md index 6e43fc7e43..b993604f55 100644 --- a/src/connections/destinations/catalog/customer-io/index.md +++ b/src/connections/destinations/catalog/customer-io/index.md @@ -22,11 +22,9 @@ You can follow the setup guide through Segment using the steps below, or you can 1. Search for “Customer.io”, select it, and then click **Configure Customer.io**. 1. Select the data sources you want to connect to Customer.io and click **Next**. 1. Enter your *Destination Name* and select your **Connection Mode**—Cloud Mode or Device Mode. Click **Save**. -1. Under *Connection Settings*, enter your Customer.io workspace **API Key** and **Site ID**. You'll find both in your Customer.io *Account Settings* > *API Credentials* page. +1. Under *Connection Settings*, enter your Customer.io workspace **API Key** and **Site ID**. You'll find your Site ID and API Key in Customer.io under **[Settings > Workspace Settings > API Credentials](https://fly.customer.io/workspaces/last/settings/api_credentials){:target="_blank"}**. You can use any Site ID/API Key pair with Segment. You may even want to Create a new Track API Key just for this integration. -If you want to sync your settings directly from your Customer.io workspace, go to **Settings** > **Integrations** and find the **Segment Destination** integration. - -![Segment Destination in Customer.io](images/segment-destination-cio.png) +![Tracking API keys in Customer.io](images/cio-track-api-keys.png) ## Page @@ -249,20 +247,23 @@ For that, you need to make the following calls: ### Sending Data from Customer.io -You can enable Customer.io as a Segment Source to send[ email events](/docs/connections/spec/email/) to other tools on the Segment platform. These events are sent as track calls to the other destinations you've turned on. +You can enable Customer.io as a Segment Source to send [email events](/docs/connections/spec/email/) to other tools on the Segment platform. These events are sent as track calls to the other destinations you've turned on. To enable this feature: -1. In Customer.io go to **Settings** > **Integrations**. -2. Find the Segment Source integration. -3. Add your _Segment Write Key_ and click **Connect Segment**. +1. In Customer.io go to **[Data & Integrations** > **Integrations** > **Segment (Message Activity)](https://fly.customer.io/workspaces/last/journeys/integrations/segment_out){:target="_blank"}**. +2. Add your _Segment Write Key_ and click **Connect Segment**. +3. Select the events you want to send to Segment. When you're done configuring the integration, make sure the *Integration State* is set to **Enabled**. +4. Click **Save and Enable Integration**. ![Segment source in Customer.io](images/segment-source-cio.png) ## Best Practices ### Rate Limits -Customer.io has limits on the data collected by their API. To ensure your events arrive in Customer.io, make sure that you're respecting the limits placed on the [Customer.io API](https://customer.io/docs/api/#tag/trackLimit){:target="_blank"}. If you're using Segment's [HTTP API](/docs/connections/sources/catalog/libraries/server/http/) to send a batch of events to Customer.io at once, make sure you throttle the `import` to 100-200 requests per second. +Customer.io's [Track API](https://docs.customer.io/integrations/api/track/#tag/trackLimit){:target="_blank"} has a rate limit of 1000 requests per second. It's not strictly enforced, but consistently exceeding it may lead to throttling, especially during periods of high system load. If Customer.io detects a sustained high volume that could impact other customers, they may contact you to help adjust your integration. + +If you use Segment's [HTTP API](/docs/connections/sources/catalog/libraries/server/http/) to send batches of events to Customer.io, you can throttle the `import` to keep your requests under this rate limit. ## Troubleshooting diff --git a/src/connections/destinations/catalog/strikedeck/index.md b/src/connections/destinations/catalog/strikedeck/index.md index f70cc42c40..7e1ed2eb88 100644 --- a/src/connections/destinations/catalog/strikedeck/index.md +++ b/src/connections/destinations/catalog/strikedeck/index.md @@ -2,23 +2,24 @@ rewrite: true title: Strikedeck Destination id: 5c940e99e3498f000177880c +deprecated: true +hidden: true --- -[Strikedeck](https://strikedeck.com/?utm_source=segmentio&utm_medium=docs&utm_campaign=partners){:target="_blank”} is a Customer Success platform which actively manages customer relationships to reduce churn, increase existing revenue and influence new sales. Strikedeck includes Customer Engagement Analytics, Health Scorecard, Notifications, Recommendations & Actions. -Strikedeck maintains this documentation. For any issues with the destination, [contact the Strikedeck Support team](mailto:support@strikedeck.com). - - -## Getting Started +> warning "" +> **Strikedeck has been discontinued. This documentation is retained for reference only.** +Strikedeck is a customer success platform which manages customer relationships to reduce churn, increase existing revenue and influence new sales. Strikedeck includes customer engagement analytics, health scorecard, notifications, and recommendations and actions. +## Getting started 1. From the Segment web app, click **Catalog**. 2. Search for "Strikedeck" in the Catalog, select it, and choose which of your sources to connect the destination to. -3. Enter the "API Key" into your Segment Settings UI which you can find from your Strikedeck settings page. Go to Settings -> Connector and click on "Segment". Copy the API Key from this page. +3. Enter the "API Key" into your Segment Settings UI, which you can find from your Strikedeck settings page. Go to **Settings > Connector** and click on "Segment". Copy the API Key from this page. ## Page -For more information about the Page method, see the [Segment Specs - Page](/docs/connections/spec/page/) documentation. +For more information about the Page method, see the [Segment Spec - Page](/docs/connections/spec/page/) documentation. An example Page call looks like: @@ -28,9 +29,9 @@ analytics.page() Segment sends Page calls to Strikedeck as a `pageview`. - ## Screen -For more information about the Screen method, see the [Segment Specs - Screen](/docs/connections/spec/screen/) documentation. + +For more information about the Screen method, see the [Segment Spec - Screen](/docs/connections/spec/screen/) documentation. An example Screen call looks like: @@ -42,7 +43,7 @@ Segment sends Screen calls to Strikedeck as a `screenview`. ## Identify -For more information about the Screen method, see the [Segment Specs - Screen](/docs/connections/spec/identify/) documentation. +For more information about the Screen method, see the [Segment Spec - Screen](/docs/connections/spec/identify/) documentation. An example Identify call looks like: @@ -54,10 +55,9 @@ analytics.identify('userId123', { Segment sends Identify to Strikedeck as an `identify` event. - ## Group -For more information about the Screen method, see the [Segment Specs - Screen](/docs/connections/spec/group/) documentation. +For more information about the Screen method, see the [Segment Spec - Screen](/docs/connections/spec/group/) documentation. An example Group call looks like: @@ -69,10 +69,9 @@ analytics.group( { Segment sends Group to Strikedeck as a `group` event. - ## Track -For more information about the Screen method, see the [Segment Specs - Screen](/docs/connections/spec/track/) documentation. +For more information about the Screen method, see the [Segment Spec - Screen](/docs/connections/spec/track/) documentation. An example Track call looks like: diff --git a/src/connections/destinations/index.md b/src/connections/destinations/index.md index e955162943..271eeb7355 100644 --- a/src/connections/destinations/index.md +++ b/src/connections/destinations/index.md @@ -2,7 +2,7 @@ title: Destinations Overview --- -Destinations are the business tools or apps that Segment forwards your data to. Adding Destinations allow you to act on your data and learn more about your customers in real time. +Destinations are the business tools or apps that receive data from Segment. Destinations allow you to act on your data and learn more about your customers in real time. > info "Destinations Catalog" > If you want to explore the destinations compatible with Segment, check out the [Destinations catalog](/docs/connections/destinations/catalog/). Select an item from the catalog to learn more about it. The documentation for each destination explains how the Segment Tracking API methods are implemented for that destination. @@ -13,21 +13,20 @@ Segment has [Sources](/docs/connections/sources/) and [Destinations](/docs/conne ## Destination connection types Segment has three destination connection types: -* [Event streams](#event-streams-destinations) * [Storage](#storage-destinations) * [Reverse ETL](#reverse-etl-destinations) - -### Event streams destinations -Event streams destinations are all destinations that aren't storage or Reverse ETL destinations. Adding these destinations allow you to act on your data and learn more about your customers in real time. These include [Destination Actions](/docs/connections/destinations/actions/). +* [Event streams](#event-streams-destinations) ### Storage destinations -Storage destinations enable you to store your raw Segment data. This enables data analysts and data scientists to work with the raw data to derive deeper and more customized insights to support your organization. Learn more from the [storage overview page](/docs/connections/storage/). +Storage destinations enable you to store your raw Segment data. This enables data analysts and data scientists to work with raw data to derive deeper and more customized insights to support your organization. Learn more on the [storage overview page](/docs/connections/storage/). ### Reverse ETL destinations -[Reverse ETL](/docs/connections/reverse-etl) destinations are the business tools or apps you use that Segment syncs the data from your warehouse to. +[Reverse ETL](/docs/connections/reverse-etl) destinations are the business tools or apps you use that receive the data that Segment extracts from your connected warehouses. If your destination is not listed in [the Reverse ETL catalog](/docs/connections/reverse-etl/reverse-etl-catalog/), use the [Segment Connections destination](/docs/connections/destinations/catalog/actions-segment/) to send data from your Reverse ETL warehouse to other destinations listed in the [catalog](/docs/connections/destinations/catalog/). The Segment Connections destination enables you to mold data extracted from your warehouse in [Segment Spec](docs/connections/spec/) API calls that are then processed by [Segment’s HTTP Tracking API](/docs/connections/sources/catalog/libraries/server/http-api/). The Segment HTTP Tracking API lets you record analytics data. The requests hit Segment’s servers, and then Segment routes your data to any destination you want. Get started with the [Segment Connections destination](/docs/connections/destinations/catalog/actions-segment/). - + +### Event streams destinations +Event streams destinations are all destinations that aren't storage or Reverse ETL destinations. Adding these destinations allow you to act on your data and learn more about your customers in real time. Event streams destinations include [Destination Actions](/docs/connections/destinations/actions/), built on Segment's [Actions framework](#destination-actions). ## Method compatibility @@ -35,7 +34,7 @@ Not all destinations can accept data from specific method types. To know if a de ## Source compatibility -Many destinations can accept data from all types of sources, but some are only compatible with specific source types (for example, web only, or server only). To find out which source types a specific destination can accept data from, check the documentation for that destination in the *Quick info* box, or in the *Supported Sources and Connection Modes* section. +Many destinations can accept data from all types of sources, but some are only compatible with specific source types (for example, only web sources or server sources). To find out which source types a specific destination can accept data from, check the documentation for that destination in the *Quick info* box, or in the *Supported Sources and Connection Modes* section. {% include components/reference-button.html href="/docs/connections/destinations/category-compare/" icon="guides.svg" title="Destinations Compatibility Matrix" description="Wondering which destinations take which data? Check out the Destination connection modes list by category." %} @@ -51,7 +50,7 @@ In June 2021, Segment released a new form of destinations called [Destinations A ### Choosing a connection mode -Cloud-mode destinations send data through Segment. Device-mode destinations send data in parallel to Segment. There are tradeoffs between using cloud-mode and device-mode destinations. In general, Cloud-mode is preferred because you then benefit from Segment's system features, like retries, Replay, Warehouses, Privacy blocking, filtering, and more. +Cloud-mode destinations send data through Segment. Device-mode destinations send some data directly downstream to a tool and some data to Segment as two parallel data streams. There are tradeoffs between cloud-mode and device-mode destinations. In general, Segment recommends cloud-mode destinations because you can benefit from Segment's system features, like retries, Replay, Warehouses, Privacy blocking, filtering, and more. You should consider using device-mode if you use destinations which record information directly on the user's device. These types of tools might lose functionality if they aren't loaded directly on the device. @@ -66,18 +65,18 @@ Device-mode | * Access to all features of the Destination | * Decreased site or Segment's website sources use device-mode by default, because so many website-based destinations require that they be loaded on the page, and because size and page performance are less of a concern than on mobile. If your website source only collects information that you can instrument yourself, then you can use cloud-mode. -For example, a web-chat destination must be loaded to connect to the service and collect metrics efficiently - you don't expect it to route chat messages through Segment! This _does_ mean that Segment might not receive a small amount of the destination-specific information from your users. In the chat example, if the destination is calculating idle time between messages, that data would appear in the destination's tooling, but not necessarily in the Segment data. +For example, you need to load a web chat destination directly on a website to connect to the service and collect metrics efficiently - you don't expect it to route chat messages through Segment. This _does_ mean that Segment might not receive a small amount of the destination-specific information from your users. For example, if your web chat tool calculates idle time between messages, that data would appear in the destination's tooling but not necessarily in the data sent to Segment. #### Mobile source connection modes -By default, destinations configured on a mobile source send their data directly to the Segment servers, then translate it and use Cloud-mode to forward it to destinations. *Cloud-mode* means that Segment sends the data directly from the Segment servers, to their servers. This means you don't need to package third-party SDKs for destinations that can accept cloud-mode data. Some primarily web-based destinations also allow cloud-mode, which can help reduce app size, and improve load time and performance. +By default, destinations configured on a mobile source send their data directly to the Segment servers, then translate it and use Cloud-mode to forward it to destinations. *Cloud-mode* means that Segment sends the data directly from the Segment servers to your destination's servers. This means you don't need to package third-party SDKs for destinations that can accept cloud-mode data. Some primarily web-based destinations also allow cloud-mode, which can help reduce app size and improve load time and performance. -Before you turn on or opt-in for cloud-mode for a mobile source, consider if your destinations have features that require interactions on the device or require device-specific data (see the examples above). For example, if you use cloud-mode for Mixpanel, you'll get your data on reporting and people, but won't be able to use their features for in-app surveys or auto-tracking. These can be really valuable, but might not be a priority for your team. +Before you opt into cloud-mode for a mobile source, consider if your destinations have features that require interactions on the device or require device-specific data. For example, if you use cloud-mode for Mixpanel, you'll get data on reporting and people, but won't be able to use Mixpanel's features for in-app surveys or auto-tracking. These features can be really valuable, but might not be a priority for your team. ### How Segment determines Device-mode and Cloud-mode destinations -There are two main things Segment considers when deciding to use Device-mode or Cloud-mode, or both, for a destination partner: +There are two main things Segment considers when deciding to use Device-mode, Cloud-mode, or both modes for a destination partner: 1. [Anonymous Attribution Methodology](#anonymous-attribution-methodology) 2. [Client-native Destination Features](#client-native-destination-features) @@ -85,9 +84,9 @@ There are two main things Segment considers when deciding to use Device-mode or ##### Mobile attribution -The anonymous identifiers used on mobile devices are usually static, which means Segment doesn't need to do additional resolution, and can build Cloud-mode destinations by default. Because Segment uses native advertising identifiers on mobile devices, you don't need a full SDK on the device to reconcile or identify a user. For example, you might track users who viewed an advertisement in one app and installed another app as a result. +The anonymous identifiers used on mobile devices are usually static, which means Segment doesn't need to do additional resolution and can build Cloud-mode destinations by default. Because Segment uses native advertising identifiers on mobile devices, you don't need a full SDK on the device to reconcile or identify a user. For example, you might track users who viewed an advertisement in one app and installed another app as a result. -However, some mobile attribution tools do more advanced reconciliation based on more than the native identifier, which requires the SDK on the device to work properly. For those destinations, Segment offers device-mode, which packages the tool's SDK with the client-side library so that you can get the entire range of tool functionality. +However, some mobile attribution tools do more advanced reconciliation based on more than the native identifier, which requires the SDK to be installed on the device. For those destinations, Segment offers device-mode, which packages the tool's SDK with the client-side library so that you can get the entire range of tool functionality. ##### Web Attribution @@ -97,13 +96,13 @@ Customers can load their libraries and pixels in the context of the browser and #### Client-native destination features -Many of Segment's destinations offer client-side features beyond data collection in their SDKs and libraries, for both mobile and web. In these cases, Segment offers Device-mode SDKs so that you can collect information on the device using Segment, but still get the destination's complete native functionality. +Many of Segment's destinations offer client-side features beyond data collection in their SDKs and libraries, for both mobile and web. In these cases, Segment offers device-mode SDKs so that you can collect information on the device using Segment, but still get the destination's complete native functionality. -Some features that usually require Device-mode include: automatic A/B testing, displaying user surveys, live chat or in-app notifications, touch and hover heatmapping, and accessing rich device data such as CPU usage, network data, or raised exceptions. +Some features that usually require device-mode include: automatic A/B testing, displaying user surveys, live chat or in-app notifications, touch and hover heatmapping, and accessing rich device data such as CPU usage, network data, or raised exceptions. ### How can I tell which connection modes and platforms are supported for a destination? -The first place to look is the individual destination documentation. Each one includes a matrix of supported Sources and Connection Modes. Segment provides a list of [all destinations and their connection modes](/docs/connections/destinations/cmodes-compare/). +The first place to look is the individual destination documentation. Each one includes a matrix of supported Sources and Connection Modes. Segment also provides a list of [all destinations and their connection modes](/docs/connections/destinations/cmodes-compare/). In order to override the default, check the destination settings pane in the Segment web App either for a **Connection Mode** toggle or instructions on bundling any additional mobile components required. @@ -120,23 +119,23 @@ Available sync modes include: - **Remove**: Remove records from a list, audience, or journey. ## Add a destination -To add a Destination: +To add a Destination to your workspace: 1. Navigate to **Connections**. 2. Click **Add Destination**. -3. Choose the Destination you want to add and click **Configure**. Most users eventually add destinations for: Analytics, Advertising, Email Marketing and/or Live Chat. +3. Choose the Destination you want to add and click **Configure**. Most users eventually add Analytics, Advertising, Email Marketing and/or Live Chat destinations. 4. Select the Source you want to connect to your Destination. 5. Click **Next**. 6. Give you Destination a name. 7. Click **Save**. 8. Configure the settings and enable your destination on the destination settings page. -[Learn more](/docs/connections/destinations/add-destination/) about what adding a destination entails. +Learn more about what adding a destination entails in the[ Sending data to a Segment destination](/docs/connections/destinations/add-destination/) documentation. > warning "Disabled destinations do not receive data" -> If you haven't enabled your destination for the first time after you created it or if you actively disable a destination, Segment prevents any data from reaching the destination. Business Tier customers can request [a Replay](/docs/guides/what-is-replay/), which resends data from the time the destination was disabled to the time it was re-enabled. Replays can also send data to currently disabled destinations. +> If you haven't enabled your destination after you created it or if you actively disable a destination, Segment prevents any data from reaching the destination. Business Tier customers can request [a Replay](/docs/guides/what-is-replay/), which resends data from the time the destination was disabled to the time it was re-enabled. Replays can also send data to currently disabled destinations. > -> Some destinations are not compatible with Replays after a certain period of time, for example, 14 days. Check with Segment’s support team [friends@segment.com](mailto:friends@segment.com) to confirm that your intended destination allows historical timestamps. +> Some destinations are not compatible with Replays after a certain period of time. Check with Segment’s support team [friends@segment.com](mailto:friends@segment.com) to confirm that your intended destination allows historical timestamps. ## Data deliverability @@ -176,7 +175,7 @@ Ruby | 100ms | Exponential | 10s | 10 #### Mobile library retries -All mobile libraries handle retries by periodically attempting to flush their internal queue of events to Segment. If the flush is unsuccessful, the library waits until the next regularly-scheduled flush time to try again. The background queue of requests to Segment is bounded in size so if events are being queued faster than we can successfully flush them to Segment, some events may be dropped. +All mobile libraries handle retries by periodically attempting to flush their internal queue of events to Segment. If the flush is unsuccessful, the library waits until the next regularly-scheduled flush time to try again. The background queue of requests to Segment is bounded in size so if events are being queued faster than can successfully flush to Segment, some events may be dropped. #### Retries between Segment and destinations @@ -186,21 +185,21 @@ Here's an example destination that was only successfully accepting 93.36% of all ![Segment destination data deliverability retries](images/integration-data-deliverability.png) -You can see the current destination endpoint API success rates and final delivery rates for Segment's server-side destinations on Segment's [status page](https://status.segment.com). +You can see the current destination endpoint API success rates and final delivery rates for Segment's server-side destinations on Segment's [status page](https://status.segment.com){:target="_blank”}. ### Replays > info "" -> Replay is available to [Business tier](https://segment.com/pricing) customers. [Contact Segment](https://segment.com/contact/sales) to learn more. +> Replay is available to [Business tier](https://segment.com/pricing){:target="_blank”}. customers. [Contact Segment](https://segment.com/contact/sales) to learn more. -[Replays](/docs/guides/what-is-replay/) allow customers to load historical data from Segment's S3 logs into downstream destinations which accept cloud-mode data. So, for example, if you wanted to try out a new email or analytics tool, Segment can replay your historical data into that tool. This gives you a great testing environment and prevents data lock-in when vendors try to hold data hostage. +[Replays](/docs/guides/what-is-replay/) allow customers to load historical data from Segment's S3 logs into downstream destinations which accept cloud-mode data. For example, if you wanted to try out a new email or analytics tool, Segment can replay your historical data into that tool. This gives you a great testing environment and prevents data lock-in when vendors try to hold data hostage. > warning "" > If you submitted [`suppress_only` requests](/docs/privacy/user-deletion-and-suppression/#suppressed-users), Segment still retains historical events for those users, which can be replayed. If you do not want historical events replayed for suppressed users, submit `suppress_and_delete` requests instead. ### Batching -Segment uses [stream batching](#stream-batching) for all destinations that require near-realtime data and [bulk batching](#bulk-batching) for some data flows in our pipeline. +Segment uses [stream batching](#stream-batching) for all destinations that require near-realtime data and [bulk batching](#bulk-batching) for some data flows in the Segment pipeline. #### Stream batching For all destinations, except for non-realtime Engage syncs and Reverse ETL syncs, Segment processes events from your source as they arrive and then flows the data downstream to your destinations in small batches, in a process called **stream batching**. These batches might contain different events between retry attempts, as events in previous batches may have succeeded, failed with a permanent error, or expired. This variability reduces the workload the system processes during partial successes, allows for better per-event handling, and reduces the chance of load-related failures by using variable batch formations. @@ -230,8 +229,7 @@ Segment supports these 2 types of data for hashing: > warning "" > The hashing detection feature applies only to **Action Destinations**. -> info "" -> If you choose to hash data yourself, ensure you follow each destination's specific hashing requirements. Fields that support automatic hashing detection will display a tooltip indicating *"If not hashed, Segment will hash this value."* +If you choose to hash data yourself, ensure you follow each destination's specific hashing requirements. Fields that support automatic hashing detection will display a tooltip indicating *"If not hashed, Segment will hash this value."* For destination-specific hashing requirements, refer to the destination's API documentation. @@ -256,4 +254,4 @@ To enable IP Allowlisting for your workspace: 3. The page displays the IP address ranges that Segment uses to route data from Segment's internal systems to your destination. Note these ranges, as you'll need this information to enforce IP restriction in your downstream destinations. 4. Open each of your downstream tools and configure IP restriction for each destination. For more information, refer to the documentation for your downstream tool. -*IP restriction might not be supported in all destinations.* \ No newline at end of file +*All destinations might not support IP restriction.* \ No newline at end of file diff --git a/src/connections/functions/source-functions.md b/src/connections/functions/source-functions.md index 1dd110219d..47664be5f8 100644 --- a/src/connections/functions/source-functions.md +++ b/src/connections/functions/source-functions.md @@ -25,9 +25,8 @@ All functions are scoped to your workspace, so members of other workspaces canno After you click **Build**, a code editor appears. Use the editor to write the code for your function, configure settings, and test the function's behavior. -> success "" -> **Tip:** Want to see some example functions? Check out the templates available in the Functions UI, or in the open-source [Segment Functions Library](https://github.com/segmentio/functions-library){:target="_blank"}. (Contributions welcome!) - +> success "Want to see some example functions?" +> Check out the templates available in the Functions UI, or in the open-source [Segment Functions Library](https://github.com/segmentio/functions-library){:target="_blank"}. (Contributions welcome!) ![Functions Editor](images/editor-source.png) @@ -306,16 +305,19 @@ The advantage of testing your source function with webhooks is that all incoming Note: Segment has updated the webhook URL to `api.segmentapis.com/functions`. To use webhooks with your function, you must: - [Generate a public API token](https://docs.segmentapis.com/tag/Getting-Started/#section/Get-an-API-token){:target="_blank"}. - [Create a Public API Token]([url](https://app.segment.com/goto-my-workspace/settings/access-management/tokens)), or follow these steps: -In your Segment Workspace, navigate to Settings → Workspace settings → Access Management → Token. Click `+ Create Token`. Create a description for the token and assign access. Click `Create` and save the access token before clicking `Done`. +In your Segment Workspace, navigate to **Settings** > **Workspace settings** > **Access Management** > **Token**. Click **+ Create Token**. Create a description for the token and assign access. Click **Create** and save the access token before clicking **Done**. - For POST calls, use this Public API token in the Authorization Header, as `Bearer Token : public_api_token` ### Testing source functions with a webhook You can use webhooks to test the source function either by sending requests manually (using any HTTP client such as cURL, Postman, or Insomnia), or by pasting the webhook into an external server that supports webhooks (such as Slack). -_A common Segment use case is to connect a Segment [webhooks destination](https://segment.com/docs/connections/destinations/catalog/webhooks/) or [webhook actions destination](https://segment.com/docs/connections/destinations/catalog/actions-webhook/) to a test source, where the Webhook URL/endpoint that is used corresponds to the provided source function's endpoint, then you can trigger test events to send directly to that source, which are routed through your Webhook destination and continue on to the source function: Source → Webhook destination → Source Function._ + +#### Use case +A common Segment use case is to connect a Segment [webhooks destination](https://segment.com/docs/connections/destinations/catalog/webhooks/) or [webhook actions destination](https://segment.com/docs/connections/destinations/catalog/actions-webhook/) to a test source, where the Webhook URL/endpoint that is used corresponds to the provided source function's endpoint, then you can trigger test events to send directly to that source, which are routed through your Webhook destination and continue on to the source function: **Source** > **Webhook destination** > **Source Function**. From the source function editor, copy the provided webhook URL (endpoint) from the "Auto-fill via Webhook" dialog. -_**Note** : When a new source is created that utilizes a source function, the new source's endpoint (webhook URL) will differ from the URL that is provided in the source function's test environment._ + +**Note** : When a new source is created that utilizes a source function, the new source's endpoint (webhook URL) will differ from the URL that is provided in the source function's test environment. To test the source function: 1. Send a `POST` request to the source function's provided endpoint (webhook URL) @@ -367,12 +369,14 @@ async function onRequest(request, settings) { } ``` -> warning "" -> **Warning:** Do not log sensitive data, such as personally-identifying information (PII), authentication tokens, or other secrets. You should especially avoid logging entire request/response payloads. Segment only retains the 100 most recent errors and logs for up to 30 days but the **Errors** tab may be visible to other workspace members if they have the necessary permissions. +> warning "**Data may be visible to other workspace members**" +> **Do not log sensitive data**, such as personally-identifying information (PII), authentication tokens, or other secrets. You should especially avoid logging entire request/response payloads. +> +> Segment only retains the 100 most recent errors and logs for up to 30 days but the **Errors** tab may be visible to other workspace members if they have the necessary permissions. ### Error types -- **Bad Request**: is any error thrown by your code not covered by the other errors. +- **Bad Request**: Any error thrown by your code not covered by the other errors. - **Invalid Settings**: A configuration error prevented Segment from executing your code. If this error persists for more than an hour, [contact Segment Support](https://segment.com/help/contact/){:target="_blank"}. - **Message Rejected**: Your code threw `InvalidEventPayload` or `ValidationError` due to invalid input. - **Unsupported Event Type**: Your code doesn't implement a specific event type (for example, `onTrack()`) or threw an `EventNotSupported` error. @@ -423,7 +427,7 @@ The maximum payload size for an incoming webhook payload is 512 KiB. ##### What is the timeout for a function to execute? -The execution time limit is five seconds, however Segment strongly recommends that you keep execution time as low as possible. If you are making multiple external requests you can use async / await to make them concurrently, which will help keep your execution time low. +The execution time limit is five seconds, however we strongly recommend that you keep execution time as low as possible. If you are making multiple external requests you can use async or await to make them concurrently, which will help keep your execution time low. #### Does Segment alter incoming payloads? @@ -435,7 +439,7 @@ Segment alphabetizes payload fields that come in to **deployed** source function #### Can I use a Source Function in place of adding a Tracking Pixel to my code? -No. Tracking Pixels operate client-side only and need to be loaded onto your website directly. Source Functions operate server-side only, and aren't able to capture or implement client-side tracking code. If the tool you're hoping to integrate is server-side, then you can use a Source Function to connect it to Segment. +No. Tracking Pixels operate client-side only and need to be loaded onto your website directly. Source functions operate server-side only, and aren't able to capture or implement client-side tracking code. If the tool you're hoping to integrate is server-side, then you can use a Source function to connect it to Segment. ##### What is the maximum data size that can be displayed in console.logs() when testing a Function? @@ -443,10 +447,10 @@ The test function interface has a 4KB console logging limit. Outputs surpassing #### Can I send a custom response from my Source Function to an external tool? -No, Source Functions can't send custom responses to the tool that triggered the Function's webhook. Source Functions can only send a success or failure response, not a custom one. +No, Source functions can't send custom responses to the tool that triggered the Function's webhook. Source functions can only send a success or failure response, not a custom one. #### Why am I seeing the error "Functions are unable to send data or events back to their originating source" when trying to save my Source Function? -This error occurs because Segment prevents Source Functions from sending data back to their own webhook endpoint (`https://fn.segmentapis.com`). Allowing this could create an infinite loop where the function continuously triggers itself. +This error occurs because Segment prevents Source functions from sending data back to their own webhook endpoint (`https://fn.segmentapis.com`). Allowing this could create an infinite loop where the function continuously triggers itself. To resolve this error, check your Function code and ensure the URL `https://fn.segmentapis.com` is not included. This URL is used to send data to a Source Function and shouldn't appear in your outgoing requests. Once you remove this URL from your code, you’ll be able to save the Function successfully. diff --git a/src/connections/index.md b/src/connections/index.md index e8124dc6ce..e75d76a194 100644 --- a/src/connections/index.md +++ b/src/connections/index.md @@ -8,7 +8,7 @@ Connections is Segment's core product offering: you can collect event data from {% include content/whats-a-source.md %} -Learn more about sources from the [sources overview page](/docs/connections/sources/). +Learn more about Sources from the [Sources overview page](/docs/connections/sources/). ## Destinations @@ -22,7 +22,7 @@ Learn more about sources from the [sources overview page](/docs/connections/sour ### Reverse ETL With [Reverse ETL](/docs/connections/reverse-etl/), your data warehouse acts as your source, enabling you to send data from your warehouse to your destinations. -## Information on sources and destinations pages +## Information on Sources and Destinations pages The Sources and Destinations pages allow each user to decide what information appears in their personal view for each page. @@ -57,4 +57,4 @@ Sources without any enabled destinations are auto-disabled after 14 days. Howeve Segment understands there may be cases to keep a source active. If you'd like to add your sources to an exception list, you can do so by filling out this [Airtable form](https://airtable.com/shr7V9LFDZh31cYWW){:target="_blank"}. ### Can I request Segment add an integration tool? -Yes, you are able to submit an integration request here https://segment.com/requests/integrations/. +Yes, you are able to submit an integration request [here](https://segment.com/requests/integrations/). diff --git a/src/connections/spec/best-practices-identify.md b/src/connections/spec/best-practices-identify.md index 85b76c7844..fc0a43f42d 100644 --- a/src/connections/spec/best-practices-identify.md +++ b/src/connections/spec/best-practices-identify.md @@ -3,14 +3,14 @@ title: Best Practices for Identifying Users redirect_from: '/guides/how-to-guides/best-practices-identify/' --- -The most important calls you make with Segment are the [identify](/docs/getting-started/02-simple-install/#step-2-identify-users) and [track](/docs/getting-started/02-simple-install/#step-3-track-actions) calls. When you use these calls together, you can attribute actions on your site or app to individuals, and gain a better understanding of their activities, identity, and use patterns over time. Tracking users with the identify and track calls reduces the number of [Monthly Tracked Users](/docs/guides/usage-and-billing/mtus-and-throughput/) you are billed for. +The most important calls you make with Segment are the [Identify](/docs/getting-started/02-simple-install/#step-2-identify-users) and [Track](/docs/getting-started/02-simple-install/#step-3-track-actions) calls. When you use these calls together, you can attribute actions on your site or app to individuals, and gain a better understanding of their activities, identity, and use patterns over time. Tracking users with the Identify and Track calls reduces the number of [Monthly Tracked Users](/docs/guides/usage-and-billing/mtus-and-throughput/) that you are billed for. ## Identifying users -The Identify call specifies a customer identity that you can reference across the customer's lifetime. There are instances where you want to record information about a user that isn't already known to you. An example of this might be, a user that visits your site and doesn't register, but they do give you their email address through a newsletter email sign-up form. In this instance, you would record that email address as a trait, and for the identifier (ID), you would use anonymous ID. +The Identify call specifies a customer identity that you can reference across the customer's lifetime. There are instances where you want to record information about a user that isn't already known to you. An example of this might be, a user that visits your site and doesn't register, but they do give you their email address through a newsletter email sign-up form. In this instance, you would record that email address as a trait, and for the identifier (ID), you would use an anonymous ID. -When you make an [identify](/docs/connections/spec/identify) call using Segment's Analytics.js library, Segment saves the `userId` to the browser cookie, and writes all the user traits in `localStorage`. If you're using one of the Segment mobile libraries, the `userId` and traits are stored in the device's memory. This makes it possible to append the user's data to all subsequent [page calls](/docs/connections/sources/catalog/libraries/website/javascript#page) or [track calls](/docs/connections/sources/catalog/libraries/website/javascript#track) for the user, so you can properly attribute those actions. +When you make an [Identify](/docs/connections/spec/identify) call using Segment's Analytics.js library, Segment saves the `userId` to the browser cookie, and writes all the user traits in `localStorage`. If you're using one of the Segment mobile libraries, the `userId` and traits are stored in the device's memory. This makes it possible to append the user's data to all subsequent [Page calls](/docs/connections/sources/catalog/libraries/website/javascript#page) or [Track calls](/docs/connections/sources/catalog/libraries/website/javascript#track) for the user, so you can properly attribute those actions. If a user returns to your site after the [cookie expires](#id-expiration-and-overwriting), Analytics.js looks for an old ID in the user's `localStorage`, and if one is found, sets it as the user's ID again in a new cookie. If the user clears their cookies *and* `localStorage`, all of the IDs are removed and the user gets a completely new `anonymousId` when they next visit the page. @@ -18,37 +18,37 @@ Whenever possible, follow the Identify call with a Track event that records what ## AnonymousId generation -If you're using Segment's browser or mobile libraries, the Segment SDK generates and sets a UUID as `anonymousID` at the user's first visit to your site. That `anonymousId` is saved in the user's cookie, as well as localStorage, and will stick with that user until the cache is cleared or a `reset` call is triggered. +If you're using Segment's browser or mobile libraries, the Segment SDK generates and sets a UUID as `anonymousId` at the user's first visit to your site. That `anonymousId` is saved in the user's cookie, as well as localStorage, and will stick with that user until the cache is cleared or a `reset` call is triggered. You can use the `anonymousId` to link events performed by the user as they navigate around your website. When you track the `anonymousId`, you can attribute activities over multiple days to the same user by collecting all of the activities with that ID. If a user chooses to register for your site, or log in to your app, you can Identify them, and still include their `anonymousId` in the event payload along with the new `userId`. -If you use Segment's server libraries, you must generate an `anonymousId` manually. It can be any pseudo-unique identifier, for example, you might use a `sessionId` from a backend server. +If you use Segment's server libraries, you must generate an `` manually. It can be any pseudo-unique identifier, for example, you might use a `sessionId` from a backend server. ## Best options for userIds -Segment recommends that you use a unique user identifier (UUID) that won't change for your `userId`. A `userId` should be a robust, static, unique identifier that you recognize a user by in your own database systems. Because these IDs are consistent across a customer's lifetime, you should include a `userId` in Identify calls as often as you can. If you don't have a userId, you need to include an anonymousId in your Identify call in order to record identifying information about your user. +Segment recommends that you use a unique user identifier (UUID) that won't change for your `userId`. A `userId` should be a robust, static, unique identifier that you recognize a user by in your own database systems. You should include a `userId` in Identify calls as often as you can because these IDs are consistent across a customer's lifetime. If you don't have a userId, you need to include an anonymousId in your Identify call to record identifying information about your user. -Ideally, the `userId` could be a database ID. For example, if you're using MongoDB it might be a row identifier and look something like `507f191e810c19729de860ea`. These can also be [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier)s that you generate somewhere in your application. You can also use identifiers that you get from other tools - such as Shopify or Braze - however this approach can lead to extra complexity in your systems. +Ideally, the `userId` could be a database ID. For example, if you're using MongoDB it might be a row identifier and look something like _`507f191e810c19729de860ea`_. These can also be [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier){:target="_blank”}s that you generate somewhere in your application. You can also use identifiers that you get from other tools - such as Shopify or Braze - however this approach can lead to extra complexity in your systems. -Segment does **not** recommend using simple email addresses or usernames as a User ID, as these can change over time. Segment recommends that you use static IDs instead, so the IDs *never* change. When you use a static ID, you can still recognize the user in your analytics tools, even if the user changes their email address. And even better, you can link your analytics data with your own internal database. +We do **not** recommend using simple email addresses or usernames as a user ID, as these can change over time. We recommend that you use static IDs instead, so the IDs *never* change. When you use a static ID, you can still recognize the user in your analytics tools, even if the user changes their email address. You can also link your analytics data with your own internal database. -> success "" -> **Tip!** Even though Segment doesn't recommend using an email address or a username as a User ID, you can still send that identifying information in your Identify call as [traits](/docs/connections/spec/identify#traits). +> success "**Tip**" +> Though we don't recommend using an email address or a username as a user ID, you can still send that identifying information in your Identify call as a [trait](/docs/connections/spec/identify#traits). ## When to call Identify You should make an Identify call in the following situations: -- When the user provides any identifying information (such as a newsletter sign-up with email and name) -- When first you create a user (and so it is assigned a `userId`) -- When a user changes information in their profile -- When a user logs in -- *(Optional)* Upon loading any pages that are accessible by a logged in user +- When the user provides any identifying information (such as a newsletter sign-up with email and name.) +- When first you create a user (and so it is assigned a `userId`.) +- When a user changes information in their profile. +- When a user logs in. +- *(Optional)* Upon loading any pages that are accessible by a logged in user. -## Soft User Registration +## Soft user registration -An anonymous user visits the site for the very first time. The home page has the analytics.js tracking snippet loaded in its header. When the page loads, this sets off the default Page call to Segment. The Segment SDK generates and sets `anonymousId`. +An anonymous user visits the site for the very first time. The homepage has the analytics.js tracking snippet loaded in its header. When the page loads, this sets off the default Page call to Segment. The Segment SDK generates and sets `anonymousId`. ```js analytics.page({ @@ -60,7 +60,7 @@ analytics.page({ -You can see in this full page event, the `anonymousId` is populated, and the `userId` is null. +You can see in this full Page event, the `anonymousId` is populated, and the `userId` is null. ```js { @@ -101,7 +101,7 @@ You can see in this full page event, the `anonymousId` is populated, and the `us -The user signs up for an email newsletter and fills out the form giving you their first and last name, as well as their email address. At this point, you will fire off an Identify call. You won't yet assign them a user ID in this example, but you can still grab these traits about them. +The user signs up for an email newsletter and fills out the form giving you their first and last name, as well as their email address. At this point, you fire off an Identify call. You won't yet assign them a user ID in this example, but you can still grab these traits about them. ```js analytics.identify({ @@ -113,7 +113,7 @@ analytics.identify({ -You'll notice the Identify call contains no `userId`. These traits will be associated to the `anonymousId` that is available in the user's cookie and `localStorage`. +Notice the Identify call contains no `userId`. These traits are associated to the `anonymousId` that is available in the user's cookie and `localStorage`. ```js { @@ -160,9 +160,9 @@ You'll notice the Identify call contains no `userId`. These traits will be assoc -## Full User Registration +## Full user registration -An anonymous visitor registers for an account and becomes a known user. The account creation process allows you to assign a `userId` from your production database and capture additional traits. For this example, the `userId` that is assigned is "123abc". This is when you'll want to fire an Identify call with this user's newly assigned `userId` and additional traits. +An anonymous visitor registers for an account and becomes a known user. The account creation process allows you to assign a `userId` from your production database and capture additional traits. For this example, the `userId` that is assigned is _"123abc"_. This is when you want to fire an Identify call with this user's newly assigned `userId` and additional traits. ```js analytics.identify(`123abc`,{ @@ -179,7 +179,7 @@ analytics.identify(`123abc`,{ -After you fire the Identify call with the `userId`, you'll notice that the payload now has both a `userId` *and* an `anonymousId` attributed to the user. +After you fire the Identify call with the `userId`, notice that the payload now has both a `userId` *and* an `anonymousId` attributed to the user. ```js { @@ -232,7 +232,7 @@ After you fire the Identify call with the `userId`, you'll notice that the paylo ## Merging Identified and Anonymous user profiles -The illustration below shows a timeline with a user's interactions on a website, including sample API calls above that show Segment calls, and the user's `anonymousId` and `userId`. +The illustration shows a timeline with a user's interactions on a website, including sample API calls that show Segment calls and the user's `anonymousId` and `userId`. ![This timeline illustration shows three points at which a user interacts with a website (visits homepage, signs up for newsletter, and clicks demo request button) and the corresponding API calls Segment makes for each step](images/identify-bp-1.png) @@ -242,7 +242,7 @@ When the user first visits a page, Analytics.js automatically assigns the user a When a user signs up to create an account on the website, the `.identify("userId")` and `.track(“Signed Up”)` events fire, in that order. You pull the `userId` unique to the user from your systems, and send it to the Segment library so you can label that user's later events with their ID. The later Track call (“Signed Up”) contains both the `userId` *and* the automatically-collected `anonymousId` for the user, and any other information you capture about them - such as their first name, last name, and email address. -The example below shows an Identify call including user traits. It uses a database ID (`97980cfea0067`) as the `userId`. +The following example shows an Identify call including user traits. It uses a database ID (_`97980cfea0067`_) as the `userId`. ```js analytics.identify("97980cfea0067", { @@ -252,7 +252,7 @@ analytics.identify("97980cfea0067", { }); ``` -For a Track call, information about this event is stored either in the `context` field or in the event [properties](/docs/connections/spec/track#properties). The example below shows a Track call including properties that tell you about the user. +For a Track call, information about this event is stored either in the `context` field or in the event [properties](/docs/connections/spec/track#properties). This example shows a Track call including properties that tell you about the user. ```js analytics.track("Signed Up", { @@ -288,7 +288,7 @@ In this scenario, the person uses both a web browser, and a mobile application t #### Scenario #3 - Multi-day, multi-device, multiple logins -Similar to the previous scenario, the user accessed both your website and mobile application, and also logged in on both. In this case, both sessions on the web and mobile app receive the user's `userId`, so Segment can tie the anonymous activity on both web and mobile to this user. +Similar to the previous scenario, the user accessed both your website and mobile application, and also logged in on both. In this case, both sessions on the web and mobile app receive the user's `userId` so Segment can tie the anonymous activity on both web and mobile to this user. ![This timeline illustration shows two parallel paths: one for a user logging in to a desktop site, and one for a user logging into a mobile app, and the API calls Segment makes to identify the users](images/identify-bp-4.png) @@ -297,15 +297,15 @@ Similar to the previous scenario, the user accessed both your website and mobile Your data warehouse has a schema for each of your Segment sources. User information is stored in two tables in your source schemas - the `identifies` and `users` table. -The `identifies` table contains all of your identify events, and the timestamps for these events. Every time you make an Identify call, Segment adds the `userId`, `anonymousId`, any updated or added user traits from the call, as well as the timestamp of when the call was made. Your `identifies` table is your first stop when you have questions about users and their traits. +The `identifies` table contains all identify events and their timestamps. Every time you make an Identify call, Segment adds the `userId`, `anonymousId`, any updated or added user traits from the call, as well as the timestamp of when the call was made. The `identifies` table is a record of users and their traits. -The `users` table contains only unique Identify method calls, and is a collation of the `identifies` table. The `users` table is the single source of truth for a user's most up-to-date traits. +The `users` table contains only unique Identify method calls and is a collation of the `identifies` table. The `users` table maintains the most current traits for each user. -These tables only contain information about a user *once they have been identified.* However, you can still find information about an _anonymous_ user on the `pages`, `screens`, and `tracks` tables, as well as the individual track event tables. +These tables only contain information about a user *once they have been identified.* However, you can find information about an _anonymous_ user in the `pages`, `screens`, and `tracks` tables, as well as the individual track event tables. ## ID expiration and overwriting -The Segment ID cookie is set with a one year expiration. However, there are some ways an ID can be reset or overwritten: +The Segment ID cookie has a one-year expiration. An ID can be, however, reset or overwritten in specific instances: - If you call `reset` during a user's browser session, it removes both their `userId` and `anonymousId`, which means the user generates a new `anonymousId` on the next visit. - If the user manually clears their cookies and local storage, they generate a new `anonymousId` on the next visit. @@ -316,10 +316,10 @@ The Segment ID cookie is set with a one year expiration. However, there are some - If you generate a new `anonymousId` on a server library, and pass it from the server to the browser, this could overwrite the user's existing `anonymousId`. -> info "" -> Remember, if a user has multiple devices, they can have different `anonymousId`s on each different device. +> info "Note:" +> A user with multiple devices can have different `anonymousId`s on each different device. -## Linking server and client generated Ids +## Linking server and client generated IDs If you're tracking on the client and on the server, the `anonymousId` can be retrieved from `localStorage` on the client and passed to the server. You can access a user's anonymousId using the following call: @@ -333,33 +333,31 @@ analytics.user().anonymousId() ![At Login](https://user-images.githubusercontent.com/78389005/214199506-e0251c90-c702-4760-a4a7-5bcd9e5a13f8.png) ---> -If you're identifying on the server, then you will want to pass the user ID from the server to the client using an Identify call with the `anonymousId`. That will allow the `userId` to be aliased with the existing `anonymousId` and stored in the cookie in localStorage. With that, all previous anonymous activity and all subsequent activity is associated to the newly generated `userId`, as well as existing `anonymousId`s. +If you're identifying on the server, pass the userId from the server to the client using an Identify call with the `anonymousId`. This allows the `userId` to be aliased with the existing `anonymousId` and be stored in the cookie in localStorage. All previous anonymous activity and all subsequent activity is associated with the newly generated `userId` and any existing `anonymousId`s. -There are some advantages to sending details about your users directly from your server once the user registers. Server library [Identify calls](/docs/connections/spec/identify) are invisible to the end user, making them more secure, and much more reliable. Or, if you want to send user data that is sensitive or which you don't want to expose to the client, then you can make an Identify call from the server with all the traits you know about the user. More about [collecting data on the client or server](/docs/guides/how-to-guides/collect-on-client-or-server/#not-stored-in-your-database) in Segment's documentation. +There are some advantages to sending details about your users directly from your server once the user registers. Server library [Identify calls](/docs/connections/spec/identify) are invisible to the end user, making them more secure, and much more reliable. If you want to send user data that is sensitive or which you don't want to expose to the client, you can make an Identify call from the server with all the traits you know about the user. For more about collecting data on the client or serversee [Segment's documentation](/docs/guides/how-to-guides/collect-on-client-or-server/#not-stored-in-your-database). ### Aliasing from a server library If you plan to track anonymous visitors from the browser and only make [Identify calls](/docs/connections/spec/identify) from your server libraries, Kissmetrics and Mixpanel might require that you make an [Alias call](/docs/connections/spec/alias) to link the records. The Alias call links client-side anonymous visitors with server-identified users. This isn't recommended, but if you do this, read the [Kissmetrics](/docs/connections/destinations/catalog/kissmetrics/#aliasing-new-users-server-side) and [Mixpanel](/docs/connections/destinations/catalog/mixpanel/#alias-using-cloud-mode) specific [alias](/docs/connections/spec/alias) docs. -### Common questions +### FAQs -There are a few things that might cause your numbers to be off. - -#### Missing sign-ups +#### Why are sign-ups missing in reports? The most common problem people run into when tracking new user signups client-side is that only a portion of their new users are showing up in reports. -This is usually caused by the page redirecting or reloading before the tracking calls get a chance to run. Segment recommends that you make those calls from a welcome page after the user registers, rather than trying to squeeze in the tracking calls on the sign-up page itself. +This is usually caused by the page redirecting or reloading before the tracking calls get a chance to run. We recommend that you make those calls from a welcome page after the user registers, rather than trying to squeeze in the tracking calls on the sign-up page itself. -#### Anonymous history is lost +#### Why is anonymous history lost? This is usually only an issue in [Mixpanel](/docs/connections/destinations/catalog/mixpanel#alias), since it's the only destination that requires a call to [alias](/docs/connections/spec/alias) in the browser to link anonymous browsing history to a new identified user. -Remember that for destinations that require aliasing, you must make the [Alias call](/docs/connections/spec/alias) before you make the [Identify call](/docs/connections/spec/identify) for that user. Even if you make an [Identify call](/docs/connections/spec/identify) from a server library, it can't happen before the client-side [alias](/docs/connections/spec/alias). +For destinations that require aliasing, you must make the [Alias call](/docs/connections/spec/alias) before you make the [Identify call](/docs/connections/spec/identify) for that user. Even if you make an [Identify call](/docs/connections/spec/identify) from a server library, it can't happen before the client-side [alias](/docs/connections/spec/alias). #### Can you update a userId? -Unfortunately, there is no way to change an existing `userId` within Segment. Historical data with an existing `userId` remains the same, and a new `userId` will not replace the existing `userId` in Segment event call logs. For downstream destinations, consult the corresponding docs about user profile behaviors when using a new `userId`. +There is no way to change an existing `userId` within Segment. Historical data with an existing `userId` remains the same, and a new `userId` will not replace the existing `userId` in Segment event call logs. For downstream destinations, consult the corresponding docs about user profile behaviors when using a new `userId`. -Changing a `userId` is incredibly hard to do, as that is a fundamental part of analytics. While some downstream analytics tools let you change a `userId` once set, others don't and the process will be different for each tool. +Some downstream analytics tools let you change a `userId` once set, while others don't. The process is different for each tool. diff --git a/src/connections/spec/page.md b/src/connections/spec/page.md index ab039a7faf..1be62aeede 100644 --- a/src/connections/spec/page.md +++ b/src/connections/spec/page.md @@ -8,7 +8,7 @@ The Page call lets you record whenever a user sees a page of your website, along {% include components/reference-button.html href="https://university.segment.com/introduction-to-segment/299969?reg=1&referrer=docs" icon="media/academy.svg" title="Segment University: The Page Method" description="Check out our high-level overview of the Page method in Segment University. (Must be logged in to access.)" %} -**Note: In `analytics.js` a Page call is included in the snippet by default** just after `analytics.load`. Many destinations require this page event to be fired at least once per page load for proper initialization. You may add an optional `name` or `properties` to the default call, or call it multiple times per page load if you have a single-page application. +**Note: In `analytics.js` a Page call is included in the snippet by default**, just after `analytics.load`. Many destinations require a page event to be fired at least once per page load for proper initialization. You can add an optional `name` or `properties` object to the default call, or make a Page call multiple times per page load if you have a single-page application. Here's the payload of a typical Page call with most [common fields](/docs/connections/spec/common/) removed: @@ -101,4 +101,4 @@ Reserved properties Segment has standardized: | `url` | String | Page's full URL. Segment first looks for the canonical URL. If the canonical URL is not provided, Segment uses [`location.href`](https://developer.mozilla.org/en-US/docs/Web/API/Location){:target="_blank"} from the DOM API. | | `keywords` | Array [String] | A list/array of keywords describing the page's content. The keywords would most likely be the same as, or similar to, the keywords you would find in an HTML [meta](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meta#Attributes){:target="_blank"} tag for SEO purposes. This property is mainly used by content publishers that rely heavily on pageview tracking. This isn't automatically collected. | -**Note:** In [analytics.js](/docs/connections/sources/catalog/libraries/website/javascript/), Segment automatically sends the following properties: `title`, `path`, `url`, `referrer`, and `search`. +**Note:** In [Analytics.js](/docs/connections/sources/catalog/libraries/website/javascript/), Segment automatically sends the following properties: `title`, `path`, `url`, `referrer`, and `search`. diff --git a/src/engage/audiences/index.md b/src/engage/audiences/index.md index 2c0195c3b3..ab7acaf1e8 100644 --- a/src/engage/audiences/index.md +++ b/src/engage/audiences/index.md @@ -9,26 +9,23 @@ Audiences let you group users or accounts based on event behavior and traits tha You can build Audiences from core **tracking events**, **traits**, and **computed traits**. You can then sync Audiences to hundreds of [Destinations](/docs/connections/destinations/) or access them with the [Profile API](/docs/unify/profile-api). -## Building an Audience +## Building an audience -You can build an Audience from existing events, traits, computed traits, or other Audiences. +You can build an audience from existing events, traits, computed traits, or other Audiences. Editing an audience before the initial backfill is complete can create technical errors. - +When building your audience, the **Include Anonymous Users** checkbox determines which external IDs need to exist on a profile for Segment to include the user in the audience. For example: +- **Include Anonymous Users** _not_ selected: `user_id`, `email`, `android.idfa`, or `ios.idfa` would need to exist on a profile +- **Include Anonymous Users** selected: `user_id`, `email`, `android.idfa`, `ios.idfa`, or `anonymous_id` would need to exist on a profile -> info "" -> The **Include Anonymous Users** checkbox determines which external IDs need to exist on a profile for Segment to include the user in the audience: -> - **Include Anonymous Users** not selected: `user_id`, `email`, `android.idfa`, or `ios.idfa` -> - **Include Anonymous Users** selected: `user_id`, `email`, `android.idfa`, `ios.idfa`, or `anonymous_id` +> warning "Audience Keys" +> Avoid using the same Audience Key twice, even if you've deleted the original audience. -> warning "" -> Editing an audience before the initial backfill is complete can create technical errors. + -> warning "Audience Keys" -> Avoid using the same Audience Key twice, even if you've deleted the original Audience. ### Events -You can build an Audience from any events connected to Engage, including [Track](/docs/connections/spec/track), [Page](/docs/connections/spec/page), and [Screen](/docs/connections/spec/screen) calls. In the Audience builder, Page calls appear as `Page Viewed` and Screen calls appear as `Screen Viewed`. +You can build an audience from any events connected to Engage, including [Track](/docs/connections/spec/track), [Page](/docs/connections/spec/page), and [Screen](/docs/connections/spec/screen) calls. In the Audience builder, Page calls appear as `Page Viewed` and Screen calls appear as `Screen Viewed`. To refine the audience based on event properties, use the `+property` button: - The `name` property for Page and Screen calls appears in the Audience builder as `page_name` and `screen_name`, respectively. @@ -36,7 +33,7 @@ To refine the audience based on event properties, use the `+property` button: Select `and not who` to indicate users that have not performed an event. For example, you might want to look at all users that have viewed a product above a certain price point but not completed the order. -![Creating an Audience of users who viewed a product without buying it](/docs/engage/images/audience_builder.png) +![Creating an audience of users who viewed a product without buying it](/docs/engage/images/audience_builder.png) You can also specify two different types of time-windows, `within` and `in between`. The `within` property lets you specify an event that occurred in the last `x` number of days, while `in between` lets you specify events that occurred over a rolling time window in the past. A common use case is to look at all customers that were active 30 to 90 days ago, but have not completed an action in the last 30 days. @@ -60,7 +57,7 @@ You can also use computed traits in an audience definition. For example, you can #### SQL Traits -With SQL Traits, you can use data in your warehouse to build an audience. By running SQL queries on this warehouse data, you can import specific traits back into Segment to enhance both Segment audiences and the data you send to downstream destinations. +With SQL Traits, you can use data in your warehouse to build an audience. By running SQL queries on this warehouse data, you can import specific traits back into Segment to enhance both Segment Audiences and the data you send to downstream destinations. #### Audience memberships @@ -113,13 +110,13 @@ Dynamic Property references give you more flexibility over funnel audiences. Ins After configuring your audience definition, click the **Preview** button to review your audience setup. It shows the total number of profiles that match your criteria and a sample list of those profiles, helping you confirm the audience is correct before launching campaigns. Previews are only available if your audience uses historical data, displaying the current size based on past data. Learn more about the [Include Historical Data option](/docs/engage/audiences/#how-does-the-historical-data-flag-work). The audience grows as new profiles meet your criteria. Click any profile in the sample list to view a detailed side sheet with their attributes, making it easy to verify membership. This feature simplifies campaign planning and ensures your audience targets the right profiles. > info "" -> The audience preview membership is calculated using data that may be slightly delayed from real-time processing, which can lead to temporary discrepancies between the preview results and the profile information shown in the profile side sheet or via the Profile API. +> The audience preview membership is calculated using data that may be slightly delayed from real-time processing, which can lead to temporary discrepancies between the preview results and the profile information shown in the profile side sheet or the Profile API. #### Identifier breakdown -To check how profiles in your audience are identified, you can view them in the identifier breakdown. Click **Preview** to view your audience configuration. In the Preview results, navigate to the **Insights** tab to see a breakdown of the percentage of profiles associated with each external_id in the audience. These are the default IDs that Segment includes in the Identity resolution configuration. Segment displays the percentage of the audience with each identifier, which you can use to verify the audience size and profiles are correct. The identifier breakdowns on profiles doesn't update in real time. +To check how profiles in your audience are identified, you can view them in the identifier breakdown. Click **Preview** to view your audience configuration. In the Preview results, navigate to the **Insights** tab to see a breakdown of the percentage of profiles associated with each external_id in the audience. These are the default IDs that Segment includes in the Identity resolution configuration. Segment displays the percentage of the audience with each identifier, which you can use to verify the audience size and profiles are correct. The identifier breakdowns on profiles doesn't update in real time. > info "" -> The Identifier Breakdown doesn't show custom IDs included in the Identity resolution configuration unless those IDs are explicitly selected through [ID sync](/docs/engage/trait-activation/id-sync/). By default, Segment only displays external IDs in the breakdown. +> The identifier breakdown doesn't show custom IDs included in the Identity resolution configuration unless those IDs are explicitly selected through [ID sync](/docs/engage/trait-activation/id-sync/). By default, Segment only displays external IDs in the breakdown. #### Audience overlap To check how your audience intersects with others in your Segment space, click **Preview** to view your audience configuration. In the Preview results, navigate to the **Insights** tab where you can select an existing audience from the dropdown menu and click **Compute overlap** to see the number of shared profiles. This feature optimizes campaign targeting by identifying redundant audiences and refining segmentation. @@ -137,7 +134,7 @@ You can send audiences and computed traits to third-party services in Segment's Segment's Connections pipeline first collects and sends events from your Source to your destination. Built on top of Connections, Engage then uses the same source events to let you create Audiences and computed traits within Segment. You can then send the audience or computed trait you've built to your destinations. -See how you can [use Linked Audiences with Braze](/docs/engage/audiences/linked-audiences-braze/) and [Iterable](/docs/engage/audiences/linked-audiences-iterable/) to better understand how you can utilize Linked Audiences for your destinations. +See how you can [use Linked Audiences with Braze](/docs/engage/audiences/linked-audiences-braze/) and [Iterable](/docs/engage/audiences/linked-audiences-iterable/) to better understand how you can use Linked Audiences for your destinations. > info "" > Because Engage only sends audiences and computed traits to destinations, it doesn't replace a standard event pipeline. Connect a source directly to a destination if you want the destination to receive all events that Segment gathers. @@ -151,9 +148,9 @@ Once you've previewed your audience, you can choose to connect it to a destinati If you already have destinations set up in Segment, you can import the configuration from one of your existing sources to Engage. You can only connect one destination configuration per destination type. -When you create an audience, Segment starts syncing your audience to the destinations you selected. Audiences are either sent to Destinations as a boolean user-property or a user-list, depending on what the destination supports. Read more about [supported destinations](/docs/engage/using-engage-data/#compatible-engage-destinations) in the Engage documentation. +When you create an audience, Segment starts syncing your audience to the destinations you selected. Audiences are either sent to destinations as a boolean user-property or a user-list, depending on what the destination supports. Read more about [supported destinations](/docs/engage/using-engage-data/#compatible-engage-destinations) in the Engage documentation. -For account-level audiences, you can send either a [Group](/docs/connections/spec/group) call and/or [Identify](/docs/connections/spec/identify) call. Group calls will send one event per account, whereas Identify calls will send an Identify call for each user in the account. This means that even if a user hasn't performed an event, Segment will still set the account-level computed trait on that user. +For account-level audiences, you can send either a [Group](/docs/connections/spec/group) call and/or [Identify](/docs/connections/spec/identify) call. Group calls send one event per account, whereas Identify calls send an Identify call for each user in the account. This means that even if a user hasn't performed an event, Segment still sets the account-level computed trait on that user. Because most marketing tools are still based at the user level, it is often important to map this account-level trait onto each user within an account. See [Account-level Audiences](/docs/engage/audiences/account-audiences) for more information. @@ -166,12 +163,9 @@ For step-by-step instructions on how to connect an audience to a destination, se Because a number of factors (like system load, backfills, or user bases) determine the complexity of an audience, some compute times take longer than others. -As a result, **Segment recommends waiting at least 24 hours for an audience to finish computing** before you resume working with the audience. - -From the Overview page, you can view audience details including the current compute status and a progress bar for real-time and batch audiences. Engage updates the progress bar and status for real-time computations approximately every 10 minutes. +As a result, **Segment recommends waiting at least 24 hours for an audience to finish computing** before you resume working with the audience. Editing an audience before the initial backfill is complete can create technical errors. -> info "Viewing compute progress" -> When you create a real-time Audience, you'll see a progress bar, computed percentage, and status updates. For existing Audiences that you edit, Engage displays the compute status but not the progress bar or percentage. +From the Overview page, you can view audience details including the current compute status and a progress bar for real-time and batch audiences. Engage updates the progress bar and status for real-time computations approximately every 10 minutes. When you create a real-time audience, you'll see a progress bar, computed percentage, and status updates. For existing Audiences that you edit, Engage displays the compute status but not the progress bar or percentage. > warning "" > Engage syncs the Overview page for an individual audience more frequently than the Engage Audiences page (**Engage > Audiences**). As a result, you might see temporary discrepancies in Audience details, such as user counts, between these two pages. @@ -200,7 +194,7 @@ Engage displays the following compute statuses for Audiences and Traits. > warning "Starting June 2nd, 2025, disabled batch computations don't automatically backfill data when re-enabled" > If you disable and re-enable a batch computation, Segment does not automatically create a backfill. Any data Segment receives during the disabled period is not sent to your Destination after you re-enable your batch computation. If you want to backfill your data, you must reach out to [Segment Support](mailto:friends@segment.com) to request a resync. > -> Segment is releasing this feature on a phased rollout plan, and expects this to be available to all customers by July 18, 2025. +> Segment is releasing this feature on a phased rollout plan, and expects this to be available to all customers by September 12, 2025. @@ -238,7 +232,7 @@ To create a new audience or trait: While Engage is computing, use the Audience Explorer to see users or accounts that enter your Audience. Engage displays the audience as computing in the Explorer until at least one user or account enters. > warning "" -> [Facebook Custom Audiences](/docs/connections/destinations/catalog/personas-facebook-custom-audiences/), [Marketo Lists](/docs/connections/destinations/catalog/marketo-static-lists/), and [Adwords Remarking Lists](/docs/connections/destinations/catalog/adwords-remarketing-lists) impose rate limits on how quickly Segment can update an Audience. Segment syncs at the highest frequency allowed by the tool, which is between one and six hours. +> [Facebook Custom Audiences](/docs/connections/destinations/catalog/personas-facebook-custom-audiences/), [Marketo Lists](/docs/connections/destinations/catalog/marketo-static-lists/), and [Adwords Remarking Lists](/docs/connections/destinations/catalog/adwords-remarketing-lists) impose rate limits on how quickly Segment can update an audience. Segment syncs at the highest frequency allowed by the tool, which is between one and six hours. > info "Real-time and batch computation" > By default, Segment creates all audiences as real-time computations. However, some conditions require batch computation. For example, [funnel audiences](#funnel-audiences) can only be computed in batch mode. The Audience builder determines whether an audience is real-time or batch based on the conditions applied. @@ -256,14 +250,10 @@ To edit a realtime trait or audience: Engage then processes your realtime audience or trait edits. While the edit task runs, the audience remains locked and you can't make further changes. Once Engage incorporates your changes, you'll be able to access your updated audience or trait. -> warning "" -> If your audience includes historical event data (the **Include Historical Event Data** option is enabled), editing an audience creates a new backfill task. The backfill task and the edit task take longer to process if the audience is connected to a destination with rate limits. Rate-limited destinations dictate how fast Engage can backfill. View a list of [rate-limited destinations](/docs/engage/using-engage-data/#rate-limits-on-engage-event-destinations). - -> warning "" -> It's not possible to edit an audience to convert it from real-time to batch, or vice-versa. If the computation type needs to be changed, you will need to recreate the audience with the appropriate conditions. +It's not possible to edit an audience to convert it from real-time to batch, or vice-versa. If the computation type needs to be changed, you will need to recreate the audience with the appropriate conditions. You can't edit an audience to include anonymous users. If you need to include anonymous profiles, recreate the audience with the appropriate conditions. > warning "" -> You can't edit an audience to include anonymous users. If you need to include anonymous profiles, recreate the audience with the appropriate conditions +> If your audience includes historical event data (you enabled the **Include Historical Event Data** option), editing an audience creates a new backfill task. The backfill task and the edit task take longer to process if the audience is connected to a destination with rate limits. Rate-limited destinations dictate how fast Engage can backfill. View a list of [rate-limited destinations](/docs/engage/using-engage-data/#rate-limits-on-engage-event-destinations). ## Monitor the health of your audience syncs @@ -289,7 +279,7 @@ To view Delivery Overview for an audience: By default, Segment displays Delivery Overview information for all audiences connected to your destination. You can filter your Delivery Overview pipeline view by an individual audience for more granular data. -You can also further refine the data displayed on the pipeline view using the time picker and the metric toggle, located under the destination header. With the time picker, you can specify a time period (last 10 minutes, 1 hour, 24 hours, 7 days, 2 weeks, or a custom date range over the last two weeks) for which you’d like to see data. With the metric toggle, you can switch between seeing metrics represented as percentages (for example, _85% of events_ or _a 133% increase in events_) or as counts (_13 events_ or _an increase of 145 events_.) Delivery Overview shows percentages by default. +You can further refine the data displayed on the pipeline view using the time picker and the metric toggle, located under the destination header. With the time picker, you can specify a time period (last 10 minutes, 1 hour, 24 hours, 7 days, 2 weeks, or a custom date range over the last two weeks) for which you’d like to see data. With the metric toggle, you can switch between seeing metrics represented as percentages (for example, _85% of events_ or _a 133% increase in events_) or as counts (_13 events_ or _an increase of 145 events_.) Delivery Overview shows percentages by default. > info "Linked Audiences have additional filtering functionality" > Linked Audiences users can filter the Delivery Overview event pipeline by [Linked Audience events](/docs/engage/audiences/linked-audiences/#step-2c-define-how-and-when-to-trigger-an-event-to-your-destination). For more information, see the [Linked Audiences](/docs/engage/audiences/linked-audiences/#delivery-overview-for-linked-audiences) documentation. @@ -313,10 +303,7 @@ Create alerts related to the performance and throughput of audience syncs and re To access audience alerting, navigate to **Engage > Audiences**, select an audience, and click the **Alerts** tab. -On the **Alerts** tab, you can create new alerts and view all active alerts for this connection. You can only edit or delete the alerts that you create, unless you have the [Workspace Owner role](/docs/segment-app/iam/roles/). - -> info "Deleting alerts created by other users requires Workspace Owner role" -> All users can delete alerts that they created, but only those with [Workspace Owner role](/docs/segment-app/iam/roles/) can delete alerts created by other users. +On the **Alerts** tab, you can create new alerts and view all active alerts for this audience. You can only edit or delete the alerts that you create, unless you have the [Workspace Owner role](/docs/segment-app/iam/roles/). #### Activation event health spikes or drops @@ -391,14 +378,14 @@ You can download a copy of your Audience by visiting the Audiences overview page 1. Navigate to **Engage > Audiences**. 2. Select the Audience you'd like to download as a CSV, then click **Download CSV**. 3. Select the data fields that you'd like to include in your CSV as columns. -- Your CSV will contain all users in this audience with the selected fields. You can filter by `External ID`, `SQL trait`, `Computed Trait`, and `Custom Trait`. +- Your CSV contains all users in this audience with the selected fields. You can filter by `External ID`, `SQL trait`, `Computed Trait`, and `Custom Trait`. 4. Click **Next**. 5. Before you can download the CSV, you'll need to generate it. There are two different options for formatting: - **Formatted:** Displays external IDs and traits as distinct columns. - **Unformatted:** Contains the following columns: a user/account key, a JSON object containing the external IDs (optional, if selected), and a JSON object containing the traits (optional, if selected). 6. Click **Generate CSV**. -Once Segment generates the CSV, you can download the file directly. You'll receive an email notification of the CSV completion, with a URL to the Audience overview page. +Once Segment generates the CSV, you can download the file directly. You'll receive an email notification of the CSV completion, with a URL to the Audience overview page. Generating a CSV can take a substantial amount of time for large audiences. After you generate the CSV file, leave the modal window open while Segment creates the file. If the audience recalculates between when you click Generate and when you download the file, you might want to regenerate the file. The CSV is a snapshot from when you clicked Generate, and could be outdated. Note the following limits for the CSV downloader: - You can't download more than one CSV for the same audience at the same time. @@ -406,22 +393,18 @@ Note the following limits for the CSV downloader: - Each CSV represents a snapshot at a given point in time that references the data from the audience's most recent computational run. This applies to both real time and batch audiences, as the CSV is not updated in real time. To locate the snapshot's given point of time, click on the Download CSV button, and the popup modal will contain an information icon ℹ️, which when hovered over will reveal the snapshot's details. - ![CSV Snapshot details](https://github.com/user-attachments/assets/b7af772a-2ba7-4411-ba95-a913992f10ae) - -> info "" -> Generating a CSV can take a substantial amount of time for large audiences. After you generate the CSV file, leave the modal window open while Segment creates the file. (If the audience recalculates between when you click Generate and when you download the file, you might want to regenerate the file. The CSV is a snapshot from when you clicked Generate, and could be outdated.) - > warning "" -> You can't add account traits and identifiers using the CSV downloader with account level audiences. This is because every row listed in the CSV file is a user, and since account traits and identifiers only exist on accounts, they wouldn't exist as a user's custom trait and appear on the CSV. +> You can't add account traits and identifiers using the CSV downloader with account-level audiences. This is because every row listed in the CSV file is a user, and since account traits and identifiers only exist on accounts, they wouldn't exist as a user's custom trait and appear on the CSV. ## FAQ ### Why do I get a different user count when I use `$` on a field?** Segment recommends using the `$` operator when you deal with array properties. However, the `$` causes logical conditions to apply independently to each array entry independently. As a result, you'll get more accurate results by using the `equals one of` condition: -![$ operator](https://github.com/segmentio/segment-docs/assets/68755692/7b0b6923-a4ad-4290-8aa6-bbbc7cb1ee1b) +![A screenshot of the Audience builder with an equals one of condition present.](../images/audience-array.png) -### How do I populate multiple items off a list for an `equals one of` condition? ** -The audience builder accepts CSV and TSV lists. + ### Why am I receiving the error "The audience would create a cycle by referencing another audience"? diff --git a/src/engage/images/audience-array.png b/src/engage/images/audience-array.png new file mode 100644 index 0000000000..3d419f907c Binary files /dev/null and b/src/engage/images/audience-array.png differ diff --git a/src/engage/journeys/v2/event-triggered-journeys-steps.md b/src/engage/journeys/v2/event-triggered-journeys-steps.md index 5115506dd0..df6c4e2b34 100644 --- a/src/engage/journeys/v2/event-triggered-journeys-steps.md +++ b/src/engage/journeys/v2/event-triggered-journeys-steps.md @@ -31,7 +31,7 @@ The following table explains the parameters you can configure for the Hold Until | Parameter | Details | | --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -| Branches | Configure up to 4 event branches, each tied to a specific event and optional event property filters.
Events must share a unique identifier with the entry event if the journey allows re-entry.
Branches must be mutually exclusive to avoid validation errors. | +| Branches | Configure up to 9 event branches, each tied to a specific event and optional event property filters.
Events must share a unique identifier with the entry event if the journey allows re-entry.
Branches must be mutually exclusive to avoid validation errors. | | Filters | Event properties refine the triggering conditions for a branch. | | Maximum hold duration | The fallback branch activates after the hold period, ranging from 5 minutes to 182 days (about 6 months) | @@ -136,38 +136,45 @@ To configure the Delay step: ## Data split -The **Data split** step sends profiles down different branches based on audience membership or profile traits. This lets you personalize how users move through a journey, like sending different messages to new users instead of returning customers, or targeting re-engagement campaigns based on inactivity. +The **Data split** step sends profiles down different branches based on event property values, audience membership, or profile traits. This lets you personalize how users move through a journey, like: -Data split is useful when you want to take different actions based on what you already know about the user, rather than waiting for a new event. For example, you might use it to separate users who haven’t purchased in 30 days from those who lapsed 90 days ago, or from users who are still actively engaged. +1. Sending different messages to new users instead of returning customers. +2. Personalizing campaigns based on user membership tier. +3. Sending different discount codes based on a user's total cart value. + +Data split is useful when you want to take different actions based on what you already know about the user or event properties, rather than waiting for a new event. For example, you might use it to separate users who haven’t purchased in 30 days from those who lapsed 90 days ago, or from users who are still actively engaged. ### How Data split works When a profile reaches a Data split step: -1. Segment checks whether the profile matches the first branch’s conditions. +1. Segment checks whether the event properties or profile data matches the first branch’s conditions. 2. If not, it checks the next branch, and so on, in the order shown in the journey. -3. The profile moves down the first branch it qualifies for. Each profile can only follow one branch. +3. The journey instance moves down the first branch it qualifies for. Each profile can only follow one branch. +4. If none of the logic branches resolve to true, it goes down the everyone else branch. ### Configuration options -You can configure up to five branches in a Data split step. Each branch can have one or more conditions: +You can configure up to nine branches in a Data split step. Each branch can have one or more conditions: -| Condition type | Description | -| -------------------- | ------------------------------------------------------------------------- | -| With trait | The profile includes a specific trait and value. | -| Without trait | The profile does not include a specific trait. | -| Part of audience | The profile is a member of a selected audience at the time of evaluation. | -| Not part of audience | The profile is not a member of a selected audience. | +| Condition type | Description | +| -------------------- | ----------------------------------------------------------------------------------------------------------------| +| With trait | The profile includes a specific trait and value. | +| Without trait | The profile does not include a specific trait. | +| Part of audience | The profile is a member of a selected audience at the time of evaluation. | +| Not part of audience | The profile is not a member of a selected audience. | +| With journey context | The event properties in context (from triggering or hold until events) match conditions. | You can also give branches uniques name to differentiate them from each other on the journey canvas. > info "Evaluation is sequential" > Segment evaluates branches in the order they appear in the configuration side sheet. If a profile qualifies for multiple branches, Segment sends it down the first one it matches. Profiles can't qualify for more than one branch, and Segment doesn't wait for audience membership to update after the profile enters the step. You can change the evaluation order by dragging branches up or down in the configuration side sheet. -### Example: Target different customer types +### Example: Target different customer types or event properties -You can use a Data split to branch profiles based on traits or audience membership that already exist on the profile when it reaches this step. For example: +You can use a Data split to branch profiles based on event properties, traits, or audience membership that already exist on the profile when it reaches this step. For example: +- Journey instances where the triggering event had a `transaction_total` > $100 are sent specific messaging about their high-ticket purchase. - Profiles with a known `email_subscription_status` trait get treated as existing customers. - Profiles that belong to a `VIP` audience are routed down a separate path for high-value users. - Profiles with a specific set of traits (like favorite color and a known name) can receive personalized messaging. diff --git a/src/getting-started/02-simple-install.md b/src/getting-started/02-simple-install.md index c4bf93f93e..8cb42d55e3 100644 --- a/src/getting-started/02-simple-install.md +++ b/src/getting-started/02-simple-install.md @@ -2,28 +2,26 @@ title: A Basic Segment Installation --- - When you implement Segment, you add Segment code to your website, app, or server. This code generates messages based on specific triggers you define. - -In a basic implementation, the code can be a snippet of JavaScript that you copy and paste into the HTML of a website to track page views. It can also be as complex as Segment calls embedded in a React mobile app to send messages when the app is opened or closed, when the user performs different actions, or when time based conditions are met (for example "ticket reservation expired" or "cart abandoned after 2 hours"). +In a basic implementation, the code can be a snippet of JavaScript that you copy and paste into the HTML of a website to track page views. It can also be as complex as Segment calls embedded in a React mobile app to send messages when the app is opened or closed, when the user performs different actions, or when time based conditions are met, for example "ticket reservation expired" or "cart abandoned after 2 hours". The best way to learn about how Segment works is to see it in action. This tutorial walks you through an installation using one of Segment's libraries: JavaScript, PHP, or the iOS library. -## Before you begin +## Prerequisites Before you start your Segment implementation, you need: 1. A Segment user account and a workspace. If you're not already part of an organization with a Segment Workspace, you can [sign up for a free account and workspace](https://app.segment.com/signup/?ref=docs). 2. Access to the code for a basic website, PHP website, or an iOS app. > success "" -> **Tip**! If you don't have any of those things, consider creating a simple [GitHub Pages website](https://pages.github.com/). +> If you don't have any of those things, consider creating a simple [GitHub Pages website](https://pages.github.com/). ### Create separate dev and prod sources -When you develop and test sources, Segment recommends you to create and use separate sources for each of your environments (production, development, staging) to prevent testing and development activities from filling production systems with invalid data. +When you develop and test sources, we recommend you create and use separate sources for each of your environments (production, development, staging) to prevent testing and development activities from filling production systems with invalid data. -You can give each source an environment label when you create it, and Segment strongly suggests that you use these labels to sort your sources. When you create a source during the steps below, make sure you enter an environment label. +You can give each source an environment label when you create it, and we strongly suggest that you use these labels to sort your sources. When you create a source during the steps below, make sure you enter an environment label. > warning "" > Double-check when you enter write keys for dev and production environments to make sure that you send the right data to the right place. @@ -35,8 +33,8 @@ To create a Segment source: 1. Go to your Segment workspace, and navigate to [the Sources catalog](https://app.segment.com/goto-my-workspace/sources/catalog). 2. Select your source. You can choose from either the [Javascript source](https://app.segment.com/goto-my-workspace/sources/catalog/javascript), the [PHP source](https://app.segment.com/goto-my-workspace/sources/catalog/php), or the [iOS source](https://app.segment.com/goto-my-workspace/sources/catalog/ios). 3. Click **Add Source**. -4. Enter a name for the source. Segment recommends that you include the word `demo`, `test`, or `quickstart` in the name so you can easily find and delete this source later. -5. *(Optional)* Add an Environment label of `dev` to the source in the **Labels** field. Segment recommends you do this so that you know this demo source isn't part of a production installation. +4. Enter a name for the source. We recommend that you include the word `demo`, `test`, or `quickstart` in the name so you can easily find and delete this source later. +5. *(Optional)* Add an Environment label of `dev` to the source in the **Labels** field. We recommend you do this so that you know this demo source isn't part of a production installation. 6. *(Optional)* Add the website URL. Segment provides this field so that you can flag the website being tracked to the source. Segment does not use this URL anywhere else. ## Find your write key @@ -47,20 +45,20 @@ To find your write key: 1. Go to **Connections > Sources** and select your source. 2. Click the **Settings** tab for the source and click **API Keys**. -Make note of or write down your write key, as you'll need it in the next steps. +Make note of the write key, as you'll need it in the next steps. Any time you change a library's settings in the Segment App, the write key regenerates. ![Screenshot of a source's settings page, with the API Keys tab selected.](/docs/connections/images/find_writekey.png) > info "" -> [Cloud-sources](/docs/connections/sources/about-cloud-sources/) do not have write keys, as they use a token or key from your account with that service. Cloud-sources have other considerations and aren't part of this tutorial. +> [Cloud-sources](/docs/connections/sources/about-cloud-sources/) do not have write keys as they use a token or key from your account with that service. Cloud-sources have other considerations and aren't part of this tutorial. ## Installing Segment -Click a tab below to see the tutorial content for the specific library you chose. +Click a tab to see the tutorial content for the specific library you chose. {% codeexample %} {% codeexampletab Javascript quickstart %} @@ -68,7 +66,7 @@ Click a tab below to see the tutorial content for the specific library you chose -### Step 1: Copy the Snippet +### Step 1: Copy the snippet
Navigate to **Connections > Sources > JavaScript** in the Segment app, copy the snippet from the JavaScript Source overview page, and paste it into the `` tag of your site.

@@ -76,16 +74,17 @@ That snippet loads Analytics.js onto the page _asynchronously_, so it won't affe

> info "" -> The Segment snippet version history available on [GitHub](https://github.com/segmentio/snippet/blob/master/History.md){:target="_blank"}. Segment recommends that you use the latest snippet version whenever possible. +> The Segment snippet version history available on [GitHub](https://github.com/segmentio/snippet/blob/master/History.md){:target="_blank"}. We recommend that you use the latest snippet version whenever possible.
-### Step 2: Identify Users + +### Step 2: Identify users
-The `identify` method is how you tell Segment who the current user is. It includes a unique User ID and any optional traits you know about them. You can read more about it in the [identify method reference](/docs/connections/sources/catalog/libraries/website/javascript#identify). +The [Identify](/docs/connections/spec/identify/) method tells Segment who the current user is. It includes a unique user ID and any optional traits you know about them. You can read more about it in the [Identify method reference](/docs/connections/sources/catalog/libraries/website/javascript#identify).

> info "You don't need to call `identify` for anonymous visitors to your site" -> Segment automatically assigns them an `anonymousId`, so just calling `page` and `track` works just fine without `identify`. -

+> Segment automatically assigns them an `anonymousId` so just calling `page` and `track` works without `identify`. +
Here's an example of what a basic call to `identify` might look like: ```js @@ -95,9 +94,9 @@ analytics.identify('f4ca124298', { }); ```
-This identifies Michael by his unique User ID (in this case, `f4ca124298`, which is what you know him by in your database) and labels him with `name` and `email` traits. When you put that code on your site, you need to replace those hard-coded trait values with the variables that represent the details of the currently logged-in user. +This identifies Michael by his unique userId, in this case, _`f4ca124298`_, which is what you know him by in your database. He is labelled with `name` and `email` traits. When you put that code on your site, you need to replace those hard-coded trait values with the variables that represent the details of the currently logged-in user.

-To do that, Segment recommends 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. +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.

Depending on your templating language, your actual identify call might look something like this: @@ -116,9 +115,10 @@ With that call in your page footer, you successfully identify every user that vi > You've completed a basic CRM set up. Return to the Segment app to enable Salesforce, Intercom, or your CRM system of choice and Segment starts sending all of your user data to it.
-### Step 3: Track Actions + +### Step 3: Track actions
-The `track` method is how you tell Segment about the actions your users are performing on your site. Every action triggers what Segment calls an "event", which can also have associated properties. You can read more about `track` in the [track method reference](/docs/connections/sources/catalog/libraries/website/javascript#track). +The [Track](/docs/connections/spec/track) method tells Segment about the actions your users are performing on your site. Every action triggers an "event", which can also have associated properties. You can read more about `track` in the [Track method reference](/docs/connections/sources/catalog/libraries/website/javascript#track).

Here's an example of what a call to `track` might look like when a user signs up: @@ -140,9 +140,9 @@ analytics.track('Article Bookmarked', { }); ```
-If you're just getting started, some of the events you should track are events that indicate the success of your site, like **Signed Up**, **Item Purchased** or **Article Bookmarked**. Segment recommends that you track a few important events as you can always add more later. +If you're just getting started, some of the events you should track are events that indicate the success of your site, like **Signed Up**, **Item Purchased** or **Article Bookmarked**. We recommend that you track a few important events as you can always add more later.

-Once you add a few `track` calls, you're done with setting up Segment. You successfully installed Analytics.js tracking. Now you're ready to turn on any destination you like from the Segment App. +Once you add a few Track calls, you're done with setting up Segment. You successfully installed Analytics.js tracking. Now you're ready to turn on any destination you like from the Segment App. @@ -158,7 +158,8 @@ Once you add a few `track` calls, you're done with setting up Segment. You succe ### Step 1: Install the SDK
-To install Analytics-iOS, Segment recommends you to use [CocoaPods](http://cocoapods.org){:target="_blank"}, because it allows you to create a build with specific bundled destinations, and because it makes it simple to install and upgrade. +To install Analytics-iOS, we recommend you to use [CocoaPods](http://cocoapods.org){:target="_blank"}, because it allows you to create a build with specific bundled destinations and it simplifies installation and upgrading. +

1) Add the `Analytics` dependency to your `Podfile` by adding the following line: @@ -176,7 +177,7 @@ configuration.recordScreenViews = YES; // Enable this to record screen views aut ```
> success "" -> You don't _need_ to use initialization config parameters to track lifecycle events (`Application Opened`, `Application Installed`, `Application Updated`) and screen views automatically, but Segment highly recommends that you do, so you can start off already tracking some important core events. +> You don't _need_ to use initialization config parameters to track lifecycle events (`Application Opened`, `Application Installed`, `Application Updated`) and screen views automatically, but we highly recommend that you do, so that you can start off already tracking some important core events.
3) Import the SDK in the files that you use it by adding the following line: @@ -185,18 +186,22 @@ configuration.recordScreenViews = YES; // Enable this to record screen views aut #import ```
-#### Bundling Client Side SDKs +#### Bundling client-side SDKs +
To keep the Segment SDK lightweight, the `Analytics` pod only installs the Segment library. This means all of the data goes first to Segment's servers, and is then forwarded to any destination tools which accept the data _from Segment_. -

+
+
Some destinations don't accept data from the Segment servers, and instead require that you collect the data from the device. In these cases you must bundle some additional destination code with the Segment SDK. This document skips over this part, but you can see the instructions on [how to bundle the destination tools](/docs/connections/sources/catalog/libraries/mobile/ios/#about-mobile-connection-modes). -

+
+
Now that the SDK is installed and set up, you're ready to start making calls.

-### Step 2: Identify Users -
-The `identify` method is how you tell Segment who the current user is. It takes a unique User ID, and any optional traits you know about them. You can read more about it in the [identify reference](/docs/connections/sources/catalog/libraries/mobile/ios#identify). + +### Step 2: Identify users
+The [Identify](/docs/connections/spec/identify/) method tells Segment who the current user is. It takes a unique user ID and any optional traits you know about them. You can read more about it in the [Identify reference](/docs/connections/sources/catalog/libraries/mobile/ios#identify). +

Here's an example of what a basic call to `identify` might look like: ```objc @@ -205,15 +210,17 @@ Here's an example of what a basic call to `identify` might look like: @"email": @"mbrown@example.com" }]; ```
-This call identifies Michael by his unique User ID (`f4ca124298`, which is the one you know him by in your database) and labels him with `name` and `email` traits. +This call identifies Michael by his unique user ID, `f4ca124298`, which is the one you know him by in your database, and labels him with `name` and `email` traits.

> info "" -> When you put the above code in your iOS app, you would replace those hard-coded trait values with variables that represent the details of the user that's currently signed in. -

-### Step 3: Track Actions +> When you put the code in your iOS app, replace the hard-coded trait values with variables that represent the details of the user that's currently signed in.
-The `track` method is how you tell Segment about the actions your users are performing in your app. Every action triggers what we call an "event", which can also have associated properties. You can read more about `track` in the [track method reference](/docs/connections/sources/catalog/libraries/mobile/ios#track). +### Step 3: Track actions +
+The [Track](/docs/connections/spec/track) method tells Segment about the actions your users are performing in your app. Every action triggers an "event", which can also have associated properties. You can read more about `track` in the [Track method reference](/docs/connections/sources/catalog/libraries/mobile/ios#track). +
+
The Segment iOS SDK can automatically track a few important common events, such as **Application Installed**, **Application Updated**, and **Application Opened**. You can enable this option during initialization by adding the following lines: ```objc @@ -224,14 +231,14 @@ configuration.trackApplicationLifecycleEvents = YES;
You should also track events that indicate success in your mobile app, like **Signed Up**, **Item Purchased**, or **Article Bookmarked**. Segment recommends that you track a few important events as you can always add more later.

-Here's what a `track` call might look like when a user signs up: +Here's what a Track call might look like when a user signs up: ```objc [[SEGAnalytics sharedAnalytics] track:@"Signed Up" properties:@{ @"plan": @"Enterprise" }]; ```
-This tells us that your user triggered the **Signed Up** event, and chose your hypothetical `'Enterprise'` plan. +This tells Segment that your user triggered the **Signed Up** event, and chose your hypothetical `'Enterprise'` plan.

Properties can be anything you want to record, for example: @@ -243,7 +250,7 @@ Properties can be anything you want to record, for example: @"author": @"John Branch" }]; ```
-Once you've added a few `track` calls, you're all set. You successfully instrumented your app, and can enable destinations from your Segment workspace. +Once you've added a few Track calls, you're all set. You successfully instrumented your app, and can enable destinations from your Segment workspace. @@ -259,7 +266,7 @@ Once you've added a few `track` calls, you're all set. You successfully instrume
To install the library:

-1) Clone the repository from GitHub into your desired application directory. (If you're a composer user, [you can use this](https://packagist.org/packages/segmentio/analytics-php).) +1) Clone the repository from GitHub into your desired application directory. If you're a Composer user, see the [Segment PHP Analystics package](https://packagist.org/packages/segmentio/analytics-php){:target="_blank"}. ```bash git clone https://github.com/segmentio/analytics-php /my/application/folders/ @@ -272,7 +279,7 @@ require_once("/path/to/analytics-php/lib/Segment.php"); use Segment\Segment; ```
-3) In your initialization script, make the following call (In the example, Segment first renames this module to `Analytics` for convenience): +3) In your initialization script, make the following call. In the example, Segment first renames this module to `Analytics` for convenience: ```php # Set up our Segment tracking and @@ -281,20 +288,21 @@ class_alias('Segment', 'Analytics'); Segment::init("YOUR_WRITE_KEY"); ```
-4) Replace `YOUR_WRITE_KEY` with the actual write key, which you can find in Segment under your project settings. Otherwise, all that data goes straight to `/dev/null`. +4) Replace _`YOUR_WRITE_KEY`_ with the actual write key, which you can find in Segment under your project settings. Otherwise, all that data goes straight to `/dev/null`.

-You only need to call `init` once when your php file is requested. All of your files then have access to the same `Analytics` client. - - +You only need to call `init` once when your PHP file is requested. All of your files then have access to the same `Analytics` client. +
+
> info "" -> Segment's default PHP consumer is the [libcurl consumer](/docs/connections/sources/catalog/libraries/server/php/#lib-curl-consumer). If this is not working well for you or if you have a high-volume project, you might try one of Segment's other consumers like the [fork-curl consumer](/docs/connections/sources/catalog/libraries/server/php/#fork-curl-consumer). +> Segment's default PHP consumer is the [libcurl consumer](/docs/connections/sources/catalog/libraries/server/php/#lib-curl-consumer). If this is not working well for you or if you have a high-volume project, try one of Segment's other consumers like the [fork-curl consumer](/docs/connections/sources/catalog/libraries/server/php/#fork-curl-consumer).
-### Step 2: Identify Users + +### Step 2: Identify users
-The [`identify`](/docs/connections/spec/identify) method is how you tell Segment who the current user is. It includes a unique User ID and any optional traits that you might know about them. +The [Identify](/docs/connections/spec/identify) method tells Segment who the current user is. It includes a unique user ID and any optional traits that you might know about them.

-Here's what a basic call to [`identify`](/docs/connections/spec/identify) might look like: +Here's what a basic call to `identify` might look like: ```php Segment::identify(array( @@ -306,11 +314,12 @@ Segment::identify(array( )); ```
-This identifies Michael by his unique User ID (in this case, `f4ca124298`, which is what you know him by in your database) and labels him with `name` and `email` traits. - +This identifies Michael by his unique user ID, in this case, `f4ca124298`, which is what you know him by in your database, and labels him with `name` and `email` traits. +
+
> info "" -> When you actually put that code on your site, you need to replace those hard-coded trait values with the variables that represent the details of the currently logged-in user. The easiest way in PHP is to keep a `$user` variable in memory. - +> When you put that code on your site, replace the hard-coded trait values with the variables that represent the details of the currently logged-in user. We recommend you keep a `$user` variable in memory. +
```php Segment::identify(array( "userId" => $user->id, @@ -323,14 +332,15 @@ Segment::identify(array(
With that call on the page, you're now identifying every user that visits your site.

-If you only want to use a basic CRM set up, you can stop here. Just enable Salesforce, Intercom, or any other CRM system from your Segment workspace, and Segment starts sending all of your user data to it. +If you only want to use a basic CRM set up, you can stop here. Enable Salesforce, Intercom, or any other CRM system from your Segment workspace, and Segment starts sending all of your user data to it.
-### Step 3: Track Actions + +### Step 3: Track actions
-The `track` method is how you tell Segment about the actions your users are performing on your site. Every action triggers what Segment calls an "event", which can also have associated properties. +The [Track](/docs/connections/spec/track/) method tells Segment about the actions your users are performing on your site. Every action triggers an "event", which can also have associated properties.

-Here's what a call to [`track`](/docs/connections/spec/track/) might look like when a user signs up: +Here's what a call to `track` might look like when a user signs up: ```php Segment::track(array( @@ -360,18 +370,20 @@ Segment::track(array(
If you're just getting started, some of the events you should track are events that indicate the success of your site, like **Signed Up**, **Item Purchased** or **Article Bookmarked**.

-To get started, Segment recommends you to track track a few important events as you can always add more later. +To get started, we recommend you track a few important events as you can always add more later.
+ ### Step 4: Flush the data
-Call the Segment `flush()` method. This manually sends all the queued call data to make sure it makes it to the Segment servers. This is normally done automatically by the runtime, but some PHP installations won't do it for you, so it's worth calling at the end of your script, just to be safe. +Call the Flush method. This manually sends all the queued call data to make sure it makes it to the Segment servers. This is normally done automatically by the runtime, but some PHP installations won't do it for you. +

```php Segment::flush(); ``` - -You've successfully installed PHP tracking. Now you're ready to turn on any destination from the Segment App. +
+You've now installed PHP tracking and you're ready to turn on any destination from the Segment App. @@ -379,7 +391,6 @@ You've successfully installed PHP tracking. Now you're ready to turn on any dest {% endcodeexample %} - ## Test that it's working Once you've set up your Segment library, and instrumented at least one call, you can look at the Debugger tab for the Source to check that it produces data as you expected. @@ -391,7 +402,7 @@ The Source Debugger is a real-time tool that helps you confirm that API calls ma The Debugger is separate from your workspace's data pipeline, and is not an exhaustive view of all the events ever sent to your Segment workspace. The Debugger only shows a sample of the events that the Source receives in real time, with a cap of 500 events. The Debugger is a great way to test specific parts of your implementation to validate that events are being fired successfully and arriving to your Source. > success "" -> **Tip**: To see a more complete view of all your events, you might consider setting up either a [warehouse](/docs/connections/storage/warehouses/) or an [S3 destination](/docs/connections/storage/catalog/amazon-s3/). +> To see a more complete view of all your events, consider setting up either a [warehouse](/docs/connections/storage/warehouses/) or an [S3 destination](/docs/connections/storage/catalog/amazon-s3/). The Debugger shows a live stream of sampled events arriving at the Source, but you can also toggle from "Live" to "Pause" to stop the stream and prevent it from displaying new events. Events continue to arrive to your Source while you Pause the stream, they just are not displayed. @@ -407,15 +418,15 @@ Two views are available when viewing a payload: ## Set up your first destination -Once you're satisfied that data is arriving from your new source, it's time to set up your first destination! As long as you have `page` or `screen` data coming from the source, you can quickly enable Google Analytics to look at the page view statistics. +Once you're satisfied that data is arriving from your new source, it's time to set up your first destination. As long as you have `page` or `screen` data coming from the source, you can enable Google Analytics to look at the page view statistics. If you don't have a Google Analytics account, you can either set up a free account, or look at the Destination Catalog for a different destination to enable. -You'll need a tracking ID for Google Analytics (either a "website" or "serverside" tracking ID), or another API key if you're substituting another destination. Make a note of this ID or key as you'll need it to connect your destination. +You need a tracking ID for Google Analytics (either a "website" or "serverside" tracking ID), or another API key if you're substituting another destination. Make a note of this ID or key as you need it to connect your destination. To set up your first destination: -1. Go to your Segment workspace, click **Destinations**, and click **Add Destination** to go to the [Catalog](https://app.segment.com/goto-my-workspace/destinations/catalog). +1. Go to your Segment workspace, click **Destinations**, and click **Add Destination** to go to the [Catalog](https://app.segment.com/goto-my-workspace/destinations/catalog){:target="_blank"}. 2. Search for the destination you want to add. In this case, search for `Google Analytics`. 3. Click the tile for the destination to see information about it. 4. Click **Configure Google Analytics**. @@ -426,12 +437,12 @@ To set up your first destination: -Congratulations! Data is now flowing from the source you set up, to the first destination. Do some test browsing on your site or app, then log in to your downstream tool to see the data in place. +Data is now flowing from the source you set up, to the first destination. Do some test browsing on your site or app, then log in to your downstream tool to see the data in place. You can click around and load pages to see your Segment calls in action, watch them arrive in the Debugger, and see them arrive in the destination tool. > warning "" -> **Note:** When you're done with this test source and destination, you can delete them. This prevents you from getting unplanned "demo" data in your production environment later. +> **Note**: When you're done with this test source and destination, you can delete them. This prevents you from getting unplanned "demo" data in your production environment later. diff --git a/src/getting-started/index.md b/src/getting-started/index.md index 738013b746..62865a3e84 100644 --- a/src/getting-started/index.md +++ b/src/getting-started/index.md @@ -4,9 +4,9 @@ title: What is Segment? -With Segment, you can collect, transform, send, and archive your [first-party customer data](https://segment.com/books/customer-data/first-party-data/). Segment simplifies the process of collecting data and connecting new tools, allowing you to spend more time using your data, and less time trying to collect it. You can use Segment to track events that happen when a user interacts with the interfaces. "Interfaces" is Segment's generic word for any digital properties you own: your website, mobile apps, and processes that run on a server or OTT device. +With Segment, you can track [first-party customer data](https://segment.com/learn/download/fundamentals-first-party-data/){:target="_blank”}, like interactions with your websites, mobile apps, and processes that run on a server or OTT device, and can send that data, either as individual events or as an aggregate view of a customer's behavior, downstream to different business tools. -When you capture interaction data in Segment, you can send it (often in real-time) to your marketing, product, and analytics tools, as well as to data warehouses. In most cases, you won't even need to touch your tracking code to connect to new tools. +Segment simplifies the process of collecting data and connecting new tools, allowing you to spend more time using your data and less time trying to collect, process, and share it with business tools. In most cases, you won't even need to touch your tracking code to connect to new tools.
diff --git a/src/unify/Traits/computed-traits.md b/src/unify/Traits/computed-traits.md index b5bde17b2e..f56accfa57 100644 --- a/src/unify/Traits/computed-traits.md +++ b/src/unify/Traits/computed-traits.md @@ -18,7 +18,7 @@ Computed Traits allow you to quickly create user or account-level calculations t {% include content/trait-types.md %} -## Types of Computed Traits +## Types of computed traits Segment currently supports the following types of computed traits: - [Types of Computed Traits](#types-of-computed-traits) @@ -41,7 +41,7 @@ Segment currently supports the following types of computed traits: > warning "Event Properties per Computed Trait limit" > Segment limits the number of Event Properties on each Computed trait to 10,000. If your Computed Trait exceeds this limit, Segment will not persist any new Event Properties and will drop new trait keys and corresponding values. -### Event Counter +### Event counter An Event Counter trait stores a count of an **event** over a period of time. For example, you can create a trait called `number_logins_90_days` based on a `User Logged In` event. You can also use event properties to only specific types of events. @@ -69,9 +69,9 @@ Account-level use cases ![An aggregation trait run over the course of 90 days](../images/1525835663131.png) -### Most Frequent +### Most frequent -A most frequent user-level computed trait will return the **most common value** for an **event property**. This is helpful to create traits like `preferred_product_viewed` or `most_commonly_viewed_category` that tell you what a user's preferred product, or content category might be. Note that the most frequent computed trait requires the event property to have been tracked at least twice. In the case of a tie, Segment returns the first alphabetical value. For account-level computed traits, you can also return the most frequent **user trait**. This is helpful when you want to determine which user has performed an event the most frequently. For example, you might to return the email of the user in an account most actively viewing your app. +A most frequent user-level computed trait will return the **most common value** for an **event property**. This is helpful to create traits like `preferred_product_viewed` or `most_commonly_viewed_category` that tell you what a user's preferred product, or content category might be. Note that the most frequent computed trait requires the event property to have been tracked at least twice. In the case of a tie, Segment returns the first alphabetical value. For account-level computed traits, you can also return the most frequent **user trait**. This is helpful when you want to determine which user has performed an event the most frequently. For example, you might to return the email of the user in an account most actively viewing your app. User-level examples: - Favorite Blog Post @@ -113,7 +113,7 @@ Account-level examples: ![The last event-seen trait builder](../images/1525836818177.png) -### Unique List +### Unique list Unique list computed traits will output a **list of unique values** in alphabetical order for an **event property**. This is helpful to understand the different types of products or content that a customer or users in an account have interacted with or purchased. Customers are creating traits like `unique_product_categories_viewed` and sending them to email marketing tools and accessing them through the Profiles API for in-app personalization. @@ -125,7 +125,7 @@ Example use cases: ![The unique list trait builder](../images/1525837083070.png) -### Unique List Count +### Unique list count Unique list count computed traits will output a **count of the unique list of values** for an **event property**. Customers are creating traits like `unique_product_categories_viewed_count` to understand the variety of products that a customer is viewing. At the account-level, customers are creating traits like `unique_visitors_count` to calculate the number of unique visitors by ip address. @@ -144,7 +144,7 @@ Account-level examples: All computed trait types support a common "Add Conditions" section. Conditions defined here restrict the messages considered when calculating the final value of the computed trait by looking at a property of the events. For example, you could limits events to only those where "price" is greater than 30.00 or where "page.url" contains "pricing". -The following operators are available. +The following operators are available: - equals - not equals - less than @@ -162,15 +162,15 @@ The following operators are available. - equals one of - contains one of -## Connecting your Computed Trait to a Destination +## Connecting your computed trait to a destination Segment sends user-level computed Traits to destinations using the [Identify call](/docs/connections/spec/identify/) for user traits, or using the [Track call](/docs/connections/spec/track/) for event properties. Segment includes the trait value and property in the Identify and Track calls. For example, the name of a computed trait is added to the user profile as a trait, and the trait's value is set to the value of the computed trait. Segment sends an Identify or Track call when the trait is computed, depending on the destination configuration. If a computed trait counts the number of times a user visits your pricing page, and the user visits your pricing page five times, Segment sends an Identify call with the property `pricing_page_visits: 5`. -Learn more about [Computed trait generated events here](/docs/engage/using-engage-data/#computed-trait-generated-events). The trait name corresponds to the snake cased name that you see in the trait settings, for example `most_viewed_page_category`. See the [list of Engage-compatible destinations](/docs/engage/using-engage-data/#compatible-engage-destinations) +See [Computed trait generated events](/docs/engage/using-engage-data/#computed-trait-generated-events) to learn more. The trait name corresponds to the _snake_cased_ name that you see in the trait settings, for example `most_viewed_page_category`. See the [list of Engage-compatible destinations](/docs/engage/using-engage-data/#compatible-engage-destinations). -For account-level computed traits, you have the option to send either a [Group](/docs/connections/spec/group/) call and/or [Identify](/docs/connections/spec/identify/) call. Group calls will send one event per account, whereas Identify calls will send an Identify call for each user in the account. This means that even if a user hasn't performed an event, Segment will still set the account-level computed trait on that user. Because most marketing tools are still based at the user level, it is often important to map this account-level trait onto each user within an account. See [Account-level Audiences](/docs/engage/audiences/account-audiences) for more information. +For account-level computed traits, you have the option to send either a [Group](/docs/connections/spec/group/) call and/or an [Identify](/docs/connections/spec/identify/) call. Group calls will send one event per account, whereas Identify calls will send an Identify call for each user in the account. This means that even if a user hasn't performed an event, Segment will still set the account-level computed trait on that user. As most marketing tools are still based at the user level, it is often important to map this account-level trait onto each user within an account. See [Account-level Audiences](/docs/engage/audiences/account-audiences) for more information. > warning "Computed Traits can only be sent to Event destinations" > When Engage sends a computed trait to an [Event destinations](/docs/engage/using-engage-data/#event-destinations), it uses an Identify call to send user traits and a Group call to send account-level computed traits. @@ -183,7 +183,7 @@ After you create a computed trait, use the Overview page to view a compute progr > info "Viewing compute progress" > When you create a real-time computed trait, you'll see a progress bar, computed percentage, and status updates. For existing traits that you edit, Segment displays the compute status but not the progress bar or percentage. -## Editing Realtime Traits +## Editing realtime traits Segment supports the editing of real-time Traits, which allows you to make nuanced changes to existing Traits in situations where cloning or building from scratch may not suit your use case. @@ -200,7 +200,7 @@ Segment then processes your Trait edits. While the edit task runs, the trait rem > warning "" > It is not possible to edit a trait to convert it from real-time to batch, or vice-versa. If the computation type needs to be changed, you will need to recreate the trait with the appropriate conditions. -## Accessing your Computed Traits using the Profiles API +## Accessing your computed traits using the Profiles API You can access your computed traits using the Profile API by querying the `/traits` endpoint. For example, you can query for the `emails_opened_last_30_days` with the following GET request: @@ -231,13 +231,13 @@ By default, the response includes 20 traits. You can return up to 200 traits by You can read the [full Profile API docs](/docs/unify/profile-api/) to learn more. -## Deleting Computed Traits +## Deleting computed traits When computed traits are deleted, any user that had a value for that trait will now have a custom trait on the Unify profile. -## Downloading your Computed Trait as a CSV file +## Downloading your computed trait as a CSV file -You can download a copy of your trait by visiting the the computed trait overview page. +You can download a copy of your trait by visiting the computed trait overview page. ![Downloading a CSV file of computed traits in Segment](../images/trait_overview.png) Computed Trait CSVs are generated on demand. Before you can download the CSV, you will need to generate it. There are three different options for formatting: - **Unformatted:** Contains three columns. The first contains the user or account key, the second contains the trait value and the third is a JSON object containing the external IDs. Generating this CSV is by far the fastest of the three options. [Download example unformatted CSV](/docs/engage/files/trait_csv_format_a.csv) @@ -247,7 +247,7 @@ Computed Trait CSVs are generated on demand. Before you can download the CSV, yo ![Handling large CSV file downloads](../images/large_trait_csv.png) Generating a CSV can take a substantial amount of time for large traits (around 30 seconds for a formatted CSV with 1 million rows). For CSVs that are expected to take over 20 seconds, the Segment app displays an estimated generation time. After clicking Generate, it is recommended that you leave the modal and page open while the CSV is created. - (If the trait recalculates between when you click Generate and when you download the file, you might want to regenerate the file. The CSV is a snapshot from when you clicked Generate, and could be outdated.) + (If the trait recalculates between when you click Generate and when you download the file, regenerate the file. The CSV is a snapshot from when you clicked Generate, and could be outdated.) diff --git a/src/unify/index.md b/src/unify/index.md index 5b272c9b79..7dd20494cc 100644 --- a/src/unify/index.md +++ b/src/unify/index.md @@ -10,7 +10,7 @@ Use Segment Unify, formerly known as Profiles, for a complete view of your custo With [Identity Resolution](#identity-resolution), track every interaction across the entire user journey to create unified, real-time customer identities. View user profiles in one place through the [Profile explorer](#profile-explorer) in the Segment app. Use the [Profile API](#profile-api) to programmatically query user profiles, traits, and events. -You can then use this interaction data with customer engagement tools, such as Engage, to deliver personalized, omnichannel experiences. +You can then use this interaction data with customer engagement tools, such as [Engage](/docs/engage/), to deliver personalized, omnichannel experiences. > success "" > If you need to troubleshoot or learn about your profile data, use [Profiles Insights](/docs/unify/insights/) for a transparent view of your Unify profiles. diff --git a/src/unify/profiles-sync/tables.md b/src/unify/profiles-sync/tables.md index 4329c9dcd6..37117b1cb4 100644 --- a/src/unify/profiles-sync/tables.md +++ b/src/unify/profiles-sync/tables.md @@ -113,8 +113,8 @@ The `Timestamp` column will be empty for backfilled data because, during backfil The `id_graph_updates` table maps between the following: -- `segment_id`: the profile ID that Segment appends to an event or an identifier at the time it was first observed -- `canonical_segment_id`: the fully-merged segment ID (that is, the profile Segment now understands any events or identifiers to map to) +- `segment_id`: the profile ID that Segment appends to an event or an identifier at the time it was first observed. +- `canonical_segment_id`: the fully-merged segment ID (the profile Segment now understands any events or identifiers to map to). As a result, this table contains information about the creation and merging of profiles, as well as the specific events that triggered those changes. @@ -130,14 +130,14 @@ Using the events from the profile merge case study, Segment would generate three
-In this example, the table shows `profile_2` mapping to two places: first to itself, then, later, to `profile_1` after the merge occurs. +In this example, the table shows `profile_2` mapping to two places: first to itself, then to `profile_1` after the merge occurs. #### Recursive entries Segment shows the complete history of every profile. If, later, `profile_1` merges into a different `profile_0`, Segment adds recursive entries to show that `profile_1` and `profile_2` both map to `profile_0`. These entries give you a comprehensive history of all profiles that ever existed. -If you’ll use Profiles Sync to build models, refer to the `id_graph` model, which can help you put together a complete view of a customer. +If you use Profiles Sync to build models, refer to the `id_graph` model, which can help you put together a complete view of a customer. ### The external_id_mapping_updates table @@ -196,7 +196,7 @@ Event type tables provide a complete history for each type of event. Segment syn Identity Resolution processes these events, and includes a `segment_id`, enabling the data to be joined into a single Profile record. > success "" -> Event type tables have 2 months of historical data on backfill. Contact support if you need access to data beyond this period. +> Event type tables have two months of historical data on backfill. Contact [Segment support](https://segment.com/help/contact/){:target="_blank"} if you need access to data beyond this period. Event type tables includes the following tables: @@ -213,7 +213,7 @@ These event tables are similar to the tables landed by Segment warehouse integra - Events are combined in a single schema. For example, if you have three sources going into a single space, Segment produces one schema, not three. - These tables have two extra columns: * `segment_id`: the profile ID at the time the event came through. That profile may have since merged. - * `event_source_id`: the specific source ID of the incoming event + * `event_source_id`: the specific source ID of the incoming event. The previous result would generate two entries in the `pages` table: @@ -305,7 +305,7 @@ If you're not using materialized views for Profile Sync and would like to switch - Once the backfill is complete, review the data in your warehouse to confirm all necessary historical information has been included. > warning "" -> For materialized view tables, you must have delete permissions for your data warehouse. +> For materialized view tables, you must delete permissions for your data warehouse. ### Why materialized views? @@ -317,7 +317,7 @@ Materialized views offer several advantages: ### The user_traits table -With the `user_traits` table, you'll see all traits that belong to a profile, represented by the `canonical_segment_id`. Use this table for a complete picture of your Profiles Sync data with external data sources such as customer purchase history, product usage, and more. +The `user_traits` table lists all traits that belong to a profile, represented by the `canonical_segment_id`. Use this table for a complete picture of your Profiles Sync data with external data sources such as customer purchase history, product usage, and more. - This view is a fixed schema, and contains a row for each trait associated with the profile. - As new traits are added to the profile, new rows are added to the table.