diff --git a/patches/gatsby-plugin-plausible+0.0.7.patch b/patches/gatsby-plugin-plausible+0.0.7.patch index a3f9162d7..5c8ced623 100644 --- a/patches/gatsby-plugin-plausible+0.0.7.patch +++ b/patches/gatsby-plugin-plausible+0.0.7.patch @@ -1,10 +1,10 @@ diff --git a/node_modules/gatsby-plugin-plausible/gatsby-ssr.js b/node_modules/gatsby-plugin-plausible/gatsby-ssr.js -index c00d563..785cddd 100755 +index c00d563..41e80ba 100755 --- a/node_modules/gatsby-plugin-plausible/gatsby-ssr.js +++ b/node_modules/gatsby-plugin-plausible/gatsby-ssr.js @@ -7,8 +7,8 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends") var _react = _interopRequireDefault(require("react")); - + var getOptions = function getOptions(pluginOptions) { - var plausibleDomain = pluginOptions.customDomain || 'plausible.io'; - var scriptURI = plausibleDomain === 'plausible.io' ? '/js/plausible.js' : '/js/index.js'; @@ -13,12 +13,13 @@ index c00d563..785cddd 100755 var domain = pluginOptions.domain; var excludePaths = pluginOptions.excludePaths || []; var trackAcquisition = pluginOptions.trackAcquisition || false; -@@ -44,7 +44,7 @@ exports.onRenderBody = function (_ref, pluginOptions) { +@@ -44,7 +44,8 @@ exports.onRenderBody = function (_ref, pluginOptions) { async: true, defer: true, 'data-domain': domain, - src: "https://" + plausibleDomain + scriptURI ++ 'data-api': '/proxy/api/event', + src: scriptURI }; - - if (trackAcquisition) { \ No newline at end of file + + if (trackAcquisition) { diff --git a/yarn.lock b/yarn.lock index e3662d0e7..b50e86841 100644 --- a/yarn.lock +++ b/yarn.lock @@ -9028,7 +9028,7 @@ gatsby-plugin-page-creator@^4.22.0: gatsby-plugin-plausible@^0.0.7: version "0.0.7" - resolved "https://registry.npmjs.org/gatsby-plugin-plausible/-/gatsby-plugin-plausible-0.0.7.tgz#6f8c922bbc672a73bd8e9a39add61fb62ec96566" + resolved "https://registry.yarnpkg.com/gatsby-plugin-plausible/-/gatsby-plugin-plausible-0.0.7.tgz#6f8c922bbc672a73bd8e9a39add61fb62ec96566" integrity sha512-pWCXsrWal8lWMmZ1wJ2dolbwZZR1CZU1LVR/K1rYC8NeA+uqTLY8h3uH3hFgP5n8jmRRenOSJ9SjWM9OIdCjOA== dependencies: "@babel/runtime" "^7.9.2"