Skip to content

Commit 56a57e7

Browse files
author
markzegarelli
committed
DOC-332 added overrides for Friendbuy
1 parent d95535d commit 56a57e7

File tree

5 files changed

+70
-23
lines changed

5 files changed

+70
-23
lines changed

src/_data/catalog/overrides-list.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ items:
33
- iterable
44
- google-ads-gtag
55
- klaviyo
6+
- friendbuy

src/_data/catalog/overrides.yml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,50 @@ items:
6060
accepts data in cloud-mode from web and mobile sources, and can accept data in device-mode from Analytics.js sources.
6161
cmode_type: mixed
6262
case: '10'
63+
- slug: friendbuy
64+
display_name: Friendbuy
65+
previous_names:
66+
- FriendBuy
67+
components:
68+
- code: https://github.com/segment-integrations/analytics.js-integration-friendbuy
69+
type: browser
70+
connection_modes:
71+
device:
72+
web: true
73+
mobile: false
74+
server: false
75+
cloud:
76+
web: false
77+
mobile: false
78+
server: false
79+
summary: accepts device-mode data only from Analytics.js.
80+
cmode_type: device-only
81+
case: '2'
82+
settings:
83+
- name: siteId
84+
type: string
85+
defaultValue: ''
86+
description: >-
87+
This is your **Site ID**. It is used to identify your account in our
88+
platform so we can properly attribute referral data. You can find your
89+
Site ID in the in Friendbuy web application at **Settings > Integration
90+
Code**
91+
required: true
92+
label: Site ID
93+
- name: siteWideWidgets
94+
type: mixed
95+
defaultValue: []
96+
description: >-
97+
By default, Friendbuy recommends you add a site wide overlay widget. You
98+
can enter any of these site wide widgets here and we will load them any
99+
time we receive a `.page()` call. *Note*: If you have custom widgets
100+
mapped to named pages in the *Widgets* setting and you have provided a
101+
site wide widget, we will load both.
102+
required: false
103+
label: Site Wide Widgets
104+
- name: widgets
105+
type: mixed
106+
defaultValue: []
107+
description: Map your page calls to specific FriendBuy Widgets.
108+
required: false
109+
label: Page Widgets

src/_includes/content/destination-dossier.html

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
{% endfor %}
1616
{% assign destMethods = destMethods| reverse %}
1717

18+
{% if page.cmode-override %}
19+
{% assign destinationInfo = site.data.catalog.overrides.items % | where: "slug", thisDestination | first %}
20+
{% endif %}
1821
<div class="quick-info">
1922
<h4>{{ destinationInfo.display_name }} quick info </h4>
2023
<p>{% if destMethods.size > 0 %}
@@ -27,11 +30,10 @@ <h4>{{ destinationInfo.display_name }} quick info </h4>
2730
{% if destinationInfo.replay %} {{ destinationInfo.display_name }} is eligible for <a href="/docs/guides/what-is-replay/">Replay</a>. {% endif %}</p>
2831

2932
{% unless destinationInfo.connection_modes.case == "0"%}
30-
{% if page.cmode-override %}
31-
{% assign destinationInfo = site.data.catalog.overrides.items % | where: "slug", thisDestination | first %}
32-
{% endif %}
33+
3334
<p>
3435
{{ destinationInfo.display_name }} {{ destinationInfo.connection_modes.summary }} {% if destinationInfo.connection_modes.case == "mixed" %} {{destinationInfo.display_name}} accepts device-mode data from {% if destinationInfo.connection_modes.device.mobile and destinationInfo.connection_modes.device.web %} mobile and web{% elsif destinationInfo.connection_modes.device.mobile %} mobile{% elsif destinationInfo.connection_modes.device.web %} web{% endif %} sources.{% endif %} {% if destinationInfo.browserUnbundlingSupported %} You can change the {{destinationInfo.display_name}} connection mode for Analytics.js sources from the destination settings in the Segment web app.
36+
If you reference it in the <a href="/docs/guides/filtering-data/#filtering-with-the-integrations-object">Integrations object</a>, call it &ldquo;{{destinationInfo.previous_names | join: '", or "' }}&rdquo;.
3537
{% endif %}
3638
</p>
3739
{% endunless %}

src/_includes/content/destination-footer.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ When you first create an audience, Personas sends an Identify call for every use
4444

4545
{% unless page.hide-settings == true %}
4646
## Settings
47-
4847
Segment lets you change these destination settings from the Segment app without having to touch any code.
4948
<table class="settings">
5049
<thead>

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

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
22
title: Friendbuy Destination
3+
cmode-override: true
34
---
45

56
## Getting Started
@@ -19,15 +20,11 @@ This destination allows you to:
1920
- Map your Identify calls to facilitate [Customer Tracking](http://developers.friendbuy.com/#customer-tracking)
2021
- Map your Track calls to facilitate [Order Tracking](http://developers.friendbuy.com/#order-tracking) and [Product Tracking](http://developers.friendbuy.com/#product-tracking)
2122

22-
----------
23+
2324
## Page
2425

2526
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**.
2627

27-
<!-- TODO: convert this long gif into text instrucitons.
28-
See the following gif for example:
29-
30-
![](images/23163f90cfc1f375f6c0da3a06060da4.gif)-->
3128

3229
There are two types of Widgets you can map to your Page calls:
3330

@@ -37,9 +34,10 @@ There are two types of Widgets you can map to your Page calls:
3734
- Other widgets
3835
 - All other widgets will fall under this category whereby you can map the `name` of a unique Segment `.page()` call to a widget ID.
3936

40-
_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.
37+
> info ""
38+
> 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.
39+
4140

42-
----------
4341
## Identify
4442

4543
When you call `.identify()`, we will send the following mapped traits:
@@ -61,8 +59,8 @@ analytics.identify('2', {
6159
});
6260
```
6361

64-
**NOTE**: Friendbuy does not accept any custom traits.
65-
62+
> info ""
63+
> Friendbuy does not accept custom traits.
6664
### Stripe and Chargebee Customer ID
6765

6866
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:
@@ -74,7 +72,7 @@ analytics.identify('2', {
7472
7573
}, {
7674
integrations: {
77-
Friendbuy: {
75+
FriendBuy: {
7876
stripeCustomerId: <email@stripe.com>,
7977
chargebeeCustomerId: <email@chargebee.com>
8078
}
@@ -106,12 +104,12 @@ Then we will iterate over each item in your `properties.products` and send the f
106104
| `price` | `price` |
107105
| `quantity` | `quantity` |
108106

109-
**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:
110-
111-
```js
112-
integrations: {
113-
Friendbuy: {
114-
newCustomer: true,
115-
}
116-
}
117-
```
107+
> info ""
108+
> You can optionally specify if the customer who made the order is a new customer by passing `new_customer` under your integration specific options:
109+
> ```js
110+
> integrations: {
111+
> FriendBuy: {
112+
> newCustomer: true,
113+
> }
114+
> }
115+
>```

0 commit comments

Comments
 (0)