Skip to content

Commit 7b204d3

Browse files
committed
update patch to gatsby-plugin-plausible
1 parent d4a9adf commit 7b204d3

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed
+6-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
diff --git a/node_modules/gatsby-plugin-plausible/gatsby-ssr.js b/node_modules/gatsby-plugin-plausible/gatsby-ssr.js
2-
index c00d563..785cddd 100755
2+
index c00d563..41e80ba 100755
33
--- a/node_modules/gatsby-plugin-plausible/gatsby-ssr.js
44
+++ b/node_modules/gatsby-plugin-plausible/gatsby-ssr.js
55
@@ -7,8 +7,8 @@ var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends")
66
var _react = _interopRequireDefault(require("react"));
7-
7+
88
var getOptions = function getOptions(pluginOptions) {
99
- var plausibleDomain = pluginOptions.customDomain || 'plausible.io';
1010
- var scriptURI = plausibleDomain === 'plausible.io' ? '/js/plausible.js' : '/js/index.js';
@@ -13,12 +13,13 @@ index c00d563..785cddd 100755
1313
var domain = pluginOptions.domain;
1414
var excludePaths = pluginOptions.excludePaths || [];
1515
var trackAcquisition = pluginOptions.trackAcquisition || false;
16-
@@ -44,7 +44,7 @@ exports.onRenderBody = function (_ref, pluginOptions) {
16+
@@ -44,7 +44,8 @@ exports.onRenderBody = function (_ref, pluginOptions) {
1717
async: true,
1818
defer: true,
1919
'data-domain': domain,
2020
- src: "https://" + plausibleDomain + scriptURI
21+
+ 'data-api': '/proxy/api/event',
2122
+ src: scriptURI
2223
};
23-
24-
if (trackAcquisition) {
24+
25+
if (trackAcquisition) {

yarn.lock

+1-1
Original file line numberDiff line numberDiff line change
@@ -9028,7 +9028,7 @@ gatsby-plugin-page-creator@^4.22.0:
90289028

90299029
gatsby-plugin-plausible@^0.0.7:
90309030
version "0.0.7"
9031-
resolved "https://registry.npmjs.org/gatsby-plugin-plausible/-/gatsby-plugin-plausible-0.0.7.tgz#6f8c922bbc672a73bd8e9a39add61fb62ec96566"
9031+
resolved "https://registry.yarnpkg.com/gatsby-plugin-plausible/-/gatsby-plugin-plausible-0.0.7.tgz#6f8c922bbc672a73bd8e9a39add61fb62ec96566"
90329032
integrity sha512-pWCXsrWal8lWMmZ1wJ2dolbwZZR1CZU1LVR/K1rYC8NeA+uqTLY8h3uH3hFgP5n8jmRRenOSJ9SjWM9OIdCjOA==
90339033
dependencies:
90349034
"@babel/runtime" "^7.9.2"

0 commit comments

Comments
 (0)