Skip to content

Commit b08d3a4

Browse files
author
markzegarelli
committed
fix conflict
2 parents 5d7a8aa + 9e0de06 commit b08d3a4

File tree

6 files changed

+248
-16
lines changed

6 files changed

+248
-16
lines changed

scripts/private-destination.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ const PRIVATE_DESTINATIONS = yaml.load(fs.readFileSync(path.resolve(__dirname, `
2020
const privateDests = PRIVATE_DESTINATIONS.items
2121
let private = []
2222
const getCatalog = async (url, page_token = "MA==") => {
23+
let res = null
2324
try {
24-
const res = await axios.get(url, {
25+
res = await axios.get(url, {
2526
headers: {
2627
'Content-Type': 'application/json',
2728
'Authorization': `Bearer ${process.env.PAPI_TOKEN}`
@@ -33,10 +34,14 @@ const getCatalog = async (url, page_token = "MA==") => {
3334
}
3435
}
3536
});
36-
3737
return res.data
38-
} catch (error) {
39-
console.log(error)
38+
} catch (err) {
39+
console.error("Error response:");
40+
console.error(err.response.data); // ***
41+
console.error(err.response.status); // ***
42+
console.error(err.response.headers); // ***
43+
} finally {
44+
4045
}
4146
}
4247

@@ -48,6 +53,9 @@ const checkDestinationStatus = async (id) => {
4853
}
4954
const getDestinationData = async (id) => {
5055
const res = await getCatalog(`${PAPI_URL}/catalog/destinations/${id}`)
56+
if (res == null) {
57+
return
58+
}
5159
let destination = res.data.destinationMetadata
5260
let settings = destination.options
5361
settings.sort((a, b) => {

src/_data/catalog/destinations_private.yml

Lines changed: 174 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1998,6 +1998,180 @@ items:
19981998
name: Track Page
19991999
fields: {}
20002000
trigger: type = "page"
2001+
- id: 638f843c4520d424f63c9e51
2002+
display_name: CommandBar
2003+
name: CommandBar
2004+
slug: actions-commandbar
2005+
previous_names:
2006+
- CommandBar
2007+
website: http://www.commandbar.com
2008+
status: PRIVATE_BETA
2009+
logo:
2010+
url: https://cdn.filepicker.io/api/file/Df2gL4P0Tb6FOBaH7MPg
2011+
mark:
2012+
url: https://cdn.filepicker.io/api/file/dB22XUsaSX2Afop9R1vk
2013+
methods:
2014+
track: true
2015+
pageview: true
2016+
identify: true
2017+
group: true
2018+
alias: true
2019+
platforms:
2020+
browser: true
2021+
mobile: false
2022+
server: false
2023+
warehouse: false
2024+
components: []
2025+
browserUnbundlingSupported: false
2026+
browserUnbundlingPublic: false
2027+
replay: false
2028+
settings:
2029+
- name: deploy
2030+
type: boolean
2031+
defaultValue: false
2032+
description: >-
2033+
If enabled, CommandBar will be deployed to your site automatically and
2034+
you can remove the snippet from your source code.
2035+
required: true
2036+
label: Deploy via Segment
2037+
- name: orgId
2038+
type: string
2039+
defaultValue: ''
2040+
description: The ID of your CommandBar organization.
2041+
required: true
2042+
label: Organization ID
2043+
actions:
2044+
- id: 5cVhYfBJYs4sCSvLLoahGc
2045+
name: Track Event
2046+
slug: trackEvent
2047+
description: Submit an event's properties as CommandBar metaData.
2048+
platform: WEB
2049+
hidden: false
2050+
defaultTrigger: type = "track"
2051+
fields:
2052+
- id: 9pmubBefRct4eJvnSqTJHR
2053+
sortOrder: 0
2054+
fieldKey: event_name
2055+
label: Event Name
2056+
type: STRING
2057+
description: The name of the event.
2058+
placeholder: ''
2059+
defaultValue:
2060+
'@path': $.event
2061+
required: true
2062+
multiple: false
2063+
choices: null
2064+
dynamic: false
2065+
allowNull: false
2066+
- id: 7qr1J7XrvSFGcH9zLXwbpZ
2067+
sortOrder: 1
2068+
fieldKey: event_metadata
2069+
label: Event Metadata
2070+
type: OBJECT
2071+
description: Optional metadata describing the event.
2072+
placeholder: ''
2073+
defaultValue:
2074+
'@path': $.properties
2075+
required: false
2076+
multiple: false
2077+
choices: null
2078+
dynamic: false
2079+
allowNull: false
2080+
- id: pvLKevrkEtiUZX3ej5FX8j
2081+
name: Identify User
2082+
slug: identifyUser
2083+
description: >-
2084+
Set attributes for the user in CommandBar. If "Deploy via Segment" is
2085+
enabled, then also boot CommandBar for the user, which makes
2086+
CommandBar available to the user.
2087+
platform: WEB
2088+
hidden: false
2089+
defaultTrigger: type = "identify"
2090+
fields:
2091+
- id: hKTrpnhQGq971DN41bTxwo
2092+
sortOrder: 0
2093+
fieldKey: userId
2094+
label: User ID
2095+
type: STRING
2096+
description: The user's id
2097+
placeholder: ''
2098+
defaultValue:
2099+
'@path': $.userId
2100+
required: true
2101+
multiple: false
2102+
choices: null
2103+
dynamic: false
2104+
allowNull: false
2105+
- id: 5s6K64KCtWEicWtPLNEHLC
2106+
sortOrder: 1
2107+
fieldKey: hmac
2108+
label: HMAC
2109+
type: STRING
2110+
description: >-
2111+
Identify users with an HMAC of their user ID; this enables end
2112+
user customizable shortcuts and other features. [Learn about
2113+
identity
2114+
verification](https://app.commandbar.com/identity-verification).
2115+
placeholder: ''
2116+
defaultValue:
2117+
'@path': $.context.CommandBar.hmac
2118+
required: false
2119+
multiple: false
2120+
choices: null
2121+
dynamic: false
2122+
allowNull: false
2123+
- id: vxinbjJzUTff8CgP6nsdFk
2124+
sortOrder: 2
2125+
fieldKey: formFactor
2126+
label: Event Metadata
2127+
type: OBJECT
2128+
description: >-
2129+
Configures the way the bar is displayed. An 'inline' bar is always
2130+
visible and hosted within an element on your page. A 'modal' bar
2131+
will display in a modal dialog when open.
2132+
placeholder: ''
2133+
defaultValue:
2134+
'@path': $.context.CommandBar.formFactor
2135+
required: false
2136+
multiple: false
2137+
choices: null
2138+
dynamic: false
2139+
allowNull: false
2140+
- id: 3s9a5HaavqtKeaBzrmUE49
2141+
sortOrder: 3
2142+
fieldKey: traits
2143+
label: Traits
2144+
type: OBJECT
2145+
description: The Segment traits to be forwarded to CommandBar
2146+
placeholder: ''
2147+
defaultValue:
2148+
'@path': $.traits
2149+
required: false
2150+
multiple: false
2151+
choices: null
2152+
dynamic: false
2153+
allowNull: false
2154+
presets:
2155+
- actionId: 5cVhYfBJYs4sCSvLLoahGc
2156+
name: Track Event
2157+
fields:
2158+
event_name:
2159+
'@path': $.event
2160+
event_metadata:
2161+
'@path': $.properties
2162+
trigger: type = "track"
2163+
- actionId: pvLKevrkEtiUZX3ej5FX8j
2164+
name: Identify User
2165+
fields:
2166+
userId:
2167+
'@path': $.userId
2168+
hmac:
2169+
'@path': $.context.CommandBar.hmac
2170+
formFactor:
2171+
'@path': $.context.CommandBar.formFactor
2172+
traits:
2173+
'@path': $.traits
2174+
trigger: type = "identify"
20012175
- id: 63913b2bf906ea939f153851
20022176
display_name: Ripe
20032177
name: Ripe
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
---
2+
title: CommandBar Destination
3+
hide-boilerplate: true
4+
hide-dossier: true
5+
private: true
6+
hidden: true
7+
id: 638f843c4520d424f63c9e51
8+
---
9+
10+
[CommandBar](https://www.commandbar.com){:target="_blank"} gives your users a searchable index of your app's features and content, as well as customizable in-app components, like onboarding nudges. This helps you to better understand user intent and deliver step-change improvements in UX, for new and power users alike. By connecting Segment to CommandBar as a destination, you can trigger nudges and customize CommandBar functionality based on user events and user attributes. The integration also allows you to deploy CommandBar to your users.
11+
12+
To configure CommandBar as an Event Source to get data into your warehouse or other downstream tools, see the [CommandBar Source](/docs/connections/sources/catalog/cloud-apps/commandbar/) documentation.
13+
14+
{% include content/ajs-upgrade.md %}
15+
16+
17+
## Getting started
18+
19+
1. From the Segment web app, navigate to **Connections > Catalog**, then select the **Destinations** tab at the top of the catalog.
20+
2. Search for *CommandBar* and select it.
21+
3. Click **Configure CommandBar**.
22+
4. Sign in to [CommandBar](app.commandbar.com/login){:target="_blank"}, click on your organization name in the top right, and copy the `Org ID` into **Organization ID** field.
23+
5. If you want to deploy CommandBar to your users through Segment, check **Deploy via Segment**.
24+
6. Select an existing Source to connect to CommandBar.
25+
7. Once connected, remove the CommandBar snippet or `init` call from your code (if you have one).
26+
27+
<!-- The line below renders a table of connection settings (if applicable), Pre-built Mappings, and available actions. -->
28+
29+
{% include components/actions-fields.html %}
30+
31+

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

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -77,31 +77,38 @@ To send parameters to Google Analytics 4, use the Event Parameters or User Prope
7777
To achieve parity with Universal Analytics, you should create the same custom dimensions that you defined in Universal Analytics. Additionally, in Google Analytics 4, you should recreate many of the values that you tracked as event dimensions in Universal Analytics, particularly event category and event label. For more information, see [Google Analytics 4 Custom dimensions and metrics](https://support.google.com/analytics/answer/10075209){:target='_blank'}.
7878

7979
#### Tracking Active Users and Sessions
80+
81+
##### Server-side Implementation using Google Analytics 4 Destination
82+
8083
The Google Analytics 4 reports only display active users who engage with your site for a non-zero amount of time. To ensure users are rendered in reports, Segment sets the `engagement_time_msec` parameter to 1 by default. If you track engagement time on your Segment events, you can use the **Engagement Time in Milliseconds** field mapping to set `engagement_time_msec` to a different value.
8184

82-
If you choose to integrate with Google Analytics 4 client-side (using Gtag outside of Segment) _and_ also use Segment's Google Analytics 4 destination to send events through the API, you can track sessions server-side. When using Gtag, [Google generates a `session_id` and `session_number` when a session begins](https://support.google.com/analytics/answer/9191807?hl=en){:target='_blank'}. The `session_id` and `session_number` generated on the client can be passed as Event Parameters to stitch events sent through the API with the same session that was collected client-side.
85+
Besides Engagement Time in Milliseconds, you can also generate your own `session_id` and `session_number` and pass them as event properties to Segment. These properties can then be mapped to their corresponding parameters in Segment's Google Analytics 4 destination.
86+
87+
> info "Session tracking limitations"
88+
> Session tracking server-side only supports a subset of user dimensions. Certain reserved fields such as location, demographics, other [predefined user dimensions](https://support.google.com/analytics/answer/9268042?hl=en&ref_topic=11151952){:target='_blank'} and device-specific information are not supported by Google's Measurement Protocol API.
89+
90+
##### Using Gtag.js and Google Analytics 4 Destination
91+
92+
If you choose to integrate with Google Analytics 4 client-side (using Gtag outside of Segment) _and_ also use Segment's Google Analytics 4 destination to send events through the API, you will have all the reserved parameters and sessions tracking information available in Google Analytics 4 reports.
93+
94+
When using Gtag, [Google generates a `session_id` and `session_number` when a session begins](https://support.google.com/analytics/answer/9191807?hl=en){:target='_blank'}. The `session_id` and `session_number` generated on the client can be passed as Event Parameters to stitch events sent through the API with the same session that was collected client-side. For events to stitch properly, server-side events must arrive within a 48 hour window of when the client-side events arrive.
8395

8496
You can check your `session_id` and `session_number` with the [Google Site Tag function](https://developers.google.com/tag-platform/gtagjs/reference){:target='_blank'} or by running this script in your JavaScript console and replacing `G-xxxxxxxxxx` with your Google Analytics 4 Measurement ID:
8597

8698
```java
87-
const sessionIdPromise = new Promise(resolve => {
88-
gtag('get', 'G-xxxxxxxxxx', 'session_id', resolve)
99+
const sessionIdPromise = new Promise(resolve => {
100+
gtag('get', 'G-xxxxxxxxxx', 'session_id', resolve)
89101
});
90-
const sessionNumPromise = new Promise(resolve => {
91-
gtag('get', 'G-xxxxxxxxxx', 'session_number', resolve)
102+
const sessionNumPromise = new Promise(resolve => {
103+
gtag('get', 'G-xxxxxxxxxx', 'session_number', resolve)
92104
});
93105

94106
Promise.all([sessionIdPromise, sessionNumPromise]).then(function(session_data) {
95-
console.log("session ID: "+session_data[0]);
96-
console.log("session Number: "+session_data[1]);
107+
console.log("session ID: "+session_data[0]);
108+
console.log("session Number: "+session_data[1]);
97109
});
98110
```
99111

100-
> info "Session tracking limitations"
101-
> Session tracking server-side only works if you're also sending data to Google Analytics 4 client-side. This is because the `session_id` must match a value that was previously collected on the client. For events to stitch properly, they must arrive within a 48 hour window of when the client-side events arrived.
102-
>
103-
> Google doesn't currently support passing other reserved fields, such as [predefined user dimensions](https://support.google.com/analytics/answer/9268042?hl=en&ref_topic=11151952){:target='_blank'} or device-specific information, to the Measurement Protocol API.
104-
105112
#### User Identification
106113
Segment requires a Client ID to send data to Google Analytics 4. The Client ID is the web equivalent of a device identifier and uniquely identifies a given user instance of a web client. By default, Segment sets Client ID to the Segment `userId`, falling back on `anonymousId`. This mapping can be changed within each action if you prefer to map a different field to Client ID.
107114

src/connections/destinations/catalog/actions-salesforce/index.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,9 @@ To check how many API calls you have left in Salesforce, go to **Setup > Company
103103
When using the `create` operation, it's possible for duplicate records to be created in Salesforce. This is because Segment retries records once they hit the internal timeout. It's possible Salesforce's REST API eventually processes the original record in addition to the retried record, resulting in duplicates. You may encounter this behavior if Salesforce's REST API throttles your records (for example, due to hitting API limits or complex workflow automation). To prevent duplicates, you can use [Duplicate Rules](https://help.salesforce.com/s/articleView?id=duplicate_rules_map_of_reference.htm&language=en_US){:target="_blank"} in Salesforce. See set up information in [Resolve and Prevent Duplicate Data in Salesforce](https://trailhead.salesforce.com/content/learn/modules/sales_admin_duplicate_management/sales_admin_duplicate_management_unit_2){:target="_blank"}.
104104

105105
Please note this is only a concern when using the `create` operation. You can use the `upsert` operation instead to avoid duplicates if `upsert` meets your needs.
106+
107+
### How does Salesforce Bulk API work?
108+
When **Use Salesforce Bulk API** is enabled for your mapping, events are sent to [Salesforce’s Bulk API 2.0](https://developer.salesforce.com/docs/atlas.en-us.api_asynch.meta/api_asynch/asynch_api_intro.htm){:target="_blank"} rather than their streaming REST API. If enabled, Segment will collect events into batches of 1000 before sending to Salesforce. Bulk support can be used for the `upsert` or `update` operations only.
109+
110+
For bulk `update`, if a record in a batch is missing a Bulk Update Record ID, Segment will still send it to Salesforce. Salesforce will reject the individual record because it will be unable to find a record to update. Other records in the batch that are valid will still be processed. Please note that Segment's Event Delivery tab will show the entire batch as successful as Segment cannot currently break down Event Delivery stats into individual failed/passed events.
111+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
title: 'Google Ads Conversions Destination'
3+
hidden: true
4+
id: 60ae8b97dcb6cc52d5d0d5ab
5+
published: false
6+
---

0 commit comments

Comments
 (0)