Commit Graph

90 Commits

Author SHA1 Message Date
RobertJoonas
b49fc82c2b
add size reporter GH action (#4745) 2024-10-28 09:59:16 +00:00
RobertJoonas
af94f01310
Fix experimental pageleaves script (SPAs) (#4667)
* bugfix: make sure to send pageleave with current URL

* another bugfix: avoid triggering pageleaves in SPAs unless listeningPageLeave is true

* revert behavioural change in manual extension

* test manual script extension
2024-10-14 09:34:47 +00:00
RobertJoonas
799edec81c
Trigger pageviews on pages loaded from bfcache (#4656)
* trigger pageview on pageshow with event.persisted

* update _tracking.html to do the same
2024-10-08 09:11:03 +00:00
RobertJoonas
5c72de0155
Experimental pageleave events (#4624)
* add experimental pageleave script variant

* also send pageleave events on SPA navigation

* disallow goals with 'pageleave' event name

* do not count pageleaves towards the event metric

* remove duplication in test file

* do not update sessions on pageleave events

* ignore pageleaves in the current time_on_page implementation

* make pageleave events not billable

* rename function

* Prevent multiple pageleaves being sent at the same time
2024-09-30 12:52:40 +00:00
hq1
c81cb16933
Snippet integration verification (#4106)
* Allow running browserless.io locally

* Compile tailwind classes based on extra/ too

* Add browserless runtime configuration

* Ignore verification events on ingestion

* Improve extracting HTML text in tests

* Update dependencies

- Floki will be used on production to parse site contents
- Req will be used to handle redundant stuff like retrying etc.

* Add shuttle SVG to generic components

Later on we'll use it to indicate verification errors

* Connect live socket & allow skipping awaiting the first pageview

* Connect live socket in general settings

* Implement verification checks & diagnostics

* Stub remote services with Req for testing

* Change snippet screen copy

* Update tracker script, so that:

1. headless browsers aren't ignored if `window.__plausible` is defined
2. callback optionally supplies the event response HTTP status

This will be later used to check whether the server acknowledged
the verification event.

* Implement LiveView verification UI

* Embed the verification UIs into settings and onboarding

* Implement browserless puppeteer verification script

It:
 - tries to visit the site
 - defines window.__plausible, so the tracker doesn't ignore test events
 - sends a verification event and instruments the callback
 - awaits the callback to fire and returns the result

* Improve diagnostics for CSP

Only report CSP error if the snippet is already found

* Put verification behind a feature flag/env setting

* Contact Us hint only for Enterprise Edition

* For headless code, use JS context instead of EEx interpolation

* Update diagnostics test with WordPress scenarios

* Shorten exception/throw interception

* Rename test

* Tidy up

* Bust URL always on headless check

* Update moduledoc

* Detect official Plausible WordPress Plugin

and act accordingly on diagnostics interoperation

* Stop using 'rating' in favour of 'interpretation'

* Only report CSP error if no proxy is likely

* Update CHANGELOG

* Allow event-* attributes on snippet elements

* Improve naive GTM detection, not to confuse it with GA4

* Update lib/plausible/verification.ex

Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>

* Update test/plausible/site/verification/checks_test.exs

Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>

* s/perform_wrapped/perform_safe

* Update lib/plausible/verification/checks/installation.ex

Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>

* Remove garbage

---------

Co-authored-by: Adrian Gruntkowski <adrian.gruntkowski@gmail.com>
2024-05-23 15:00:50 +02:00
Mathijs Kadijk
9944b301ec
Add dmg to the list of default tracked files (#4085)
Co-authored-by: Uku Taht <Uku.taht@gmail.com>
2024-05-14 10:10:18 +03:00
dependabot[bot]
85c9771d11
Bump @playwright/test from 1.40.1 to 1.41.1 in /tracker (#3744)
Bumps [@playwright/test](https://github.com/microsoft/playwright) from 1.40.1 to 1.41.1.
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.40.1...v1.41.1)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-type: direct:production
  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>
2024-02-01 08:09:34 +01:00
dependabot[bot]
63c4c1d07b
Bump eslint from 8.55.0 to 8.56.0 in /tracker (#3640)
Bumps [eslint](https://github.com/eslint/eslint) from 8.55.0 to 8.56.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.55.0...v8.56.0)

---
updated-dependencies:
- dependency-name: eslint
  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>
2024-01-31 09:01:55 +01:00
dependabot[bot]
0a49511052
Bump eslint-plugin-playwright from 0.19.0 to 0.20.0 in /tracker (#3621)
Bumps [eslint-plugin-playwright](https://github.com/playwright-community/eslint-plugin-playwright) from 0.19.0 to 0.20.0.
- [Release notes](https://github.com/playwright-community/eslint-plugin-playwright/releases)
- [Changelog](https://github.com/playwright-community/eslint-plugin-playwright/blob/main/CHANGELOG.md)
- [Commits](https://github.com/playwright-community/eslint-plugin-playwright/compare/v0.19.0...v0.20.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-playwright
  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-12-14 11:26:29 -03:00
dependabot[bot]
906b06ae84
Bump eslint from 8.54.0 to 8.55.0 in /tracker (#3586)
Bumps [eslint](https://github.com/eslint/eslint) from 8.54.0 to 8.55.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.54.0...v8.55.0)

---
updated-dependencies:
- dependency-name: eslint
  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-12-12 08:20:16 -03:00
dependabot[bot]
466958ea60
Bump eslint-plugin-playwright from 0.18.0 to 0.19.0 in /tracker (#3578)
Bumps [eslint-plugin-playwright](https://github.com/playwright-community/eslint-plugin-playwright) from 0.18.0 to 0.19.0.
- [Release notes](https://github.com/playwright-community/eslint-plugin-playwright/releases)
- [Changelog](https://github.com/playwright-community/eslint-plugin-playwright/blob/main/CHANGELOG.md)
- [Commits](https://github.com/playwright-community/eslint-plugin-playwright/compare/v0.18.0...v0.19.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-playwright
  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-12-01 11:34:30 -03:00
dependabot[bot]
736baa25d8
Bump @playwright/test from 1.40.0 to 1.40.1 in /tracker (#3565)
Bumps [@playwright/test](https://github.com/microsoft/playwright) from 1.40.0 to 1.40.1.
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.40.0...v1.40.1)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-type: direct:production
  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-11-29 12:56:29 -03:00
dependabot[bot]
f01b76cc41
Bump eslint from 8.53.0 to 8.54.0 in /tracker (#3533)
Bumps [eslint](https://github.com/eslint/eslint) from 8.53.0 to 8.54.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.53.0...v8.54.0)

---
updated-dependencies:
- dependency-name: eslint
  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-11-21 11:26:27 -03:00
dependabot[bot]
a2c9ba191e
Bump @playwright/test from 1.39.0 to 1.40.0 in /tracker (#3528)
Bumps [@playwright/test](https://github.com/microsoft/playwright) from 1.39.0 to 1.40.0.
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.39.0...v1.40.0)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-type: direct:production
  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-11-17 07:38:21 -03:00
dependabot[bot]
53e4d64195
Bump eslint from 8.52.0 to 8.53.0 in /tracker (#3488)
Bumps [eslint](https://github.com/eslint/eslint) from 8.52.0 to 8.53.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.52.0...v8.53.0)

---
updated-dependencies:
- dependency-name: eslint
  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-11-14 09:40:26 -03:00
dependabot[bot]
65021f9304
Bump eslint from 8.51.0 to 8.52.0 in /tracker (#3462)
Bumps [eslint](https://github.com/eslint/eslint) from 8.51.0 to 8.52.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.51.0...v8.52.0)

---
updated-dependencies:
- dependency-name: eslint
  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-10-31 14:58:32 -03:00
dependabot[bot]
f4cbefbcb4
Bump eslint-plugin-playwright from 0.16.0 to 0.18.0 in /tracker (#3451)
Bumps [eslint-plugin-playwright](https://github.com/playwright-community/eslint-plugin-playwright) from 0.16.0 to 0.18.0.
- [Release notes](https://github.com/playwright-community/eslint-plugin-playwright/releases)
- [Changelog](https://github.com/playwright-community/eslint-plugin-playwright/blob/main/CHANGELOG.md)
- [Commits](https://github.com/playwright-community/eslint-plugin-playwright/compare/v0.16.0...v0.18.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-playwright
  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-10-25 09:00:54 -03:00
dependabot[bot]
d6b5b2939b
Bump @playwright/test from 1.37.1 to 1.39.0 in /tracker (#3415)
Bumps [@playwright/test](https://github.com/microsoft/playwright) from 1.37.1 to 1.39.0.
- [Release notes](https://github.com/microsoft/playwright/releases)
- [Commits](https://github.com/microsoft/playwright/compare/v1.37.1...v1.39.0)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-type: direct:production
  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-10-13 13:41:03 -03:00
dependabot[bot]
6c018f884a
Bump eslint from 8.48.0 to 8.51.0 in /tracker (#3402)
Bumps [eslint](https://github.com/eslint/eslint) from 8.48.0 to 8.51.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.48.0...v8.51.0)

---
updated-dependencies:
- dependency-name: eslint
  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-10-11 09:37:41 -03:00
dependabot[bot]
f740cc899f
Bump eslint-plugin-playwright from 0.15.3 to 0.16.0 in /tracker (#3312)
Bumps [eslint-plugin-playwright](https://github.com/playwright-community/eslint-plugin-playwright) from 0.15.3 to 0.16.0.
- [Release notes](https://github.com/playwright-community/eslint-plugin-playwright/releases)
- [Changelog](https://github.com/playwright-community/eslint-plugin-playwright/blob/main/CHANGELOG.md)
- [Commits](https://github.com/playwright-community/eslint-plugin-playwright/compare/v0.15.3...v0.16.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-playwright
  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-09-01 09:13:05 -03:00
dependabot[bot]
691f4d36a5
Bump eslint from 8.46.0 to 8.48.0 in /tracker (#3302)
Bumps [eslint](https://github.com/eslint/eslint) from 8.46.0 to 8.48.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.46.0...v8.48.0)

---
updated-dependencies:
- dependency-name: eslint
  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-08-31 11:15:02 -03:00
dependabot[bot]
dbc3b91a4b
Bump @playwright/test from 1.37.0 to 1.37.1 in /tracker (#3275)
Bumps [@playwright/test](https://github.com/Microsoft/playwright) from 1.37.0 to 1.37.1.
- [Release notes](https://github.com/Microsoft/playwright/releases)
- [Commits](https://github.com/Microsoft/playwright/compare/v1.37.0...v1.37.1)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-type: direct:production
  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-08-24 14:23:25 -03:00
dependabot[bot]
d6d4d3dd75
Bump @playwright/test from 1.36.2 to 1.37.0 in /tracker (#3255)
Bumps [@playwright/test](https://github.com/Microsoft/playwright) from 1.36.2 to 1.37.0.
- [Release notes](https://github.com/Microsoft/playwright/releases)
- [Commits](https://github.com/Microsoft/playwright/compare/v1.36.2...v1.37.0)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-type: direct:production
  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-08-17 10:03:19 -03:00
dependabot[bot]
c9f683aaee
Bump handlebars from 4.7.7 to 4.7.8 in /tracker (#3218)
Bumps [handlebars](https://github.com/handlebars-lang/handlebars.js) from 4.7.7 to 4.7.8.
- [Release notes](https://github.com/handlebars-lang/handlebars.js/releases)
- [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/v4.7.8/release-notes.md)
- [Commits](https://github.com/handlebars-lang/handlebars.js/compare/v4.7.7...v4.7.8)

---
updated-dependencies:
- dependency-name: handlebars
  dependency-type: direct:production
  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-08-02 13:46:18 +02:00
dependabot[bot]
43103b27a9
Bump eslint from 8.45.0 to 8.46.0 in /tracker (#3211)
Bumps [eslint](https://github.com/eslint/eslint) from 8.45.0 to 8.46.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.45.0...v8.46.0)

---
updated-dependencies:
- dependency-name: eslint
  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-07-31 09:50:24 +01:00
dependabot[bot]
d47908046f
Bump @playwright/test from 1.35.1 to 1.36.2 in /tracker (#3195)
Bumps [@playwright/test](https://github.com/Microsoft/playwright) from 1.35.1 to 1.36.2.
- [Release notes](https://github.com/Microsoft/playwright/releases)
- [Commits](https://github.com/Microsoft/playwright/compare/v1.35.1...v1.36.2)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-type: direct:production
  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-07-27 14:27:58 +02:00
dependabot[bot]
d89dc466e6
Bump eslint from 8.44.0 to 8.45.0 in /tracker (#3186)
Bumps [eslint](https://github.com/eslint/eslint) from 8.44.0 to 8.45.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.44.0...v8.45.0)

---
updated-dependencies:
- dependency-name: eslint
  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-07-25 09:57:36 +02:00
dependabot[bot]
eb8bc062d5
Bump eslint-plugin-playwright from 0.15.0 to 0.15.3 in /tracker (#3129)
Bumps [eslint-plugin-playwright](https://github.com/playwright-community/eslint-plugin-playwright) from 0.15.0 to 0.15.3.
- [Release notes](https://github.com/playwright-community/eslint-plugin-playwright/releases)
- [Changelog](https://github.com/playwright-community/eslint-plugin-playwright/blob/main/CHANGELOG.md)
- [Commits](https://github.com/playwright-community/eslint-plugin-playwright/compare/v0.15.0...v0.15.3)

---
updated-dependencies:
- dependency-name: eslint-plugin-playwright
  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-07-12 10:25:43 +02:00
dependabot[bot]
f1c89a28f5
Bump eslint from 8.38.0 to 8.44.0 in /tracker (#3103)
Bumps [eslint](https://github.com/eslint/eslint) from 8.38.0 to 8.44.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.38.0...v8.44.0)

---
updated-dependencies:
- dependency-name: eslint
  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-07-11 14:01:28 +02:00
dependabot[bot]
086045bde8
Bump eslint-plugin-playwright from 0.12.0 to 0.15.0 in /tracker (#3061)
Bumps [eslint-plugin-playwright](https://github.com/playwright-community/eslint-plugin-playwright) from 0.12.0 to 0.15.0.
- [Release notes](https://github.com/playwright-community/eslint-plugin-playwright/releases)
- [Changelog](https://github.com/playwright-community/eslint-plugin-playwright/blob/main/CHANGELOG.md)
- [Commits](https://github.com/playwright-community/eslint-plugin-playwright/compare/v0.12.0...v0.15.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-playwright
  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-06-20 11:01:13 +01:00
Vini Brasil
67be43b6e6
Add tagged events support for revenue goals (#3038)
* Add tagged events support for revenue goals

This commit adds two special classes for tracking revenue with tagged
events. The following example sends an event with revenue data when the
tracker script has revenue and tagged-events script extensions:

```html
<button class="plausible-event-revenue-amount=10.29 plausible-event-revenue-currency=EUR"></button>
```

* Rename special revenue tracking class name
2023-06-19 12:59:47 +01:00
dependabot[bot]
02783885c7
Bump @playwright/test from 1.32.2 to 1.35.1 in /tracker (#3043)
Bumps [@playwright/test](https://github.com/Microsoft/playwright) from 1.32.2 to 1.35.1.
- [Release notes](https://github.com/Microsoft/playwright/releases)
- [Commits](https://github.com/Microsoft/playwright/compare/v1.32.2...v1.35.1)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-type: direct:production
  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-06-19 10:20:56 +01:00
Vini Brasil
8f6224b5de
Revenue tracking: goal conversions and tracker script (#3019)
* Add revenue average and total to Goal Conversions

* Add revenue option to tracker script

* Simplify revenue tracker script
2023-06-14 10:23:11 +01:00
RobertJoonas
e27e29250b
Fix tracker bug - call callback function when ignoring event (#2947)
* call callback function when ignoring event

* update changelog
2023-05-19 13:27:11 +02:00
RobertJoonas
020e155fdf
Improve tagged events (#2880)
* allow '--' in addition to '=' in the classnames

* changelog update
2023-04-27 14:08:24 +03:00
dependabot[bot]
1e0610037e
Bump eslint from 8.35.0 to 8.38.0 in /tracker (#2836)
Bumps [eslint](https://github.com/eslint/eslint) from 8.35.0 to 8.38.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.35.0...v8.38.0)

---
updated-dependencies:
- dependency-name: eslint
  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-17 09:12:05 +01:00
dependabot[bot]
b3b02421a0
Bump @playwright/test from 1.31.2 to 1.32.2 in /tracker (#2815)
Bumps [@playwright/test](https://github.com/Microsoft/playwright) from 1.31.2 to 1.32.2.
- [Release notes](https://github.com/Microsoft/playwright/releases)
- [Commits](https://github.com/Microsoft/playwright/compare/v1.31.2...v1.32.2)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-type: direct:production
  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-07 11:08:58 -03:00
dependabot[bot]
3a9f528724
Bump eslint-plugin-playwright from 0.10.0 to 0.12.0 in /tracker (#2722)
Bumps [eslint-plugin-playwright](https://github.com/playwright-community/eslint-plugin-playwright) from 0.10.0 to 0.12.0.
- [Release notes](https://github.com/playwright-community/eslint-plugin-playwright/releases)
- [Commits](https://github.com/playwright-community/eslint-plugin-playwright/compare/v0.10.0...v0.12.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-playwright
  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-03-30 14:11:22 -03:00
dependabot[bot]
e71e3717b3
Bump @playwright/test from 1.31.1 to 1.31.2 in /tracker (#2721)
Bumps [@playwright/test](https://github.com/Microsoft/playwright) from 1.31.1 to 1.31.2.
- [Release notes](https://github.com/Microsoft/playwright/releases)
- [Commits](https://github.com/Microsoft/playwright/compare/v1.31.1...v1.31.2)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-type: direct:production
  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-03-30 13:11:27 -03:00
RobertJoonas
bc835895a2
Rename dimensions script to pageview-props (#2786)
* rename dimensions script to pageview-props

* commit mix.lock change
2023-03-27 17:50:15 +03:00
Uku Taht
43bf7dd09f
Use user-agent instead of screen_width to get device type (#2711)
* Use user-agent instead of screen_width to get device type

Co-authored-by: eriknakata <erik.nakata5@gmail.com>

* Fix credo

* Log on unhandled UAInspector device type

* Make 'browser' the default tab in devices report

* Remove device tooltip

* Remove screen_width from ingestion completely

* Remove browserstack harness, run playwright directly

* Select meta key based on OS platform

* Run CI tests in parallel

* Improve device match readability

* Add changelog

---------

Co-authored-by: eriknakata <erik.nakata5@gmail.com>
2023-03-02 11:04:01 +01:00
RobertJoonas
135471c32e
Add tagged-events script extension (#2333)
Adds a new script extension that allows tracking interactions with specific HTML elements on a website. For example - to track link clicks on one specific `<a>` element, you can tag it like this:

```html
<a href=... class="plausible-event-name=<your_event_name>">
```

And you can also tag the link with custom property names and values:

```html
<a href=... class="plausible-event-name=<your_event_name> plausible-event-<your_custom_prop>=<your_value>">
```

Tagging a link as above will send a custom event with the given name and props, if a `click` or `auxclick` browser event happens, and targets the link element.

The tracking behavior is somewhat different based on the HTML element type:  

- `<a>` 
  - triggers on `click` and `auxclick` events
  - intercepts navigation based on the same rules as `outbound-links` and `file-downloads`
- `<form>`
  - triggers on `submit` event
  - always intercepts navigation (calls `form.submit()` after preventing default and sending the Plausible event)
- other (`<img>`, `<button>`, `<span>`, `<div>`, `<h2>`, etc ...)
  - triggers on `click` and `auxclick` events
  - does not prevent default to intercept possible navigation. Simply calls Plausible with the event name and props read from the element class list.
2022-11-21 16:17:44 +02:00
RobertJoonas
c0da024b23
Remove static tracker files (#2116)
* remove tracker files from git index

* generate tracker files on npm test

* generate tracker files for elixir tests/dev/CI

* update tracker/package-lock.json

* exclude npm run deploy from mix test + some docs
2022-10-11 12:19:28 +02:00
RobertJoonas
f75d5106f0
Rework outbound links and file downloads (#2208)
* moved custom event code to the bottom + fix indentation

* add handlebars helper fn + extract getLinkEl fn

* extract isOutboundLink function

* extract shouldFollowLink function

* remove middle and click variables

* use only one click handler for outbounds and downloads

* extract sendLinkClickEvent function

* add error handling when script compilation fails

* use callback instead of fixed timeout

* do not prevent default if externally prevented + test

* add more tests

* generate tracker files in priv/tracker/js

* update changelog

* requested changes after review

* regenerate tracker files

* use return instead of else if

* move middleMouseButton outside the function
2022-09-29 14:12:35 +03:00
RobertJoonas
39ce850f18
exclude pages by hash when using script.exclusions.hash.js (#2172)
* account for hash part of the URL when excluding pages and using hash extension

* changelog update
2022-09-07 16:41:08 +03:00
Uku Taht
99fd101135
Add basic test harness for browserstack/playwright (#1961)
* Add basic test harness for browserstack/playwright

* Refactor the tests

* added the first test for outbound links

* tests for outbound-links and file-downloads

* added more browser versions to test on

* Lint tracker test files

* Update harness.js with BrowserStack example

* Fix Playwright request mocks

* Add test harness to CI

* Remove Safari on Windows from browsers list

Co-authored-by: Robert <robertjoonas16@gmail.com>
Co-authored-by: Vinicius Brasil <vini@hey.com>
2022-08-04 11:50:09 +03:00
RobertJoonas
11654ddc07
Script extension additions (#1915)
* added data-include attribute to plausible.exclusions.js

* reorder extensions in filename when serving the plausible script

* fix formatting

* tweaks after review

* changelog update
2022-05-27 10:11:40 +03:00
RobertJoonas
199206babc
Dimensions continued (#1847)
* added the first version of dimensions extension

* finished dimensions script extension + updated tracking to use it

* script variants build
2022-04-25 10:56:11 +03:00
RobertJoonas
83ab092f6c
added add-file-types attribute + now ignores query params (#1831)
* added add-file-types attribute + now ignores query params

* variable extraction + adjustments to general code style
2022-04-18 12:34:45 +03:00
RobertJoonas
8616dd46fb
added file-downloads script extension (#1775)
* added file-downloads script extension

* fixed the issues and made it compatible with IE

* changelog update
2022-03-31 13:52:09 +03:00