Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,15 @@ id: 61dde0dc77eb0db0392649d3
---
{% include content/plan-grid.md name="actions" %}

[Friendbuy](https://www.friendbuy.com/){:target='_blank'} powers referral programs for e-commerce merchants of all sizes, providing an easy solution to launch Refer-a-Friend programs and accelerate growth through word of mouth.
[Friendbuy](https://www.friendbuy.com/){:target="_blank"} powers referral programs for e-commerce merchants of all sizes, providing an easy solution to launch Refer-a-Friend programs and accelerate growth through word of mouth.

Friendbuy's cloud mode Segment integration allows you to send data to Friendbuy from your data center so that Friendbuy can act on it. For example, you could trigger a reward when a referred customer performs a rewardable event or send customer data to use in your Friendbuy-managed loyalty/rewards program.

If you're using Segment with a Friendbuy referral program you probably want to use the [web destination](/docs/connections/destinations/catalog/actions-friendbuy/) to configure the Friendbuy JavaScript and to send customer and purchase data directly to Friendbuy as the user interacts with your web site. However, if you also want to send events from your data center to Friendbuy, such as purchases due to recurring transactions, you should also use this cloud mode [destination action](/docs/connections/destinations/actions/), which provides an interface between Segment's identify and track calls and Friendbuy's MAPI (merchant API).

## Overview

The Friendbuy cloud mode destination sends information about your customers and their actions to Friendbuy. It supports the following [Friendbuy MAPI events](https://developers.friendbuy.com/#tracking-events){:target='_blank'}.
The Friendbuy cloud mode destination sends information about your customers and their actions to Friendbuy. It supports the following [Friendbuy MAPI events](https://developers.friendbuy.com/#tracking-events){:target="_blank"}.

- **Track Customer**: Converts Segment [Identify](/docs/connections/spec/identify/) calls to Friendbuy [*track customer* MAPI calls](https://developers.friendbuy.com/#tracking-customer-details){:target="_blank”}. Use this to add your customer ID and other customer data to the information that Friendbuy has about the customer.
- **Track Purchase**: Converts Segment [Order Completed](/docs/connections/spec/ecommerce/v2/#order-completed) calls to Friendbuy [*track purchase* MAPI calls](https://developers.friendbuy.com/#tracking-a-purchase){:target="_blank”}. Use this to send purchase data to Friendbuy and reward advocates based on their friends' purchases.
Expand Down Expand Up @@ -85,7 +85,7 @@ For example, if your *Track Purchase* call has the default *Custom Attributes* v
}
```

then the [Friendbuy MAPI purchase call](https://developers.friendbuy.com/#postpurchaseevent){:target='_blank'} will be:
then the [Friendbuy MAPI purchase call](https://developers.friendbuy.com/#postpurchaseevent){:target="_blank"} will be:

``` json
{
Expand Down Expand Up @@ -117,7 +117,7 @@ To configure a custom event:

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).

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/#tracking-a-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).
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/#tracking-a-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).

<!--
Local Variables:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ id: 6170a348128093cd0245e0ea

{% include content/plan-grid.md name="actions" %}

[Friendbuy](https://www.friendbuy.com/){:target='_blank'} is a referral marketing platform.
[Friendbuy](https://www.friendbuy.com/){:target="_blank"} is a referral marketing platform.

Friendbuy's web mode Segment integration allows you to enable your Friendbuy referral program through Segment's dashboard instead of adding Friendbuy's JavaScript directly to your site.

Expand All @@ -20,7 +20,7 @@ This Segment integration is a web mode [destination action](/docs/connections/de

## Overview

The Friendbuy web mode 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'}.
The Friendbuy web mode 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"}.

- **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.
- **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.
Expand All @@ -39,7 +39,7 @@ Friendbuy Web Mode (Actions) is the Segment web mode destination that works with

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.

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.
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.
2. From the Segment web app, click **Catalog**, then click **Destinations**.
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.
4. Give the destination a name, and fill in the settings manually.
Expand Down Expand Up @@ -86,7 +86,7 @@ analytics.track("Order Completed", {
});
```

then the [Friendbuy track purchase call](https://developers.friendbuy.com/#purchase-event){:target='_blank'} will be:
then the [Friendbuy track purchase call](https://developers.friendbuy.com/#purchase-event){:target="_blank"} will be:

``` javascript
friendbuyAPI.push(["track", "purchase", {
Expand Down Expand Up @@ -114,7 +114,7 @@ To configure a custom event:

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).

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).
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).

<!--
Local Variables:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,15 @@ When you have Segment installed, you can use your existing Analytics 2.0 trackin

## Getting started

Before you connect Segment to Google Analytics 4, configure a Google Analytics 4 property in your Analytics account and enable any Custom Definitions in your GA4 Admin Panel. For more information, see Google's article [Set up Analytics for a website and/or app](https://support.google.com/analytics/answer/9304153){:target='_blank'}.
Before you connect Segment to Google Analytics 4, configure a Google Analytics 4 property in your Analytics account and enable any Custom Definitions in your GA4 Admin Panel. For more information, see Google's article [Set up Analytics for a website and/or app](https://support.google.com/analytics/answer/9304153){:target="_blank"}.

To connect the Google Analytics 4 Web destination:

1. From the Segment web app, click **Catalog**, then click **Destinations**.
2. Search for “Google Analytics 4 Web” in the Destinations Catalog, and select the destination.
3. Click **Configure Google Analytics 4 Web**.
4. Select the web source that will send data to Google Analytics 4 and follow the steps to name your destination. The web source chosen must use [Analytics.js 2.0](/docs/connections/sources/catalog/libraries/website/javascript/). For mobile source tracking, view the [Firebase Destination](/docs/connections/destinations/catalog/firebase/).
5. On the **Settings** tab, under **Basic Settings**, enter in the [Measurement ID](https://support.google.com/analytics/answer/9539598){:target='_blank'} associated with your GA4 web stream.
5. On the **Settings** tab, under **Basic Settings**, enter in the [Measurement ID](https://support.google.com/analytics/answer/9539598){:target="_blank"} associated with your GA4 web stream.
6. Set up your event mappings by following the steps in the Destinations Actions documentation on [Customizing mappings](/docs/connections/destinations/actions/#customize-mappings).
7. Analytics.js requires an initial Page call to send data to Google Analytics 4 Web. The [Segment snippet](/docs/connections/sources/catalog/libraries/website/javascript/quickstart/#step-2-add-the-segment-snippet) includes this initial call by default.
8. For GA4 to accept events on page, enable Set Configuration Mapping triggered by the first Segment event called after analytics.load(). Set Configuration Mapping calls the gtag(‘config’) command to enable tracking to your GA4 Measurement ID.
Expand Down
Loading
Loading