const Analytics = require("analytics").default;
const plausiblePlugin = require("analytics-plugin-plausible").default;
const analytics = Analytics({
app: "RODA Marketplace",
plugins: [
plausiblePlugin({
domain: "...",
hashMode: false,
trackLocalhost: false,
apiHost: "...",
}),
],
});
(node:35700) UnhandledPromiseRejectionWarning: ReferenceError: location is not defined
at getConfig (/Users/mferreira/git/roda-market/01-code/images/marketplace/node_modules/plausible-tracker/build/main/lib/tracker.js:42:91)
at trackEvent (/Users/mferreira/git/roda-market/01-code/images/marketplace/node_modules/plausible-tracker/build/main/lib/tracker.js:44:72)
at Object.trackPageview (/Users/mferreira/git/roda-market/01-code/images/marketplace/node_modules/plausible-tracker/build/main/lib/tracker.js:47:9)
at Object.page (/Users/mferreira/git/roda-market/01-code/images/marketplace/node_modules/analytics-plugin-plausible/dist/plausible.js:53:31)
at /Users/mferreira/git/roda-market/01-code/images/marketplace/node_modules/@analytics/core/dist/server/analytics-core.js:1:7850
at processTicksAndRejections (internal/process/task_queues.js:95:5)
(node:35700) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 4)