From 51bd461dcec4a9667ec95db4d37f07850b7b662e Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Fri, 6 May 2022 15:53:48 +0300 Subject: [PATCH] add segment for API reference --- www/reference/gatsby-config.js | 8 ++++++++ www/reference/package.json | 1 + www/reference/yarn.lock | 5 +++++ 3 files changed, 14 insertions(+) diff --git a/www/reference/gatsby-config.js b/www/reference/gatsby-config.js index 90d5467b25..89feafe9af 100644 --- a/www/reference/gatsby-config.js +++ b/www/reference/gatsby-config.js @@ -65,6 +65,14 @@ module.exports = { allowList: ["ALGOLIA_API_KEY"], }, }, + { + resolve: `gatsby-plugin-segment-js`, + options: { + prodKey: process.env.SEGMENT_API_KEY, + devKey: process.env.SEGMENT_API_KEY_DEV, + trackPage: true, + } + }, // `gatsby-plugin-preact`, // { // resolve: `gatsby-source-openapi-aggregate`, diff --git a/www/reference/package.json b/www/reference/package.json index 1f0b25af62..0ccf61aa02 100644 --- a/www/reference/package.json +++ b/www/reference/package.json @@ -28,6 +28,7 @@ "gatsby-plugin-env-variables": "^2.1.0", "gatsby-plugin-preact": "^5.9.0", "gatsby-plugin-react-helmet": "^3.3.12", + "gatsby-plugin-segment-js": "^3.7.1", "gatsby-plugin-theme-ui": "^0.10.1", "gatsby-remark-autolink-headers": "^4.6.0", "gatsby-source-filesystem": "^3.9.0", diff --git a/www/reference/yarn.lock b/www/reference/yarn.lock index 3bf9eec530..3768a3367a 100644 --- a/www/reference/yarn.lock +++ b/www/reference/yarn.lock @@ -5425,6 +5425,11 @@ gatsby-plugin-react-helmet@^3.3.12: dependencies: "@babel/runtime" "^7.12.5" +gatsby-plugin-segment-js@^3.7.1: + version "3.7.1" + resolved "https://registry.yarnpkg.com/gatsby-plugin-segment-js/-/gatsby-plugin-segment-js-3.7.1.tgz#3432d59be0e45ee82f36a42cff060af220a0dd68" + integrity sha512-zAsjRrF77Kih7YRUJVp84thnODbzjDE44H6ePtdQfLVyPWiJj3IpS/WAwyRg9Cu3+FciFAT8WEjfJ2I02V0sUw== + gatsby-plugin-theme-ui@^0.10.1: version "0.10.1" resolved "https://registry.yarnpkg.com/gatsby-plugin-theme-ui/-/gatsby-plugin-theme-ui-0.10.1.tgz#d1ac7f4f1c4bf187694110a8670f0bb3ff470ad2"