Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@devular/gatsby-plugin-plausible
Advanced tools
A Gatsby plugin for adding Plausible analytics to your Gatsby site
This plugin was forked from pixelplicity/gatsby-plugin-plausible to support Plausible's proxying configuration.
A Gatsby plugin for adding Plausible analytics to your Gatsby site.
The plugin includes the Plausible tracking script. It supports using a custom domain and excluding specific paths from recording page views.
Install @devular.gatsby-plugin-plausible
npm install --save @devular/gatsby-plugin-plausible
Add plugin to gatsby-config.js
// In your gatsby-config.js
module.exports = {
plugins: [
// The only required option is the domain
{
resolve: `@devular/gatsby-plugin-plausible`,
options: {
domain: `your-site.com`,
proxyScript: `/sub-directory/script.js`,
proxyApi: `/sub-directory/api/event`,
},
},
],
};
This will install @devular/gatsby-plugin-plausible
and add a sample configuration.
Upgrade gatsby-cli and gatsby to the latest version:
npm install -g gatsby-cli@latest
npm install gatsby@latest
Run the recipe
gatsby recipes https://raw.githubusercontent.com/devular/gatsby-plugin-plausible/master/gatsby-recipe-plausible.mdx
Update gatsby-config.js
options.
To read more about recipes check out the announcement.
NOTE: By default, this plugin only generates output when run in production mode. To test your tracking code, run gatsby build && gatsby serve
.
Option | Explanation |
---|---|
domain | The domain configured in Plausible (required) |
proxyScript | A script location for a proxy configuration |
proxyApi | An collection endpoint for aproxy configurations |
excludePaths | Array of pathnames where page views will not be sent |
_NOTE: You can read more about proxying Plausible here
Pageviews are sent automatically when a user changes routes, including the initial load of your site.
To track goals and conversions you have to trigger custom events first.
window.plausible('Signup', {
callback: () => console.info('Sent Signup event'),
});
The event name can be anything. The second argument is an object with options. The only supported option is callback
that is called once the event has been sent.
NOTE: Custom events will not show up right away. You have to configure a goal in your Plausible dashboard.
See CHANGELOG.md.
Forked from: https://github.com/pixelplicity/gatsby-plugin-plausible with MIT
FAQs
A Gatsby plugin for adding Plausible analytics to your Gatsby site
The npm package @devular/gatsby-plugin-plausible receives a total of 3 weekly downloads. As such, @devular/gatsby-plugin-plausible popularity was classified as not popular.
We found that @devular/gatsby-plugin-plausible demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.