Compare commits
26 Commits
Author | SHA1 | Date |
---|---|---|
Matthias Kretschmann | a1d4da6c10 | |
Matthias Kretschmann | 5df8121767 | |
Matthias Kretschmann | 729c1ce921 | |
Matthias Kretschmann | fe41f551e6 | |
Matthias Kretschmann | a4b1c3be07 | |
Matthias Kretschmann | 1848c2ba4e | |
Matthias Kretschmann | 3102610efe | |
Matthias Kretschmann | 28ad5918c7 | |
Matthias Kretschmann | d9a22c2467 | |
Matthias Kretschmann | 5b5f35aaf7 | |
Matthias Kretschmann | 98103c87ea | |
Matthias Kretschmann | 8e84c789ba | |
dependabot[bot] | 3a28ad96cf | |
Matthias Kretschmann | d6ad15cc18 | |
Matthias Kretschmann | 3974169706 | |
dependabot[bot] | d3b1c8be41 | |
dependabot[bot] | 38ae6bbe5e | |
dependabot[bot] | 1041dc1d08 | |
Matthias Kretschmann | 42a33207b3 | |
Matthias Kretschmann | 3d087e4e33 | |
dependabot[bot] | 5f53ac84e8 | |
dependabot[bot] | 80db297e5d | |
dependabot[bot] | 8701024764 | |
dependabot[bot] | 122b0b0a9c | |
dependabot[bot] | 219233aeaa | |
dependabot[bot] | 6bbba8bb6e |
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
|
||||
"plugins": ["prettier"],
|
||||
"extends": ["eslint:recommended", "prettier"],
|
||||
"parserOptions": {
|
||||
"sourceType": "module",
|
||||
"ecmaFeatures": {
|
||||
|
|
|
@ -18,11 +18,11 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest, windows-latest]
|
||||
node: ['14']
|
||||
node: ['18', '20']
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: ${{ matrix.node }}
|
||||
|
||||
|
@ -34,10 +34,10 @@ jobs:
|
|||
if: ${{ github.actor != 'dependabot[bot]' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
- run: npm ci
|
||||
- uses: paambaati/codeclimate-action@v2.7.5
|
||||
- uses: paambaati/codeclimate-action@v5.0.0
|
||||
env:
|
||||
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
|
||||
with:
|
||||
|
@ -48,8 +48,8 @@ jobs:
|
|||
if: success() && startsWith(github.ref, 'refs/tags')
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/setup-node@v2
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/setup-node@v3
|
||||
with:
|
||||
registry-url: 'https://registry.npmjs.org'
|
||||
|
||||
|
|
50
CHANGELOG.md
50
CHANGELOG.md
|
@ -4,8 +4,57 @@ All notable changes to this project will be documented in this file. Dates are d
|
|||
|
||||
Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
||||
|
||||
#### [v0.16.2](https://github.com/kremalicious/gatsby-plugin-matomo/compare/v0.16.1...v0.16.2)
|
||||
|
||||
- dependency updates, new package-lock [`fe41f55`](https://github.com/kremalicious/gatsby-plugin-matomo/commit/fe41f551e64f9985f8f5e84104cbd396a576074e)
|
||||
- bump Node.js version in CI [`729c1ce`](https://github.com/kremalicious/gatsby-plugin-matomo/commit/729c1ce9212732248cd76f5ea6f07d1f42530191)
|
||||
- test against Node.js v18 & v20 [`5df8121`](https://github.com/kremalicious/gatsby-plugin-matomo/commit/5df812176742f5dce873c7c01bedf1680b728fe7)
|
||||
|
||||
#### [v0.16.1](https://github.com/kremalicious/gatsby-plugin-matomo/compare/v0.16.0...v0.16.1)
|
||||
|
||||
> 17 August 2023
|
||||
|
||||
- dependency updates [`1848c2b`](https://github.com/kremalicious/gatsby-plugin-matomo/commit/1848c2ba4ecb7aff5c9524cc6b5ab155610c86e4)
|
||||
- Release 0.16.1 [`a4b1c3b`](https://github.com/kremalicious/gatsby-plugin-matomo/commit/a4b1c3be078ba753b68fe97e6f3bd5f74fcf7893)
|
||||
- update readme [`3102610`](https://github.com/kremalicious/gatsby-plugin-matomo/commit/3102610efe82825fc81ef34921db400596f3c67f)
|
||||
|
||||
#### [v0.16.0](https://github.com/kremalicious/gatsby-plugin-matomo/compare/v0.15.2...v0.16.0)
|
||||
|
||||
> 8 July 2023
|
||||
|
||||
- Bump eslint from 8.38.0 to 8.44.0 [`#437`](https://github.com/kremalicious/gatsby-plugin-matomo/pull/437)
|
||||
- switch default script names [`#233`](https://github.com/kremalicious/gatsby-plugin-matomo/issues/233)
|
||||
- package updates [`8e84c78`](https://github.com/kremalicious/gatsby-plugin-matomo/commit/8e84c789ba18e215c37fe1c3c55423124fb18b00)
|
||||
- remove eslint-plugin-prettier [`98103c8`](https://github.com/kremalicious/gatsby-plugin-matomo/commit/98103c87eabf6b80b421a66ad74b8a86c3c12cc2)
|
||||
- Release 0.16.0 [`28ad591`](https://github.com/kremalicious/gatsby-plugin-matomo/commit/28ad5918c73290468551f573200185cdf4389b18)
|
||||
|
||||
#### [v0.15.2](https://github.com/kremalicious/gatsby-plugin-matomo/compare/v0.15.1...v0.15.2)
|
||||
|
||||
> 27 April 2023
|
||||
|
||||
- Bump babel-preset-gatsby-package from 3.8.0 to 3.9.0 [`#418`](https://github.com/kremalicious/gatsby-plugin-matomo/pull/418)
|
||||
- Bump vm2 from 3.9.16 to 3.9.17 [`#417`](https://github.com/kremalicious/gatsby-plugin-matomo/pull/417)
|
||||
- Bump vm2 from 3.9.15 to 3.9.16 [`#416`](https://github.com/kremalicious/gatsby-plugin-matomo/pull/416)
|
||||
- Release 0.15.2 [`d6ad15c`](https://github.com/kremalicious/gatsby-plugin-matomo/commit/d6ad15cc1886afd916ec6d1c4a84cf86d1aa34bc)
|
||||
- dependency security fix [`3974169`](https://github.com/kremalicious/gatsby-plugin-matomo/commit/39741697066a04465e9156aa5336aae5c14ec589)
|
||||
|
||||
#### [v0.15.1](https://github.com/kremalicious/gatsby-plugin-matomo/compare/v0.15.0...v0.15.1)
|
||||
|
||||
> 12 April 2023
|
||||
|
||||
- Bump prettier from 2.8.4 to 2.8.7 [`#407`](https://github.com/kremalicious/gatsby-plugin-matomo/pull/407)
|
||||
- Bump jest-environment-jsdom from 29.4.3 to 29.5.0 [`#406`](https://github.com/kremalicious/gatsby-plugin-matomo/pull/406)
|
||||
- Bump release-it from 15.9.0 to 15.10.0 [`#411`](https://github.com/kremalicious/gatsby-plugin-matomo/pull/411)
|
||||
- Bump eslint-config-prettier from 8.6.0 to 8.8.0 [`#408`](https://github.com/kremalicious/gatsby-plugin-matomo/pull/408)
|
||||
- Bump babel-preset-gatsby-package from 3.7.0 to 3.8.0 [`#409`](https://github.com/kremalicious/gatsby-plugin-matomo/pull/409)
|
||||
- Bump vm2 from 3.9.11 to 3.9.15 [`#412`](https://github.com/kremalicious/gatsby-plugin-matomo/pull/412)
|
||||
- dependency updates [`3d087e4`](https://github.com/kremalicious/gatsby-plugin-matomo/commit/3d087e4e33ed0fc05d49a5889a12354a4083101d)
|
||||
- Release 0.15.1 [`42a3320`](https://github.com/kremalicious/gatsby-plugin-matomo/commit/42a33207b303bb7f0442cab787f8d0d2b3f50d7a)
|
||||
|
||||
#### [v0.15.0](https://github.com/kremalicious/gatsby-plugin-matomo/compare/v0.14.0...v0.15.0)
|
||||
|
||||
> 23 March 2023
|
||||
|
||||
- Bump prettier from 2.8.3 to 2.8.4 [`#391`](https://github.com/kremalicious/gatsby-plugin-matomo/pull/391)
|
||||
- Bump eslint from 8.33.0 to 8.36.0 [`#401`](https://github.com/kremalicious/gatsby-plugin-matomo/pull/401)
|
||||
- Bump release-it from 15.6.0 to 15.9.0 [`#405`](https://github.com/kremalicious/gatsby-plugin-matomo/pull/405)
|
||||
|
@ -37,6 +86,7 @@ Generated by [`auto-changelog`](https://github.com/CookPete/auto-changelog).
|
|||
- Bump json5 from 1.0.1 to 1.0.2 [`#375`](https://github.com/kremalicious/gatsby-plugin-matomo/pull/375)
|
||||
- Bump decode-uri-component from 0.2.0 to 0.2.2 [`#370`](https://github.com/kremalicious/gatsby-plugin-matomo/pull/370)
|
||||
- Bump loader-utils from 1.4.1 to 1.4.2 [`#365`](https://github.com/kremalicious/gatsby-plugin-matomo/pull/365)
|
||||
- Release 0.15.0 [`6919fc6`](https://github.com/kremalicious/gatsby-plugin-matomo/commit/6919fc6b1a8f9f91a8fc05a952d7ca7f318fca8d)
|
||||
|
||||
#### [v0.14.0](https://github.com/kremalicious/gatsby-plugin-matomo/compare/v0.13.0...v0.14.0)
|
||||
|
||||
|
|
14
README.md
14
README.md
|
@ -69,14 +69,14 @@ _NOTE: By default, this plugin only generates output when run in production mode
|
|||
| `siteId` | Your Matomo site ID configured in your Matomo installation. |
|
||||
| `matomoUrl` | The url of your Matomo installation. |
|
||||
| `siteUrl` | The url of your site, usually the same as `siteMetadata.siteUrl`. Only used for generating the url for `noscript` image tracking fallback. |
|
||||
| `matomoPhpScript` | (optional) The name of your Matomo PHP script. Defaults to `piwik.php` |
|
||||
| `matomoJsScript` | (optional) The name of your Matomo JS script. Defaults to `piwik.js` |
|
||||
| `matomoPhpScript` | (optional) The name of your Matomo PHP script. Defaults to `matomo.php` |
|
||||
| `matomoJsScript` | (optional) The name of your Matomo JS script. Defaults to `matomo.js` |
|
||||
| `exclude` | (optional) Specify an array of pathnames where tracking code will be excluded. The pathname `/offline-plugin-app-shell-fallback/` is excluded by default. |
|
||||
| `requireConsent` | (optional) If true, tracking will be disabled until you call `window._paq.push(['setConsentGiven']);`. |
|
||||
| `requireCookieConsent` | (optional) If true, no cookies will be stored or used until you call `window._paq.push(['setCookieConsentGiven']);`. |
|
||||
| `disableCookies` | (optional) If true, no cookie will be used by Matomo. |
|
||||
| `cookieDomain` | (optional) Specify cookie domain. |
|
||||
| `localScript` | (optional) If set, load local `piwik.js` script from the given path, instead of loading it from your `matomoUrl`. |
|
||||
| `localScript` | (optional) If set, load local `matomo.js` script from the given path, instead of loading it from your `matomoUrl`. |
|
||||
| `trackLoad` | (optional) If true, it will track the loading of the matomo library. Defaults to `true`. |
|
||||
| `respectDnt` | (optional) If false, will load all scripts without respecting user preference to `Do Not Track` on browsers. Defaults to `true`. |
|
||||
| `dev` | (optional) Activate dev mode by setting to `true`. Will load all scripts despite not running in `production` environment. Ignores your local browser's DNT header too. Outputs some information in console about what it is doing. Useful for local testing but careful: all hits will be send like in production. |
|
||||
|
@ -91,14 +91,14 @@ plugins: [
|
|||
matomoUrl: 'https://YOUR_MATOMO_URL.COM',
|
||||
siteUrl: 'https://YOUR_LIVE_SITE_URL.COM',
|
||||
// All the optional settings
|
||||
matomoPhpScript: 'piwik.php',
|
||||
matomoJsScript: 'piwik.js',
|
||||
matomoPhpScript: 'matomo.php',
|
||||
matomoJsScript: 'matomo.js',
|
||||
exclude: ['/offline-plugin-app-shell-fallback/'],
|
||||
requireConsent: false,
|
||||
requireCookieConsent: false,
|
||||
disableCookies: false,
|
||||
cookieDomain: '*.example.org',
|
||||
localScript: '/piwik.js',
|
||||
localScript: '/matomo.js',
|
||||
dev: false,
|
||||
enableJSErrorTracking: true,
|
||||
additionalTrackers: [
|
||||
|
@ -152,4 +152,4 @@ Say thanks with BTC:
|
|||
`35UUssHexVK48jbiSgTxa4QihEoCqrwCTG`
|
||||
|
||||
Say thanks with ETH:
|
||||
`0x04354F554536DA108726829207958d3E277f0210`
|
||||
`krema.eth`
|
||||
|
|
File diff suppressed because it is too large
Load Diff
23
package.json
23
package.json
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "gatsby-plugin-matomo",
|
||||
"description": "Gatsby plugin to add Matomo (formerly Piwik) onto a site.",
|
||||
"version": "0.15.0",
|
||||
"version": "0.16.2",
|
||||
"author": "Matthias Kretschmann <m@kretschmann.io>",
|
||||
"scripts": {
|
||||
"build": "cross-env NODE_ENV=production babel src --out-dir . --ignore **/__tests__",
|
||||
|
@ -14,18 +14,18 @@
|
|||
"prepublishOnly": "npm run build"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.19.3",
|
||||
"@babel/cli": "^7.23.0",
|
||||
"@babel/core": "^7.23.0",
|
||||
"auto-changelog": "^2.4.0",
|
||||
"babel-preset-gatsby-package": "^3.0.0",
|
||||
"babel-preset-gatsby-package": "^3.12.0",
|
||||
"cross-env": "^7.0.3",
|
||||
"eslint": "^8.27.0",
|
||||
"eslint-config-prettier": "^8.5.0",
|
||||
"eslint-plugin-prettier": "^4.2.1",
|
||||
"jest": "^29.3.0",
|
||||
"jest-environment-jsdom": "^29.3.0",
|
||||
"prettier": "^2.7.1",
|
||||
"eslint": "^8.50.0",
|
||||
"eslint-config-prettier": "^9.0.0",
|
||||
"jest": "^29.7.0",
|
||||
"jest-environment-jsdom": "^29.7.0",
|
||||
"prettier": "^3.0.3",
|
||||
"react": "^18.2.0",
|
||||
"release-it": "^15.5.0"
|
||||
"release-it": "^16.2.1"
|
||||
},
|
||||
"homepage": "https://kremalicious.com/gatsby-plugin-matomo",
|
||||
"keywords": [
|
||||
|
@ -46,5 +46,8 @@
|
|||
"repository": "github:kremalicious/gatsby-plugin-matomo",
|
||||
"bugs": {
|
||||
"url": "https://github.com/kremalicious/gatsby-plugin-matomo/issues"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=18"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,8 +4,8 @@ import React from 'react'
|
|||
function buildTrackingCode(pluginOptions) {
|
||||
const {
|
||||
matomoUrl,
|
||||
matomoPhpScript = 'piwik.php',
|
||||
matomoJsScript = 'piwik.js',
|
||||
matomoPhpScript = 'matomo.php',
|
||||
matomoJsScript = 'matomo.js',
|
||||
siteId,
|
||||
dev,
|
||||
localScript,
|
||||
|
|
Loading…
Reference in New Issue