Skip to content
Closed
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
26 changes: 17 additions & 9 deletions scripts/catalogV2.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,16 @@ require('dotenv').config();
PLATFORM_API_URL = "https://platform.segmentapis.com"

const slugify = (displayName) => {
let slug = displayName.toLowerCase().replace(/\s+/g, '-')
if (slug === '.net') slug = 'net'
if (slug === 'roku-(alpha)') slug = 'roku'
let slug = displayName
.toLowerCase()
.replace(/\s+/g, '-')
.replace('-&-', '-')
.replace('/', '')
.replace(/[\(\)]/g, '')
.replace('.','')

if (slug === 'nodejs') slug = 'node'
if (slug === 'roku-alpha') slug = 'roku'
return slug
}

Expand Down Expand Up @@ -113,7 +120,8 @@ const updateSources = async () => {
const updateDestinations = async () => {
let destinations = []
let destinationsUpdated = []
let destinationCategories = new Set();
let destinationCategories = []
let categories = new Set()
let nextPageToken = null

while (nextPageToken !== "") {
Expand All @@ -129,8 +137,8 @@ const updateDestinations = async () => {
destinations.forEach(destination => {
let slug = slugify(destination.display_name)

let categories = [destination.categories.primary, destination.categories.secondary, ...destination.categories.additional]
categories = categories.filter(category => category != '')
let tempCategories = [destination.categories.primary, destination.categories.secondary, ...destination.categories.additional]
tempCategories = tempCategories.filter(category => category != '')

let updatedDestination = {
display_name: destination.display_name,
Expand All @@ -145,12 +153,12 @@ const updateDestinations = async () => {
mark: {
url: destination.logos.mark
},
categories
categories: tempCategories
}
destinationsUpdated.push(updatedDestination)

// add unique destination categories to set
categories.reduce((s, e) => s.add(e), destinationCategories);
tempCategories.reduce((s, e) => s.add(e), categories);
})

const destinationArray = Array.from(categories)
Expand All @@ -168,7 +176,7 @@ const updateDestinations = async () => {
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalogV2/destinations.yml`), output);

// Create source-category mapping yaml file
let output = "# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT\n"
output = "# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT\n"
output += yaml.safeDump({ items: destinationCategories }, options);
fs.writeFileSync(path.resolve(__dirname, `../src/_data/catalogV2/destination_categories.yml`), output);
}
Expand Down
50 changes: 25 additions & 25 deletions src/_data/catalogV2/destination_categories.yml
Original file line number Diff line number Diff line change
@@ -1,48 +1,48 @@
# AUTOGENERATED FROM PLATFORM API. DO NOT EDIT
items:
- display_name: Email Marketing
slug: email-marketing
- display_name: Advertising
slug: advertising
- display_name: Attribution
slug: attribution
- display_name: Analytics
slug: analytics
- display_name: Enrichment
slug: enrichment
- display_name: A/B Testing
slug: a/b-testing
- display_name: Email Marketing
slug: email-marketing
slug: ab-testing
- display_name: Customer Success
slug: customer-success
- display_name: Performance Monitoring
slug: performance-monitoring
- display_name: Attribution
slug: attribution
- display_name: Deep Linking
slug: deep-linking
- display_name: Video
slug: video
- display_name: Referrals
slug: referrals
- display_name: Heatmaps & Recordings
slug: heatmaps-&-recordings
- display_name: SMS & Push Notifications
slug: sms-&-push-notifications
slug: sms-push-notifications
- display_name: Marketing Automation
slug: marketing-automation
- display_name: Raw Data
slug: raw-data
- display_name: Personalization
slug: personalization
- display_name: Customer Success
slug: customer-success
- display_name: Referrals
slug: referrals
- display_name: Feature Flagging
slug: feature-flagging
- display_name: Heatmaps & Recordings
slug: heatmaps-recordings
- display_name: Surveys
slug: surveys
- display_name: Tag Managers
slug: tag-managers
- display_name: Livechat
slug: livechat
- display_name: CRM
slug: crm
- display_name: Raw Data
slug: raw-data
- display_name: Feature Flagging
slug: feature-flagging
- display_name: Marketing Automation
slug: marketing-automation
- display_name: Deep Linking
slug: deep-linking
- display_name: Security & Fraud
slug: security-&-fraud
slug: security-fraud
- display_name: Livechat
slug: livechat
- display_name: Tag Managers
slug: tag-managers
- display_name: Email
slug: email
53 changes: 26 additions & 27 deletions src/_data/catalogV2/destinations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ items:
name: catalog/destinations/adroll
description: >-
AdRoll is a retargeting network that allows you to show ads to visitors
who've landed on your site while browsing the web.
who've landed on your site while browsing the web.
url: connections/destinations/catalog/adroll
status: PUBLIC
logo:
Expand Down Expand Up @@ -84,7 +84,7 @@ items:
performance-driven marketers target and engage their app audiences with
customized, immersive creatives. Combining science and creativity, Adikteev
delivers measurable results that increase user LTV and fuel business
growth.
growth.
url: connections/destinations/catalog/adikteev
status: PUBLIC_BETA
logo:
Expand Down Expand Up @@ -927,7 +927,7 @@ items:
Cruncher provides an end-to-end data crunching platform with a focus on data
science and advanced analytics for analysts and business people. It lets you
bring all your siloed data sources in one place and empowers you to extract
deep insights using a powerful, yet simple interface.
deep insights using a powerful, yet simple interface.
url: connections/destinations/catalog/cruncher
status: PUBLIC_BETA
logo:
Expand Down Expand Up @@ -960,12 +960,12 @@ items:
- Surveys
- Customer Success
- display_name: CustomFit.ai
slug: customfit.ai
slug: customfitai
name: catalog/destinations/customfitai
description: >-
Chisel Hyper Customized App Experiences & Intelligent Alternative User
Journeys to increase market reach & App usage
url: connections/destinations/catalog/customfit.ai
url: connections/destinations/catalog/customfitai
status: PUBLIC_BETA
logo:
url: >-
Expand All @@ -980,13 +980,13 @@ items:
- Customer Success
- Marketing Automation
- display_name: Customer.io
slug: customer.io
slug: customerio
name: catalog/destinations/customer.io
description: >-
Customer.io is an automated email tool. It lets you set up rules to
automatically send emails to your users after they perform actions, making
drip email campaigns really easy.
url: connections/destinations/catalog/customer.io
url: connections/destinations/catalog/customerio
status: PUBLIC
logo:
url: 'https://cdn.filepicker.io/api/file/GyZ581zaSTmv9T1ivLE0'
Expand Down Expand Up @@ -1495,12 +1495,12 @@ items:
- Livechat
- CRM
- display_name: Google Ads (Classic)
slug: google-ads-(classic)
slug: google-ads-classic
name: catalog/destinations/adwords
description: >-
Advertise on Google and put your message in front of potential customers
right when they're searching for what you have to offer.
url: connections/destinations/catalog/google-ads-(classic)
url: connections/destinations/catalog/google-ads-classic
status: PUBLIC
logo:
url: 'https://cdn.filepicker.io/api/file/O54PEswFQAC7ZZDLSBZ5'
Expand All @@ -1509,12 +1509,12 @@ items:
categories:
- Advertising
- display_name: Google Ads (Gtag)
slug: google-ads-(gtag)
slug: google-ads-gtag
name: catalog/destinations/google-adwords-new
description: >-
Advertise on Google and put your message in front of potential customers
right when they're searching for what you have to offer.
url: connections/destinations/catalog/google-ads-(gtag)
url: connections/destinations/catalog/google-ads-gtag
status: PUBLIC_BETA
logo:
url: 'https://cdn.filepicker.io/api/file/xD85G8KNQhupxDbqnbHe'
Expand Down Expand Up @@ -1559,7 +1559,7 @@ items:
Ingest event streams from anywhere, at any scale, for simple, reliable,
real-time stream analytics. Google Cloud Pub/Sub is a simple, reliable,
scalable foundation for stream analytics and event-driven computing
systems.
systems.
url: connections/destinations/catalog/google-cloud-pubsub
status: PUBLIC
logo:
Expand Down Expand Up @@ -1611,7 +1611,6 @@ items:
url: >-
https://public-segment-devcenter-production.s3.amazonaws.com/b39d6ee9-1499-42f2-be9b-e5735043ddf5.svg
categories:
- Analytics
- Customer Success
- Performance Monitoring
- display_name: Heap
Expand Down Expand Up @@ -1834,13 +1833,13 @@ items:
- Customer Success
- Email Marketing
- display_name: Iron.io
slug: iron.io
slug: ironio
name: catalog/destinations/iron.io
description: >-
Iron.io provides a queueing service for building distributed applications.
Our integration will send your analytics data directly to their queues so
you can programmatically interact with them.
url: connections/destinations/catalog/iron.io
url: connections/destinations/catalog/ironio
status: PUBLIC
logo:
url: 'https://d3hotuclm6if1r.cloudfront.net/logos/iron-io-default.svg'
Expand Down Expand Up @@ -2239,7 +2238,7 @@ items:
description: >-
Mixpanel is an event tracking tool targeted at web apps with lots of
features: funnel, retention and people tracking; advanced segmentation; and
sending email and notifications.
sending email and notifications.
url: connections/destinations/catalog/mixpanel
status: PUBLIC
logo:
Expand Down Expand Up @@ -2761,12 +2760,12 @@ items:
categories:
- Analytics
- display_name: Promoter.io
slug: promoter.io
slug: promoterio
name: catalog/destinations/promoter.io
description: >-
Promoter.io helps companies grow by identifying and leveraging a brands most
loyal customers, or Promoters, who drive referrals and recommendations.
url: connections/destinations/catalog/promoter.io
url: connections/destinations/catalog/promoterio
status: PUBLIC
logo:
url: 'https://d3hotuclm6if1r.cloudfront.net/logos/promoter.io-default.svg'
Expand Down Expand Up @@ -2843,7 +2842,7 @@ items:
The Quora Conversion Pixel lets you track and optimize conversions from your
Quora Ad campaigns. This pixel sends data back to Quora so you can measure
activity, track conversions and optimize accordingly. After you've setup the
integration you can view conversions in the Quora Ads Manager.
integration you can view conversions in the Quora Ads Manager.
url: connections/destinations/catalog/quora-conversion-pixel
status: PUBLIC
logo:
Expand All @@ -2859,7 +2858,7 @@ items:
Connect™ is a complete business intelligence solution for understanding the
full user experience of your mobile app–from installation, to activity, to
conversion–with the flexibility to capture its unique business rules and
user behaviors.
user behaviors.
url: connections/destinations/catalog/radiumone-connect
status: PUBLIC
logo:
Expand Down Expand Up @@ -2928,7 +2927,7 @@ items:
name: catalog/destinations/repeater
description: >-
The Segment repeater integration repeats a source stream to one or multiple
other sources.
other sources.
url: connections/destinations/catalog/repeater
status: PUBLIC
logo:
Expand Down Expand Up @@ -3033,7 +3032,7 @@ items:
description: >-
Salescamp is designed for modern sales team, to simplify daily sales
activity and automation, lead collection, communication and deal
management.
management.
url: connections/destinations/catalog/salescamp-crm
status: PUBLIC_BETA
logo:
Expand Down Expand Up @@ -4056,7 +4055,7 @@ items:
behavior using actionable data. The platform delivers high quality and
reliable insights based on real-time data, in order for your business to
ensure the delivery of flawless video and a high quality of experiences to
your users.
your users.
url: connections/destinations/catalog/youbora
status: PUBLIC_BETA
logo:
Expand Down Expand Up @@ -4160,12 +4159,12 @@ items:
- Video
- Analytics
- display_name: goedle.io
slug: goedle.io
slug: goedleio
name: catalog/destinations/goedle
description: >-
Predict your customer’s behavior. Increase conversions and retention with
powerful AI and intelligent marketing automation.
url: connections/destinations/catalog/goedle.io
url: connections/destinations/catalog/goedleio
status: PUBLIC
logo:
url: 'https://cdn.filepicker.io/api/file/6vtAy6hSbeg4QMelSuJp'
Expand Down Expand Up @@ -4210,13 +4209,13 @@ items:
categories:
- Heatmaps & Recordings
- display_name: tray.io
slug: tray.io
slug: trayio
name: catalog/destinations/tray.io
description: >-
tray.io is a visual workflow tool for building custom integrations triggered
by Segment events. You can trigger workflows by passing data to over 60
tools including Salesforce, Slack, or Marketo.
url: connections/destinations/catalog/tray.io
url: connections/destinations/catalog/trayio
status: PUBLIC
logo:
url: 'https://cdn.filepicker.io/api/file/05dfa8PhRRyv2oXHUzGw'
Expand Down
4 changes: 2 additions & 2 deletions src/_data/catalogV2/source_categories.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ items:
- display_name: Marketing Automation
slug: marketing-automation
- display_name: SMS & Push Notifications
slug: sms-&-push-notifications
slug: sms-push-notifications
- display_name: Custom
slug: custom
- display_name: Analytics
Expand All @@ -31,7 +31,7 @@ items:
- display_name: Feature Flagging
slug: feature-flagging
- display_name: A/B Testing
slug: a/b-testing
slug: ab-testing
- display_name: Performance Monitoring
slug: performance-monitoring
- display_name: Advertising
Expand Down
Loading