Skip to content

Commit 3eea9bb

Browse files
committed
DOC-278 add notes [netlify-ignore]
1 parent ee39e01 commit 3eea9bb

File tree

2 files changed

+21
-15
lines changed

2 files changed

+21
-15
lines changed

src/_data/catalog/overrides.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ items:
1616
mobile: true
1717
server: true
1818
summary: >-
19-
is available in device-mode for Analytics.js only, and is availble in cloud-mode for Mobile and Server sources.
19+
is available in device-mode for Analytics.js only, and is availble in cloud-mode for Mobile and Server sources. Page calls are supported from Device-mode connections only.
2020
cmode_type: mixed
2121
case: '6'
2222
- slug: iterable

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

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@ If you're not familiar with the Segment Specs, take a look to understand what th
2929
analytics.page()
3030
```
3131

32-
**IMPORTANT:** An initial `page` call is required for data to be sent to HubSpot using Analytics.js. This is included by default in your [Segment snippet](/docs/connections/sources/catalog/libraries/website/javascript/quickstart/#step-2-copy-the-segment-snippet).
32+
> info ""
33+
> Hubspot supports Page calls on Device-mode connections from Analytics.js sources
34+
35+
Analytics.js requires an initial Page call to send data to HubSpot. The [Segment snippet](/docs/connections/sources/catalog/libraries/website/javascript/quickstart/#step-2-copy-the-segment-snippet) includes this initial call by default.
3336

3437
## Identify
3538

@@ -43,11 +46,12 @@ analytics.identify('user1234', {
4346
})
4447
```
4548

