Commit Graph

3966 Commits

Author SHA1 Message Date
apata ddc98670db Released tracker script version 0.4.2 2025-09-04 05:00:50 +00:00
Artur Pata 757cf95070
Script v2: Adds linter and prettier, satisfies linter (#5691)
* Install deps and create config

* Satisfy linter in tests

* Silence redeclare warnings

* Remove shadowed/redeclared variables

* Update changelog
2025-09-04 04:56:42 +00:00
RobertJoonas 110f97d442
CE: Fix v2 onboarding, review installation, and domain change flows (#5692)
* fix seeds.exs for CE

* unified FF function

* remove gtm tab on ce

* CE change domain flow: remove detection logic

* CE installationv2 (review & provisioning flows) + tests

* change domain tests

* fix tests

* FF for user too

* small improvements (review comments)

* keep the CE and EE versions of the same function together
2025-09-03 17:22:18 +00:00
Adrian Gruntkowski 3d12ced6ff
Retry on HTTP2 `:unprocessed` error in `Persistor.Remote` (#5697) 2025-09-03 08:09:09 +00:00
Adrian Gruntkowski aa803e7e45
Retry persistor requests on HTTP2 disconnected errors (#5695) 2025-09-02 16:16:30 +00:00
Adam Rutkowski 67674b984b
Replace Search Console property select with ComboBox (#5689) 2025-09-01 13:07:07 +00:00
Adrian Gruntkowski 3fbea514a6
Use embedded persistor implementation in local dev env (#5688) 2025-09-01 11:34:25 +00:00
Karl-Aksel Puulmann 7b1c8af902
Update links in instructions (#5686) 2025-09-01 10:12:06 +00:00
Adrian Gruntkowski 40ff36a4fb
Implement dedicated persistence service (#5653)
* Implement a very crude HTTP relay to persistor service

* Temporarily disable local session and event persistence

* Temporarily disable Promex in dev

* Setup dedicated Finch pool for persistor

* Temporarily adjust load script parameters

* Fiddle with pool opts

* Only log errors

* Bump rate

* Put persistor configuration in runtime config

* Move persistor client code to a separate module

* Move event and session persistence behind a switchable adapter

* Add scaffolding of relaying persistor

* Instrument relayed persistence

* Adjust persistor API to accept full ingest event

* Fix persistor URL in config defaults

* Switch local dev env of embedded_with_relay backend

* Revert "Temporarily disable Promex in dev"

This reverts commit d9c9e9075d130cc5177a2a7559b98a2026077327.

* Lower default `PERSISTOR_COUNT`

* Refactor payload encoding and decoding slightly

* Test and slightly improve persistor logic
2025-09-01 09:13:41 +00:00
apata 91e60fe148 Released tracker script version 0.4.1 2025-09-01 05:59:11 +00:00
Artur Pata af06df806b
Script v2: Verifier accepts cookies (#5669)
* Accept cookies (WIP)

* Make resolving Plausible function call a priority

* Update tracker script version

* Remove cookieBannerLikely, replace with debug-only cookiesConsentResult

* Use compact rules

* Make verifier tests less flaky

* Add fixtures for accepting cookies

* Limit CMPs

* Fix dep position
2025-09-01 05:54:19 +00:00
Adrian Gruntkowski 2d11681f25
Revert "Trim `month`, `year`, `day` periods to local now on main graph (#5668)" (#5684)
This reverts commit 563c3d22ba.
2025-08-28 14:58:57 +00:00
Adrian Gruntkowski 70c9a55bf8
Add custom props to full export (#5666)
* Add custom props to full export

* Pass full `site` struct to `export_queries`

* Export only internal props if plan lacks custom props

* Add changelog entry

* Add spot check test for custom props

* Do not generate cartesian product of prop/value pairs 🤦
2025-08-28 13:13:01 +00:00
RobertJoonas 4548e3acc5
Verification: new interpretation case for non-200 page responses (#5683)
* allow http scheme in verification url

* skip dns lookups on localhost URLs in dev env

* handle non-200 page responses

* fix test

* Update lib/plausible/installation_support/verification/diagnostics.ex

Co-authored-by: Artur Pata <artur.pata@gmail.com>

* shorten_url fn

* remove dot

* fix assertions

---------

Co-authored-by: Artur Pata <artur.pata@gmail.com>
2025-08-28 11:54:03 +00:00
Adam Rutkowski 563c3d22ba
Trim `month`, `year`, `day` periods to local now on main graph (#5668)
* Trim `month`, `year`, `day` periods to now on main graph

* Revert "Trim `month`, `year`, `day` periods to now on main graph"

This reverts commit 4f3930111d3a2737a51686e067d9b64f0d85ad58.

* Re-implement trimming in query optimizer instead

* Update JS types

* This is getting confusing

* Trim in stats_controller

* Set `query.now` based on query_praser and date results

* query.period -> query.input_date_range

* Changelog

* Test for response query.date_range

---------

Co-authored-by: Karl-Aksel Puulmann <oxymaccy@gmail.com>
2025-08-28 09:51:56 +00:00
Adrian Gruntkowski f94aebc00b
Make "last N months" return date ranges consistent with "last N days" (#5677)
* Make "last N months" return date ranges consistent with "last N days"

* Make goal suggestions not rely on predefined period

* Use native `Date` API for calculating beginning and end of months
2025-08-28 09:10:49 +00:00
Adrian Gruntkowski eed90a343e
Refactor free billing features logic (#5682) 2025-08-27 17:29:05 +00:00
Adam Rutkowski b48463ca65
CRM: Expose Team SSO Policy (#5681)
* CRM: Expose Team SSO Policy

* Flip ordering for audit log entries
2025-08-27 12:20:27 +00:00
RobertJoonas 3b4342112f
show messages while waiting for detection (#5667) 2025-08-27 11:58:17 +00:00
Adrian Gruntkowski 54641ccea6
Make generated iframe embed code work well with transparent background (#5672)
* Explicitly declare color scheme availability and preference

* Revert "Explicitly declare color scheme availability and preference"

This reverts commit e1e6242d29.

* Add `color-scheme: auto;` to generated iframe embed code
2025-08-27 11:36:05 +00:00
RobertJoonas c3af79a115
Verification v2: Better Browserless error handling + verify custom URL option (#5673)
* interpret browserless network errors better

* refactor: split verification component render fn

* Custom URL input + render attempted URL in error message

* move socket assign around

* add tests

* drop redundant else branch + guard

* socket assigns out of launch_delayed

* template strings and define error structs at compile time

* typo in test comment

* fix function args
2025-08-27 11:25:47 +00:00
Adrian Gruntkowski a2c863b2cc
Ignore `visit:channel` when transforming filters for GSC (#5678) 2025-08-27 11:08:15 +00:00
Adam Rutkowski 69206475f9
Instrument missing mock to mute expectation error (#5675)
* Instrument missing mock to mute expectation error

* Format
2025-08-27 05:57:42 +00:00
Adam Rutkowski ecfea36bd9
Avoid slowdowns in tests due to code server waits (#5674)
This is supposed to be taken care of
by d05731194e
but not quite it seems.

The first test with a fairly involved exunit template
(ConnCase) is usually 700ms vs 60ms whichever comes second.
(48-core Threadripper, but similar results on macs AFAIU).
This makes --trace / --slowest flags produce misleading results.

h/t @zoldar
2025-08-27 05:42:49 +00:00
Adam Rutkowski 88cf2ac9ae
Remove redundant options merge (#5665) 2025-08-26 10:35:31 +00:00
Adrian Gruntkowski 0c9d42daf3
Handle team policy update on empty default struct gracefully (#5671)
* Reproduce policy update error

* Fix `update_policy` and `force_sso` to handle default empty value gracefully
2025-08-26 09:49:55 +00:00
Adam Rutkowski a5a71f7828
CRM: Expose 2FA user status & allow CS to force disable it (#5670)
* CRM: Expose 2FA user status & allow CS to force disable it

* !fixup
2025-08-26 08:01:24 +00:00
Karl-Aksel Puulmann 619a9ed57b
ScriptV2: Use async instead of defer, new snippet (#5655)
* async -> defer

* Run legacy tests using async instead of defer
2025-08-25 07:12:11 +00:00
RobertJoonas 5b1925e6bb
Fix bug with pageview queries stacking after verification retries (#5663)
* add dev ability to quick delete sites

* fix pageview queries stacking up after failed verification
2025-08-25 05:44:29 +00:00
Karl-Aksel Puulmann b36a92fb45
ScriptV2: snippet structure change (#5662)
* Remove dead code

* Use a new snippet style

* Allow plausible to be on window
2025-08-25 05:35:06 +00:00
Karl-Aksel Puulmann bcf8b422e1
ScriptV2: Domain change refinement (#5657)
* Improve "back to settings" button

* Dark mode support for change domain

* Purge CDN cache on domain change

* Allow npm installation_type

* Detect npm installation type in detector

* Support npm installation type in onboarding

* Show warning in change domain flow for npm

* Make CE tests happy

* Cleanup

* npm_likely -> npm

* Cleanup
2025-08-21 09:25:39 +00:00
Karl-Aksel Puulmann d5ee36d47f
ScriptV2: Show warning when using Legacy GTM template, update links (#5660)
* Show warning when using Legacy GTM template, update links

* Update phrasing
2025-08-21 08:42:08 +00:00
RobertJoonas a3d8226705
fix CE warning in tests (#5661) 2025-08-20 15:30:00 +00:00
Adam Rutkowski 43b52d599b
Group Mint.TransportError in Sentry (#5659) 2025-08-20 08:40:17 +00:00
Adam Rutkowski 3a720b5d60
Keep google auth deletions idempotent (#5656) 2025-08-20 08:11:02 +00:00
Adam Rutkowski ac739da694
Mute automated login attempts (#5658) 2025-08-20 07:52:50 +00:00
Karl-Aksel Puulmann cf423dbf99
ScriptV2: TrackerScriptCache on ee (#5648)
* Leverage TrackerScriptCache on ee

On ee, TrackerScriptCache only stores valid ids. This is then leveraged
to do no database queries when looking up tracker scripts for
non-existing ids.

For smoother onboarding purposes, refresh frequency for the script is also
reduced.

Note that the cache layout is not optimal (storing 'true' booleans) but
being more optimal would require changing the underlying cache
implementation significantly.

I tested out the cache - with 1M tracker script configs, it seems to be
~12MB in size.

* Wait on cache

* Add telemetry

* Remove cleverness in trying to reuse code
2025-08-19 11:41:19 +00:00
Karl-Aksel Puulmann 077adb99ba
ScriptV2: GTM, NPM instructions, darkmode (#5650)
* Basic NPM instructions

* Basic GTM template instructions

* Make tabs height consistent

* Tweak npm to be more in line with wordpress instructions

* Keep old link

* Attr

* Darkmode for tabs

* Make tag manager input not resizable

* darkmode icons

* Phrasing
2025-08-19 11:38:29 +00:00
Artur Pata 276f95cda2
Script v2: Make detection take less time (#5635)
* Add fast failing dns check to verification

* Convert Detection to a checks pipeline

* Convert detection to checks pipeline

* Unify browserless checks, set retry policy, timeouts

* Fix spelling

* Update change domain v2

* Fix issue with handling errors with detection

* Include timeoutMs in detector function args

* Allow saving npm installation type (#5639)

* small code style/comment improvements

---------

Co-authored-by: RobertJoonas <56999674+RobertJoonas@users.noreply.github.com>
Co-authored-by: Robert Joonas <robertjoonas16@gmail.com>
2025-08-19 10:16:27 +00:00
Adam Rutkowski bb1db557a3
Set `timeout: :infinity` on streaming export (#5654) 2025-08-19 09:51:33 +00:00
RobertJoonas 17675af4d0
Clean up old upgrade page (dead code) (#5652)
* remove deprecated modules/fns

* get rid of starter_tier flag

* remove legacy? arg from plans
2025-08-19 09:12:48 +00:00
Adam Rutkowski e3bef74cde
Preserve query params for authenticated shared links (#5640) 2025-08-18 13:44:34 +00:00
Adam Rutkowski 82941c93dd
Don't render external links for WP search_query property (#5649)
* Don't render external links for WP search_query property

* Fix external icon rendering in Firefox

* Use visibility rather than opacity

* fix indent
2025-08-18 12:42:55 +00:00
dependabot[bot] 7313137a57
Bump actions/checkout from 4 to 5 (#5647)
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v4...v5)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-version: '5'
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-08-18 09:07:45 +00:00
Karl-Aksel Puulmann 428d9893e3
ScriptV2: Allow customizing lib passed from init (#5641)
* Allow customizing lib passed from init

Going to be used by GTM (and possibly wordpress) to make it easier to detect what source was used for install

* chore: Bump tracker_script_version to 28
2025-08-18 09:06:15 +00:00
Karl-Aksel Puulmann 6a6a195812
CE-friendly tracker_url support (#5643) 2025-08-18 09:02:08 +00:00
Karl-Aksel Puulmann e52e9882c9
Bump eslint-plugin-playwright, add tracker-release: none label (#5645)
* Add support for `tracker release: none` label

* Update eslint-plugin-playwright

* Fix conditional

* chore: Bump tracker_script_version to 28
2025-08-18 09:02:01 +00:00
Adam Rutkowski 02d74bc8bd
Ensure no funnel tooltips appear on the main graph (#5638)
* Ensure no funnel tooltips appear on the main graph

* Update CHANGELOG

Funnels are not available in CE anyway 🤷
2025-08-14 09:14:41 +00:00
Adam Rutkowski 1d135d4a74
Exclude pages already added in page shields suggestions (#5637) 2025-08-13 10:02:49 +00:00
Uku Taht a32e9ee53d
Change domain 2-step flow (#5630)
* Make change-domain-v2 a two-step process

* Cleanup

* Make change domain a 2-step process

* Refactor installationv2 tests to use render_async

* Increase timeout in render_async

* Refactor to please credo

* Also increase timeout for render_async in installationv2 tests
2025-08-13 09:50:16 +00:00