Compare commits

...

26 Commits

Author SHA1 Message Date
Matthias Kretschmann a1d4da6c10
Release 0.16.2 2023-09-28 11:39:59 +01:00
Matthias Kretschmann 5df8121767
test against Node.js v18 & v20 2023-09-28 11:14:33 +01:00
Matthias Kretschmann 729c1ce921
bump Node.js version in CI 2023-09-28 11:09:33 +01:00
Matthias Kretschmann fe41f551e6
dependency updates, new package-lock 2023-09-28 11:04:25 +01:00
Matthias Kretschmann a4b1c3be07
Release 0.16.1 2023-08-17 12:53:35 +01:00
Matthias Kretschmann 1848c2ba4e
dependency updates 2023-08-17 12:48:37 +01:00
Matthias Kretschmann 3102610efe
update readme 2023-07-08 11:39:02 +01:00
Matthias Kretschmann 28ad5918c7
Release 0.16.0 2023-07-08 11:37:40 +01:00
Matthias Kretschmann d9a22c2467
switch default script names
- closes #233
2023-07-08 11:35:53 +01:00
Matthias Kretschmann 5b5f35aaf7
change eth address to ens name 2023-07-08 11:34:38 +01:00
Matthias Kretschmann 98103c87ea
remove eslint-plugin-prettier 2023-07-08 11:29:45 +01:00
Matthias Kretschmann 8e84c789ba
package updates 2023-07-08 11:25:55 +01:00
dependabot[bot] 3a28ad96cf
Bump eslint from 8.38.0 to 8.44.0 (#437) 2023-07-03 10:54:03 +01:00
Matthias Kretschmann d6ad15cc18
Release 0.15.2 2023-04-27 13:53:02 +02:00
Matthias Kretschmann 3974169706
dependency security fix 2023-04-27 13:52:42 +02:00
dependabot[bot] d3b1c8be41
Bump babel-preset-gatsby-package from 3.8.0 to 3.9.0 (#418)
Bumps [babel-preset-gatsby-package](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/babel-preset-gatsby-package) from 3.8.0 to 3.9.0.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/babel-preset-gatsby-package/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/commits/babel-preset-gatsby-package@3.9.0/packages/babel-preset-gatsby-package)

---
updated-dependencies:
- dependency-name: babel-preset-gatsby-package
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-27 13:50:17 +02:00
dependabot[bot] 38ae6bbe5e
Bump vm2 from 3.9.16 to 3.9.17 (#417)
Bumps [vm2](https://github.com/patriksimek/vm2) from 3.9.16 to 3.9.17.
- [Release notes](https://github.com/patriksimek/vm2/releases)
- [Changelog](https://github.com/patriksimek/vm2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/patriksimek/vm2/compare/3.9.16...3.9.17)

---
updated-dependencies:
- dependency-name: vm2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-27 13:50:09 +02:00
dependabot[bot] 1041dc1d08
Bump vm2 from 3.9.15 to 3.9.16 (#416)
Bumps [vm2](https://github.com/patriksimek/vm2) from 3.9.15 to 3.9.16.
- [Release notes](https://github.com/patriksimek/vm2/releases)
- [Changelog](https://github.com/patriksimek/vm2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/patriksimek/vm2/compare/3.9.15...3.9.16)

---
updated-dependencies:
- dependency-name: vm2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-15 14:44:43 +01:00
Matthias Kretschmann 42a33207b3
Release 0.15.1 2023-04-12 13:15:11 +01:00
Matthias Kretschmann 3d087e4e33
dependency updates 2023-04-12 13:14:46 +01:00
dependabot[bot] 5f53ac84e8
Bump prettier from 2.8.4 to 2.8.7 (#407)
Bumps [prettier](https://github.com/prettier/prettier) from 2.8.4 to 2.8.7.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/2.8.4...2.8.7)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-08 10:49:10 +01:00
dependabot[bot] 80db297e5d
Bump jest-environment-jsdom from 29.4.3 to 29.5.0 (#406)
Bumps [jest-environment-jsdom](https://github.com/facebook/jest/tree/HEAD/packages/jest-environment-jsdom) from 29.4.3 to 29.5.0.
- [Release notes](https://github.com/facebook/jest/releases)
- [Changelog](https://github.com/facebook/jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/jest/commits/v29.5.0/packages/jest-environment-jsdom)

---
updated-dependencies:
- dependency-name: jest-environment-jsdom
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-08 10:49:01 +01:00
dependabot[bot] 8701024764
Bump release-it from 15.9.0 to 15.10.0 (#411)
Bumps [release-it](https://github.com/release-it/release-it) from 15.9.0 to 15.10.0.
- [Release notes](https://github.com/release-it/release-it/releases)
- [Changelog](https://github.com/release-it/release-it/blob/main/CHANGELOG.md)
- [Commits](https://github.com/release-it/release-it/compare/15.9.0...15.10.0)

---
updated-dependencies:
- dependency-name: release-it
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-08 10:48:50 +01:00
dependabot[bot] 122b0b0a9c
Bump eslint-config-prettier from 8.6.0 to 8.8.0 (#408)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.6.0 to 8.8.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v8.6.0...v8.8.0)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-08 10:48:43 +01:00
dependabot[bot] 219233aeaa
Bump babel-preset-gatsby-package from 3.7.0 to 3.8.0 (#409)
Bumps [babel-preset-gatsby-package](https://github.com/gatsbyjs/gatsby/tree/HEAD/packages/babel-preset-gatsby-package) from 3.7.0 to 3.8.0.
- [Release notes](https://github.com/gatsbyjs/gatsby/releases)
- [Changelog](https://github.com/gatsbyjs/gatsby/blob/master/packages/babel-preset-gatsby-package/CHANGELOG.md)
- [Commits](https://github.com/gatsbyjs/gatsby/commits/babel-preset-gatsby-package@3.8.0/packages/babel-preset-gatsby-package)

---
updated-dependencies:
- dependency-name: babel-preset-gatsby-package
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-08 10:48:32 +01:00
dependabot[bot] 6bbba8bb6e
Bump vm2 from 3.9.11 to 3.9.15 (#412)
Bumps [vm2](https://github.com/patriksimek/vm2) from 3.9.11 to 3.9.15.
- [Release notes](https://github.com/patriksimek/vm2/releases)
- [Changelog](https://github.com/patriksimek/vm2/blob/master/CHANGELOG.md)
- [Commits](https://github.com/patriksimek/vm2/compare/3.9.11...3.9.15)

---
updated-dependencies:
- dependency-name: vm2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-08 10:48:18 +01:00
7 changed files with 4119 additions and 20921 deletions

View File

@ -1,6 +1,5 @@
{
"extends": ["eslint:recommended", "plugin:prettier/recommended"],
"plugins": ["prettier"],
"extends": ["eslint:recommended", "prettier"],
"parserOptions": {
"sourceType": "module",
"ecmaFeatures": {

View File

@ -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'

View File

@ -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)

View File

@ -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`

24930
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -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"
}
}

View File

@ -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,