Skip to content

Commit df9fb8d

Browse files
authored
Merge pull request #2288 from segmentio/develop
Release 21.50.2
2 parents 15edb68 + 094e9ff commit df9fb8d

File tree

12 files changed

+350
-142
lines changed

12 files changed

+350
-142
lines changed
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
---
2+
title: Friendbuy Web Mode (Actions) Destination
3+
hide-boilerplate: true
4+
hide-dossier: true
5+
hidden: true
6+
---
7+
8+
{% include content/plan-grid.md name="actions" %}
9+
10+
[Friendbuy](https://www.friendbuy.com/){:target='_blank'} is a referral marketing platform.
11+
12+
Friendbuy's Segment integration allows you to enable your Friendbuy referral program through Segment's dashboard instead of adding Friendbuy's JavaScript directly to your site.
13+
14+
Friendbuy's Segment integration is implemented as a Segment browser [destination action](/docs/connections/destinations/actions/) that loads and configures Friendbuy's JavaScript for you. If you're already using Segment's Analytics.js to identify your customers and track their purchases, either directly or through Segment source integrations that you've installed, you can configure Segment to send this data to Friendbuy and use in your referral program.
15+
16+
## Overview
17+
18+
The Friendbuy destination sends information about your customers and their actions to Friendbuy. It supports the following [Friendbuy tracking events](https://developers.friendbuy.com/#tracking-events){:target='_blank'}.
19+
20+
- **Track Customer**: Converts Segment [`analytics.identify`](/docs/connections/spec/identify/) calls to Friendbuy *track customer* calls. Use this to add your customer ID and other customer data to the information that Friendbuy has about the customer.
21+
- **Track Purchase**: Converts Segment [`analytics.track('Order Completed')`](/docs/connections/spec/ecommerce/v2/#order-completed) calls to Friendbuy *track purchase* calls. Use this to send purchase data to Friendbuy and reward advocates based on their friends' purchases.
22+
- **Track Sign-Up**: Converts Segment [`analytics.track('Signed Up')`](/docs/connections/spec/b2b-saas/#signed-up) calls to Friendbuy *track sign_up* calls. Use this to reward customers for account creation and other sign-up actions.
23+
- **Track Page**: Converts Segment [`analytics.page`](/docs/connections/sources/catalog/libraries/website/javascript/#page) calls to Friendbuy *track page* calls. Use this to enable your Friendbuy widgets based on page name.
24+
- **Track Custom Event**: Converts an arbitrary Segment [`analytics.track`](/docs/connections/sources/catalog/libraries/website/javascript/#track) call with an event name and properties of your choosing to a Friendbuy track custom event call. Use this to reward your customers for actions other than purchases or sign-ups.
25+
26+
## Benefits of Friendbuy Web Mode (Actions) vs Friendbuy Classic
27+
28+
Friendbuy Web Mode (Actions) is the Segment web mode destination that works with Friendbuy's current platform. The classic Segment Friendbuy destination works with Friendbuy's legacy platform.
29+
30+
## Getting started
31+
32+
> info ""
33+
> Please contact your Onboarding & Implementation Representative or email [email protected] to set up Friendbuy's Segment integration.
34+
35+
Before you start, you must have Segment's Analytics.js 2.0 installed on your site. See [Segment's documentation](/docs/connections/sources/catalog/libraries/website/javascript/quickstart/) for instructions.
36+
37+
1. Find your Friendbuy Merchant ID, a unique [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier){:target='_blank'} that Friendbuy uses to identify your account. [Log in to your Friendbuy account](https://retailer.friendbuy.io/){:target='_blank'} and visit the **Developer Center** > **Friendbuy Code** page to locate your Merchant ID.
38+
2. From the Segment web app, click **Catalog**, then click **Destinations**.
39+
3. Filter the destinations on Friendbuy in the Catalog and select **Friendbuy Web Device Mode (Actions)**. Click **Configure Friendbuy Web Device Mode (Actions)** to configure the Friendbuy destination, and choose which of your sources to connect the destination to.
40+
4. Give the destination a name, and fill in the settings manually.
41+
5. On the **Basic Settings** page enter your Merchant ID value from step one, and click **Save Changes**.
42+
6. Select the **Mappings** tab. A number of pre-built mappings are configured for you that map standard events defined in the [Segment Spec](/docs/connections/spec/) to their equivalent Friendbuy events, as displayed below. You can disable events that you don't use or edit the pre-built field mappings.
43+
7. After you configure the destination, enable it from the **Settings** tab.
44+
45+
## Pre-built mappings
46+
47+
By default, a Friendbuy Web Mode (Actions) Destination comes with the following mappings.
48+
49+
| Mapping Name | Trigger | Friendbuy Action |
50+
|----------------|-------------------------------------------|------------------|
51+
| Track Customer | `identify` calls | Track Customer |
52+
| Track Purchase | `track` calls with name `Order Completed` | Track Purchase |
53+
| Track Sign Up | `track` calls with name `Signed Up` | Track Sign Up |
54+
| Track Page | `page` calls | Track Page |
55+
56+
<!-- The line below renders a table of connection settings (if applicable), Pre-built Mappings, and available actions. -->
57+
58+
{% include components/actions-fields.html %}
59+
60+
<!-- If applicable, add information regarding the migration from a classic destination to an Actions-based version below -->
61+
62+
## Edit Friendbuy mappings
63+
64+
There are four steps to configure a Segment mapping.
65+
66+
1. **Set up event trigger**: Choose the event trigger, which is the event type (such as *Identify*) or event name (such as *Order Completed*) for events that should be sent to Friendbuy.
67+
2. **Test event trigger**: Find a sample event in your Segment event stream that matches the trigger you defined in step one.
68+
3. **Configure action fields**: Define how the fields in the Segment event are mapped to fields in the Friendbuy track event.
69+
4. **Review mappings**: Verify that the fields in the sample event are mapped correctly.
70+
71+
### Configuring action fields
72+
73+
In the **configure action fields** step, the mapping is pre-populated with mappings from the standard Segment event properties to the corresponding Friendbuy fields. You can edit each field if you want to populate that field from a different Segment event property or not send the field at all.
74+
75+
Note that the default mappings for the *Purchase*, *Sign Up*, and custom events populate Friendbuy's Customer ID field from the User ID passed in the `analytics.identify` call. Unless you change the Customer ID field mapping when you configure the action, you must make an `analytics.identify` call before you make the `analytics.track` call for *Purchase*, *Sign Up*, or custom events if you want to associate a Customer ID with those events.
76+
77+
#### Custom attributes
78+
79+
In the *Track Customer*, *Track Purchase*, or *Track Sign Up* mappings you can use the *Custom Attributes* field to send additional custom properties that aren't included in the predefined field names for that event. Use the mapping's *Custom Attributes* field to specify the path to a JSON object that contains those custom attributes. Then, when your code makes its Segment Analytics.js call, include an object at the path that you configured containing your custom attributes to include them at the root of the Friendbuy track event.
80+
81+
For example, if your *Track Purchase* call has the default *Custom Attributes* value of `properties.friendbuyAttributes`, and if your track purchase call is:
82+
83+
``` javascript
84+
analytics.track("Order Completed", {
85+
order_id: "82f250a3-32eb-40be-95fc-77e685ed8448",
86+
total: 54.82,
87+
currency: "USD",
88+
friendbuyAttributes: {
89+
orderNumber: "3",
90+
promotion: "black friday"
91+
}
92+
});
93+
```
94+
95+
then the [Friendbuy track purchase call](https://developers.friendbuy.com/#purchase-event){:target='_blank'} will be:
96+
97+
``` javascript
98+
friendbuyAPI.push(["track", "purchase", {
99+
id: "82f250a3-32eb-40be-95fc-77e685ed8448",
100+
amount: 54.82,
101+
currency: "USD",
102+
orderNumber: "3",
103+
promotion: "black friday"
104+
}, true]);
105+
```
106+
107+
Note that a Friendbuy track call is limited to a maximum of 10 custom attributes, custom attribute values must be strings, and the maximum length of a custom attribute is 128 characters. Custom attributes that do not comply with these restrictions are dropped.
108+
109+
### Custom events
110+
111+
To allow Friendbuy to act on an event that isn't one of the standard events described in the [Overview](#overview), use a custom event.
112+
113+
To configure a custom event:
114+
115+
1. Click **New Mapping** and choose **Track Custom Event**.
116+
117+
2. For the Event Name, choose the name of the Segment event you are tracking. For example, if you want to reward on app downloads that you are tracking with `analytics.track("Downloaded", { downloadId: "My App" }`, select `Downloaded` as your *Event Name*.
118+
119+
3. When you configure your action fields, you can accept the default *Event Name* of `event` which will cause Friendbuy to receive track events with the same names as the Segment events. If you want to rename the Friendbuy events, you can replace the *Event Name* with a different value such as the static string `download`.
120+
121+
4. *Event Properties* is set from the path `properties` by default, which means that all the properties that you include in your Segment `analytics.track` call are passed to Friendbuy. If you only want to pass custom attributes to Friendbuy, you need to segregate the fields to pass to Friendbuy into an object and then specify the path to that object, similar to what is described above in [Custom Attributes](#custom-attributes).
122+
123+
5. To prevent an event that is tracked multiple times from being rewarded more than once, you should include a deduplication ID in your event as described in Friendbuy's [Track Custom Event documentation](https://developers.friendbuy.com/#custom-event){:target='_blank'}. You can either pass an explicit Event ID field in your event (defaulting to the `deduplicationId` property) or you can create the Event ID out of other event properties (such as the `userId`, a `.`, and the `properties.downloadId` in the above example).
124+
125+
<!--
126+
Local Variables:
127+
eval: (visual-line-mode 1)
128+
End:
129+
-->
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
# The end name should be similar to `Slack (Actions) Destination`
3+
title: Sprig (Actions) Destination
4+
hide-boilerplate: true
5+
hide-dossier: true
6+
hidden: true
7+
---
8+
9+
<!-- In the section above, edit the `title` field. For example, Slack (Actions) Destination -->
10+
11+
{% include content/plan-grid.md name="actions" %}
12+
13+
[Sprig (formerly UserLeap)](https://sprig.com/?&utm_source=segmentio&utm_medium=docs_actions&utm_campaign=integration){:target="_blank"} is an in-context user research platform that makes it fast and effortless for product teams to learn from their actual customers in real-time, through microsurveys, concept tests, and video questions.
14+
15+
This destination is maintained by Sprig. For any issues with the destination, contact [[email protected]](mailto:[email protected]).
16+
17+
18+
<!-- In the section below, add your destination name where indicated. If you have a classic version of the destination, ensure that its documentation is linked as well. If you don't have a classic version of the destination, remove the second and third sentences. -->
19+
20+
> success ""
21+
> **Good to know**: This page is about the [Actions-framework](/docs/connections/destinations/actions/) Sprig Segment destination. There's also a page about the [non-Actions Sprig (formerly UserLeap) destination](/docs/connections/destinations/catalog/userleap/). Both of these destinations receive data from Segment.
22+
23+
<!-- In the section below, explain the value of this actions-based destination over the classic version, if applicable. If you don't have a classic version of the destination, remove this section. -->
24+
25+
## Benefits of Sprig (Actions) vs Sprig Classic
26+
27+
Sprig (Actions) provides the following benefits over the classic Sprig destination:
28+
29+
- **Trigger microsurveys**. Because Sprig (Actions) hooks into your browser-based, JavaScript Segment source, it can be used to trigger Sprig microsurveys.
30+
- **Code-free Sprig installation**. The Sprig (Actions) destination can install the Sprig SDK onto your website, without you having to update any code.
31+
32+
<!-- The section below explains how to enable and configure the destination. Include any configuration steps not captured below. For example, obtaining an API key from your platform and any configuration steps required to connect to the destination. -->
33+
34+
## Getting started
35+
36+
1. From the Segment web app, click **Catalog**, then click **Destinations**.
37+
2. Use the navigation on the left to locate and select Sprig (Actions).
38+
3. Click **Configure Sprig (Actions)**.
39+
4. Select an existing JavaScript website source to connect to Sprig (Actions).
40+
5. Find your Environment ID on [Sprig Dashboard > Connect > JavaScript](https://app.sprig.com/connect){:target="_blank"}. Use the Development Environment ID for a testing environment, and the Production Environment ID for your live website environment. When you configure the destination, input the appropriate Environment ID.
41+
6. Select **Quick Setup** to start with pre-populated subscriptions, or **Customized Setup** to configure each action from scratch. Click **Configure Actions** to complete setup.
42+
43+
<!-- The line below renders a table of connection settings (if applicable), Pre-built Mappings, and available actions. -->
44+
45+
{% include components/actions-fields.html %}
46+
47+
<!-- If applicable, add information regarding the migration from a classic destination to an Actions-based version below -->
48+
49+
## Migration from the classic Sprig destination
50+
51+
<!-- Include any pertinent information here. -->
52+
53+
To prevent duplicate events being tracked, please disable your existing Sprig destination when you enable Sprig (Actions).
54+
55+
Follow the table below to map your existing Sprig destination configuration to Sprig (Actions).

src/connections/destinations/catalog/google-analytics/index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -648,6 +648,7 @@ Segment supports the following Google Universal Analytics features.
648648

649649
- [Client-side (Analytics.js) library methods](#client-side-library-methods)
650650
- [Anonymize IP Address](#anonymize-ip-address)
651+
- [Consent Mode](#consent-mode)
651652
- [Cookie Domain Name](#cookie-domain-name)
652653
- [Custom Dimensions](#custom-dimensions)
653654
- [Cross-domain Tracking](#cross-domain-tracking)
@@ -738,6 +739,10 @@ To do this server side, you can create a separate [source](/docs/connections/sou
738739

739740
This source can be your server-side source. From there, its easy to send data to multiple projects server-side, as you can see in this [Node example](/docs/connections/sources/catalog/libraries/server/node/#multiple-clients) you can initialize multiple instances of the library.
740741

742+
### Consent Mode
743+
744+
Segment does not support Google’s [Consent Mode](https://support.google.com/analytics/answer/9976101?hl=en){:target="_blank"} feature. Consent Mode enables you to adjust how Google’s tags load on your site, based on whether users consent to your use of cookies. This feature requires Google’s gtag.js library, and does not work when you use Segment’s Google Universal Analytics destination, because it loads [Google’s analytics.js library](https://support.google.com/analytics/answer/7476135?hl=en#zippy=%2Cin-this-article){:target="blank"} instead of the gtag.js library. As an alternative, you can use Segment’s [Consent Manager](https://github.com/segmentio/consent-manager){:target="blank"} .
745+
741746
### Cookie Domain Name
742747

743748
The Google Universal Analytics **Cookie Domain Name** setting allows you to specify the domain that the `_ga` cookie will be set on. By default the cookie is placed on the top level domain: `domain.com`.

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

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@ cmode-override: true
77

88
[HubSpot](https://www.hubspot.com/) is an inbound marketing and sales platform that helps companies attract visitors, convert leads, and close customers. The `analytics.js` HubSpot Destination is open-source. You can browse the code [on GitHub](https://github.com/segmentio/analytics.js-integrations/tree/master/integrations/hubspot).
99

10+
> warning ""
11+
> The HubSpot destination is not compatible with the Segment Event Tester. As result, Segment recommends using other tools to troubleshoot the HubSpot destination.
12+
1013

1114
## Getting Started
1215

@@ -215,7 +218,6 @@ analytics.ready(function(){
215218
})
216219
```
217220

218-
219221
## Using HubSpot with Personas
220222

221223
You can send computed traits and audiences that you create in Personas to HubSpot so you can use the data in live chat, automated emails, and other HubSpot features to personalize interactions with your customers.

0 commit comments

Comments
 (0)