-
Notifications
You must be signed in to change notification settings - Fork 380
DOC-332 added overrides for Friendbuy #1969
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,3 +3,4 @@ items: | |
- iterable | ||
- google-ads-gtag | ||
- klaviyo | ||
- friendbuy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -60,3 +60,50 @@ items: | |
accepts data in cloud-mode from web and mobile sources, and can accept data in device-mode from Analytics.js sources. | ||
cmode_type: mixed | ||
case: '10' | ||
- slug: friendbuy | ||
display_name: Friendbuy | ||
previous_names: | ||
- FriendBuy | ||
components: | ||
- code: https://github.com/segment-integrations/analytics.js-integration-friendbuy | ||
type: browser | ||
connection_modes: | ||
device: | ||
web: true | ||
mobile: false | ||
server: false | ||
cloud: | ||
web: false | ||
mobile: false | ||
server: false | ||
summary: accepts device-mode data only from Analytics.js. | ||
cmode_type: device-only | ||
case: '2' | ||
settings: | ||
- name: siteId | ||
type: string | ||
defaultValue: '' | ||
description: >- | ||
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** | ||
required: true | ||
label: Site ID | ||
- name: siteWideWidgets | ||
type: mixed | ||
defaultValue: [] | ||
description: >- | ||
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. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think when it's used as an adjective, site-wide requires a hyphen. |
||
required: false | ||
label: Site Wide Widgets | ||
- name: widgets | ||
type: mixed | ||
defaultValue: [] | ||
description: Map your page calls to specific FriendBuy Widgets. | ||
required: false | ||
label: Page Widgets |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,12 @@ | ||
--- | ||
title: Friendbuy Destination | ||
cmode-override: true | ||
--- | ||
Friendbuy is a referral marketing and campaign optimization platform. | ||
|
||
## Getting Started | ||
|
||
Setting up Friendbuy is very simple! | ||
{% include content/connection-modes.md %} | ||
|
||
1. Log in to your Friendbuy account and go to **Integration Code**. | ||
2. Copy the **Site ID** above the snippet box. | ||
|
@@ -15,34 +17,35 @@ Setting up Friendbuy is very simple! | |
|
||
This destination allows you to: | ||
|
||
- Map your Page calls to facilitate [Widget Management](http://developers.friendbuy.com/#widget-management) | ||
- Map your Identify calls to facilitate [Customer Tracking](http://developers.friendbuy.com/#customer-tracking) | ||
- Map your Track calls to facilitate [Order Tracking](http://developers.friendbuy.com/#order-tracking) and [Product Tracking](http://developers.friendbuy.com/#product-tracking) | ||
- Map your Page calls to enable [Widget Management](http://developers.friendbuy.com/#widget-management) | ||
- Map your Identify calls to enable [Customer Tracking](http://developers.friendbuy.com/#customer-tracking) | ||
- Map your Track calls to enable [Order Tracking](http://developers.friendbuy.com/#order-tracking) and [Product Tracking](http://developers.friendbuy.com/#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](http://developers.friendbuy.com/#widget-options) such as **auto delay** and **custom parameters**. | ||
|
||
<!-- TODO: convert this long gif into text instrucitons. | ||
See the following gif for example: | ||
|
||
--> | ||
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. | ||
|
||
There are two types of Widgets you can map to your Page calls: | ||
> info "" | ||
> 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. | ||
|
||
- Site Wide Widgets | ||
- These types of widgets are recommended by Friendbuy to load on all your webpages. If you wish to use these types of widgets, you can add them under the *Side Wide Widgets* setting. _NOTE_: You are NOT required to map a site wide widget if the **Call To Action** type is a ribbon served by Friendbuy. This type of overlay widget will just load when we boot up Friendbuy's library. | ||
**Other widgets** | ||
|
||
- 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. | ||
All other widgets will fall under this category whereby you can map the `name` of a unique Segment `.page()` call to a widget ID. | ||
|
||
_NOTE_: If you have mapped a site wide overlay widget loads on every `.page()` call, even if we have loaded a different widget on the page that you have explicitly mapped. | ||
> info "" | ||
> If you have mapped a site wide overlay widget, it loads on every `.page()` call. | ||
|
||
---------- | ||
## Identify | ||
|
||
When you call `.identify()`, we will send the following mapped traits: | ||
When you call `.identify()`, Segment sends the following mapped traits: | ||
|
||
| **Segment Traits** | **Friendbuy Standard Fields** | | ||
| --------------------- | ----------------------------- | | ||
|
@@ -61,11 +64,11 @@ analytics.identify('2', { | |
}); | ||
``` | ||
|
||
**NOTE**: Friendbuy does not accept any custom traits. | ||
|
||
> info "" | ||
> Friendbuy does not accept custom traits. | ||
### Stripe and Chargebee Customer ID | ||
|
||
If you are integrated with Stripe or Chargebee and would like to send those IDs to Friendbuy, you can pass them as integration specific options: | ||
If you integrate with Stripe or Chargebee and need send those IDs to Friendbuy, you can pass them as integration specific options: | ||
|
||
```js | ||
analytics.identify('2', { | ||
|
@@ -74,7 +77,7 @@ analytics.identify('2', { | |
email: '[email protected]', | ||
}, { | ||
integrations: { | ||
Friendbuy: { | ||
FriendBuy: { | ||
stripeCustomerId: <[email protected]>, | ||
chargebeeCustomerId: <[email protected]> | ||
} | ||
|
@@ -84,11 +87,11 @@ analytics.identify('2', { | |
|
||
## Track / Order Completed | ||
|
||
This Destination accepts only `Order Completed` events as decribed in our [ecommerce spec](https://segment.com/docs/connections/spec/ecommerce/v2/#order-completed). | ||
This Destination accepts `Order Completed` events as described in the Segment [ecommerce spec](/docs/connections/spec/ecommerce/v2/#order-completed). | ||
|
||
Friendbuy has a concept of [Order Tracking](http://developers.friendbuy.com/#order-tracking) and [Product Tracking](http://developers.friendbuy.com/#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 sending the order details, we will make the following translation: | ||
When you send order details, Segment makes the following translation: | ||
|
||
| **Segment Properties** | **Friendbuy Standard Fields** | | ||
| ------------------------- | ----------------------------- | | ||
|
@@ -97,7 +100,7 @@ When sending the order details, we will make the following translation: | |
| `revenue` | `amount` | | ||
| `coupon` | `coupon_code` | | ||
|
||
Then we will iterate over each item in your `properties.products` and send the following mapping: | ||
Then Segment iterates over each item in your `properties.products` and send the following mapping: | ||
|
||
|
||
| **Segment Properties** | **Friendbuy Standard Fields** | | ||
|
@@ -106,12 +109,12 @@ Then we will iterate over each item in your `properties.products` and send the f | |
| `price` | `price` | | ||
| `quantity` | `quantity` | | ||
|
||
**NOTE**: You can optionally specify if the customer who made the order is a new customer by passing `new_customer` under your integration specific options: | ||
|
||
```js | ||
integrations: { | ||
Friendbuy: { | ||
newCustomer: true, | ||
} | ||
} | ||
``` | ||
> info "" | ||
> You can optionally specify if the customer who made the order is a new customer by passing `new_customer` under your integration specific options: | ||
> ```js | ||
> integrations: { | ||
> FriendBuy: { | ||
> newCustomer: true, | ||
> } | ||
> } | ||
>``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,4 +52,6 @@ gmail | |
(?:U|u)nlinks?\b | ||
(?:P|p)ostgres | ||
Smartly | ||
Hubspot | ||
Hubspot | ||
Friendbuy | ||
Chargebee |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is minor, but I'd explicitly write out the relative pronoun here. It helps with users who put our pages through online translators.