From 606eced913f48eae43f285108def935f0e3351f9 Mon Sep 17 00:00:00 2001 From: XavierAgostini Date: Mon, 28 Oct 2019 11:27:30 -0700 Subject: [PATCH 1/3] fix destination categories, and improve slugify --- scripts/catalogV2.js | 26 +++++---- .../catalogV2/destination_categories.yml | 50 ++++++++--------- src/_data/catalogV2/destinations.yml | 53 +++++++++---------- src/_data/catalogV2/source_categories.yml | 4 +- src/_data/catalogV2/sources.yml | 14 ++--- 5 files changed, 77 insertions(+), 70 deletions(-) diff --git a/scripts/catalogV2.js b/scripts/catalogV2.js index c1f9ec1464..a196391a9e 100644 --- a/scripts/catalogV2.js +++ b/scripts/catalogV2.js @@ -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 } @@ -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 !== "") { @@ -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, @@ -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) @@ -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); } diff --git a/src/_data/catalogV2/destination_categories.yml b/src/_data/catalogV2/destination_categories.yml index 3f40ba8c2a..a6d2cdd968 100644 --- a/src/_data/catalogV2/destination_categories.yml +++ b/src/_data/catalogV2/destination_categories.yml @@ -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 diff --git a/src/_data/catalogV2/destinations.yml b/src/_data/catalogV2/destinations.yml index 9e8c755549..dd7808541b 100644 --- a/src/_data/catalogV2/destinations.yml +++ b/src/_data/catalogV2/destinations.yml @@ -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: @@ -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: @@ -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: @@ -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: >- @@ -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' @@ -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' @@ -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' @@ -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: @@ -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 @@ -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' @@ -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: @@ -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' @@ -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: @@ -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: @@ -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: @@ -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: @@ -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: @@ -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' @@ -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' diff --git a/src/_data/catalogV2/source_categories.yml b/src/_data/catalogV2/source_categories.yml index 9d294cb245..653939a096 100644 --- a/src/_data/catalogV2/source_categories.yml +++ b/src/_data/catalogV2/source_categories.yml @@ -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 @@ -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 diff --git a/src/_data/catalogV2/sources.yml b/src/_data/catalogV2/sources.yml index 787118030a..acd6656772 100644 --- a/src/_data/catalogV2/sources.yml +++ b/src/_data/catalogV2/sources.yml @@ -159,13 +159,13 @@ items: categories: - Server - display_name: Customer.io - slug: customer.io + slug: customerio name: catalog/sources/customerio 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/sources/catalog/cloud-apps/customer.io + url: connections/sources/catalog/cloud-apps/customerio logo: url: 'https://d3hotuclm6if1r.cloudfront.net/logos/customerio-default.svg' mark: @@ -271,7 +271,7 @@ items: slug: javascript name: catalog/sources/javascript description: >- - This is our most flexible and powerful tracking system, using analytics.js. + This is our most flexible and powerful tracking system, using analytics.js. Track and analyze information about your visitors and customers, and every action that they take, in any of our 140 integrations, business intelligence tools, or directly with SQL tools. @@ -378,10 +378,10 @@ items: - Customer Success - Performance Monitoring - display_name: Node.js - slug: node.js + slug: node name: catalog/sources/node.js description: '' - url: connections/sources/catalog/libraries/server/node.js + url: connections/sources/catalog/libraries/server/node logo: url: 'https://cdn.filepicker.io/api/file/1gENqOjST9GLydIWdznH' mark: @@ -526,12 +526,12 @@ items: categories: - Server - display_name: Shopify (by Littledata) - slug: shopify-(by-littledata) + slug: shopify-by-littledata name: catalog/sources/shopify-littledata description: >- Littledata is a third-party plugin for installing Segment and collecting robust ecommerce data on your Shopify store - url: connections/sources/catalog/libraries/website/shopify-(by-littledata) + url: connections/sources/catalog/libraries/website/shopify-by-littledata logo: url: 'https://cdn.filepicker.io/api/file/o871amWREKVzwCH3GNXN' mark: From 1f0e4b6c68cddf6b3671b51916af55a899e818ea Mon Sep 17 00:00:00 2001 From: XavierAgostini Date: Mon, 28 Oct 2019 12:07:41 -0700 Subject: [PATCH 2/3] fix icon name --- src/_includes/icons/destinations-catalog/a-b-testing.svg | 1 - 1 file changed, 1 deletion(-) delete mode 100644 src/_includes/icons/destinations-catalog/a-b-testing.svg diff --git a/src/_includes/icons/destinations-catalog/a-b-testing.svg b/src/_includes/icons/destinations-catalog/a-b-testing.svg deleted file mode 100644 index 4b4a93a44c..0000000000 --- a/src/_includes/icons/destinations-catalog/a-b-testing.svg +++ /dev/null @@ -1 +0,0 @@ - From 437e324a9d115107810b4542fb07113acd8cb3bd Mon Sep 17 00:00:00 2001 From: XavierAgostini Date: Mon, 28 Oct 2019 12:11:06 -0700 Subject: [PATCH 3/3] add missing icon --- src/_includes/icons/destinations-catalog/ab-testing.svg | 1 + 1 file changed, 1 insertion(+) create mode 100644 src/_includes/icons/destinations-catalog/ab-testing.svg diff --git a/src/_includes/icons/destinations-catalog/ab-testing.svg b/src/_includes/icons/destinations-catalog/ab-testing.svg new file mode 100644 index 0000000000..4b4a93a44c --- /dev/null +++ b/src/_includes/icons/destinations-catalog/ab-testing.svg @@ -0,0 +1 @@ +