46-
**IMPORTANT:** HubSpot's device-mode integration has two conditions for `identify` to successfully create or update a contact. A `traits.email` value must be included and either a `page` or `track` call must be called. You can read more from HubSpot's documentation [here](https://developers.hubspot.com/docs/methods/tracking_code_api/identify_visitor). If you are using HubSpot's cloud-mode integration, an `identify` call will update records without a `page` or `track` call being needed.
49+
> info ""
50+
> HubSpot's device-mode integration has two conditions for Identify to create or update a contact. Identify calls must include a `traits.email` value and need to accompany a Page or Track call. You can read more from HubSpot's documentation [here](https://developers.hubspot.com/docs/methods/tracking_code_api/identify_visitor){:target="_blank"}. If you are using HubSpot's cloud-mode integration, an Identify call will update records without the need for a Page or Track call.
4751
48-
HubSpot does not accept any trait keys that contain uppercases or spaces. So for any custom traits you send Segment converts the trait to lower case, and replaces any spaces with an underscore.
52+
HubSpot does not accept any trait keys that contain upper case letters or spaces. Segment converts any custom traits you send to lower case, and replaces spaces with an underscore.
4953

50-
Any traits that aren't contact fields in HubSpot will be removed from the request. To find out which fields you can set, check out the custom field names in **Contacts > Contact Settings**. Example field names are "firstname", "lastname", "company", "phone", etc.
54+
Any traits that aren't contact fields in HubSpot are removed from the request. To find out which fields you can set, check out the custom field names in **Contacts > Contact Settings**. Example field names are "firstname", "lastname", "company", "phone", etc.
5155

5256
If you specify a company name (using `traits.company.name`), it appears as a *property* of the contact (you can find it in HubSpot's UI using **About [contact] > View > View All Properties**), but it does not appear as the user's company under **[contact]'s Company**.
5357

@@ -74,7 +78,7 @@ analytics.track("Clicked Buy Now button", {
7478
})
7579
```
7680

77-
**IMPORTANT:** You must have a HubSpot Enterprise account for traits from an `identify` call to be passed through to your `track` call and be successfully sent as [a custom event to HubSpot](https://knowledge.hubspot.com/events-user-guide-v2/using-custom-events).
81+
**IMPORTANT:** You must have a HubSpot Enterprise account for traits from an Identify call to be passed through to your Track call and be successfully sent as [a custom event to HubSpot](https://knowledge.hubspot.com/events-user-guide-v2/using-custom-events).
7882

7983
The event will appear in your HubSpot UI but may take up to 60 minutes to appear in the graph visualization.
8084

@@ -92,12 +96,12 @@ analytics.track(
9296
)
9397
```
9498

95-
In this case, your HubSpot `eventId` is 'Bought Item'. If you want to use an existing `eventId`, you can use it instead of the event value (ie. `Bought Item`). If you don't want to match an existing `eventId`, you can use any event label and HubSpot will auto-create the event for you.
99+
In this case, your HubSpot `eventId` is 'Bought Item'. If you want to use an existing `eventId`, you can use it instead of the event value (for example, `Bought Item`). If you don't want to match an existing `eventId`, you can use any event label and HubSpot will auto-create the event for you.
96100

97101

98102
### Setting Contact Properties on Track
99103

100-
Although we recommend you send `traits` using [`identify`](/docs/connections/spec/identify/), you can also set HubSpot properties on a track call, as allowed by their [events API](http://developers.hubspot.com/docs/methods/enterprise_events/http_api). You might want to use this method if you're running out of API calls on the Identify requests.
104+
Although we recommend you send `traits` using [Identify](/docs/connections/spec/identify/), you can also set HubSpot properties on a track call, as allowed by their [events API](http://developers.hubspot.com/docs/methods/enterprise_events/http_api){:target="_blank"}. You might want to use this method if you're running out of API calls on the Identify requests.
101105

102106
Include HubSpot contact properties into the `context.traits` object:
103107

@@ -133,13 +137,14 @@ analytics.group({
133137
});
134138
```
135139

136-
Group calls map to the HubSpot [Companies API](https://developers.hubspot.com/docs/methods/companies/companies-overview). Segment's integration is responsible for creating and updating company objects with whatever traits you set, as well as [associating individual contacts to a company](https://developers.hubspot.com/docs/methods/companies/add_contact_to_company).
137-
138-
**IMPORTANT**: There are three requirements to creating companies and associating contacts:
140+
Group calls map to the HubSpot [Companies API](https://developers.hubspot.com/docs/methods/companies/companies-overview){:target="_blank"}. Segment's integration is responsible for creating and updating company objects with whatever traits you set, as well as [associating individual contacts to a company](https://developers.hubspot.com/docs/methods/companies/add_contact_to_company){:target="_blank"}.
139141

140-
1. Group calls only take effect when called using server-side libraries or mobile libraries, not using our client-side javascript library.
141-
2. Your contact must have been identified and created within HubSpot (called using analytics.identify for this userId first).
142-
3. You must include a `website` trait in your group call, and it must be a full, valid, and complete URL. HubSpot uses the domain of the website trait as a unique identifier for companies. To create a new company you must use the full URL and not just the subdomain.
142+
> warning ""
143+
> There are three requirements to creating companies and associating contacts:
144+
>
145+
>1. Group calls only take effect when called using server-side libraries or mobile libraries, not using our client-side javascript library.
146+
>2. Your contact must have been identified and created within HubSpot (called using analytics.identify for this userId first).
147+
>3. You must include a `website` trait in your group call, and it must be a full, valid, and complete URL. HubSpot uses the domain of the website trait as a unique identifier for companies. To create a new company you must use the full URL and not just the subdomain.
143148
144149
Segment can send the following group traits to HubSpot as special properties:
145150

@@ -194,7 +199,8 @@ When using any of our server-side sources, our connector will infer `traits.life
194199

195200
Segment gives you the option to load the [HubSpot Forms SDK](https://developers.hubspot.com/docs/methods/forms/advanced_form_options) alongside their tracking library. This can be done by enabling the **Load Forms SDK** setting when configuring your HubSpot integration.
196201

197-
**Note:** The Forms SDK expects to be loaded synchronously but analytics.js is loaded asynchronously. Therefore, in order to interact with the API, you need to run your code inside an [analytics.ready](/docs/connections/sources/catalog/libraries/website/javascript/#ready) callback. Here's an example:
202+
> info ""
203+
> The Forms SDK expects to be loaded synchronously but analytics.js is loaded asynchronously. Therefore, in order to interact with the API, you need to run your code inside an [analytics.ready](/docs/connections/sources/catalog/libraries/website/javascript/#ready) callback. Here's an example:
198204
199205
```js
200206
analytics.ready(function(){

0 commit comments

Comments
 (0)