Friendbuy Destination
Destination Info
- Accepts Page, Identify, and Track calls
- In Device-mode, refer to it as FriendBuy in the Integrations object
Components
Friendbuy is a referral marketing and campaign optimization platform.
Getting Started
- Log in to your Friendbuy account and go to Integration Code.
- Copy the Site ID above the snippet box.
- Log in to your Segment workspace, click Catalog and select the Destinations tab.
- Search for “Friendbuy” and click it in the catalog, then click Configure.
- Select the Segment data source you want to send to Friendbuy.
- On the next page that appears, click the Site ID setting, and paste the Site ID you copied in step 2, and click Save.
This destination allows you to:
- Map your Page calls to enable Widget Management
- Map your Identify calls to enable Customer Tracking
- Map your Track calls to enable Order Tracking and Product Tracking
Page
To load specific widgets on different web pages, you can configure your settings to map your named Page call(s) to specific Friendbuy Widget(s). You can also configure a several optional advanced widget configurations such as auto delay and custom parameters.
Friendbuy has two Widgets you can map to your Page calls:
Site Wide Widgets
Friendbuy recommends you to load these widgets on all your web pages. To use these widgets, you can add them under the Side Wide Widgets setting.
You don’t need to map a site wide widget if the Call To Action type is a ribbon served by Friendbuy. This overlay widget loads when Segment loads the Friendbuy library.
Other widgets
All other widgets will fall under this category whereby you can map the name
of a unique Segment .page()
call to a widget ID.
If you have mapped a site wide overlay widget, it loads on every .page()
call.
Identify
When you call .identify()
, Segment sends the following mapped traits:
Segment Traits | Friendbuy Standard Fields |
---|---|
userId |
id REQUIRED |
email |
email |
firstName |
first_name |
lastName |
last_name |
Here is a sample JavaScript .identify()
call with the all the standard traits:
analytics.identify('2', {
firstName: 'Buzz'
lastName: 'Lightyear',
email: 'captain.lightyear@toystory.com',
});
Friendbuy does not accept custom traits.
Stripe and Chargebee Customer ID
If you integrate with Stripe or Chargebee and need send those IDs to Friendbuy, you can pass them as integration specific options:
analytics.identify('2', {
firstName: 'Buzz'
lastName: 'Lightyear',
email: 'captain.lightyear@toystory.com',
}, {
integrations: {
FriendBuy: {
stripeCustomerId: <email@stripe.com>,
chargebeeCustomerId: <email@chargebee.com>
}
}
});
Track / Order Completed
This Destination accepts Order Completed
events as described in the Segment ecommerce spec.
Friendbuy has a concept of Order Tracking and Product Tracking where the former describes how to send data about the top level order whereas the latter documents instructions on sending data about each of the product within that order.
When you send order details, Segment makes the following translation:
Segment Properties | Friendbuy Standard Fields |
---|---|
order_id |
id REQUIRED |
context.traits.email |
email |
revenue |
amount |
coupon |
coupon_code |
Then Segment iterates over each item in your properties.products
and send the following mapping:
Segment Properties | Friendbuy Standard Fields |
---|---|
sku |
sku |
price |
price |
quantity |
quantity |
You can optionally specify if the customer who made the order is a new customer by passing new_customer
under your integration specific options:
integrations: {
FriendBuy: {
newCustomer: true,
}
}
Settings
Segment lets you change these destination settings from the Segment app without having to touch any code.
Setting | Description |
---|---|
Site ID (required) |
string . This is your Site ID. It is used to identify your account in our platform so we can properly attribute referral data. You can find your Site ID in the in Friendbuy web application at Settings > Integration Code |
Site Wide Widgets | mixed , defaults to . By default, Friendbuy recommends you add a site wide overlay widget. You can enter any of these site wide widgets here and we will load them any time we receive a .page() call. Note: If you have custom widgets mapped to named pages in the Widgets setting and you have provided a site wide widget, we will load both. |
Page Widgets | mixed , defaults to . Map your page calls to specific FriendBuy Widgets. |
This page was last modified: 27 Oct 2023
Need support?
Questions? Problems? Need more info? Contact Segment Support for assistance!