analytics/lib/plausible_web/controllers
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
..
api Return warning when imported stats are skipped in Stats API due to unsupported query (#4116) 2024-05-21 11:45:18 +02:00
site Allow inviting users who are members already (#3797) 2024-02-19 12:12:31 +01:00
admin_controller.ex Clean up legacy trials code + displaying limits (#3620) 2023-12-13 10:47:50 +00:00
auth_controller.ex Make final touches to Imports & Exports (#4025) 2024-04-19 11:40:13 +02:00
avatar_controller.ex Nolt sso (along with a better nav dropdown) (#3395) 2023-10-17 12:01:27 +03:00
billing_controller.ex Lock traffic notifications (#3641) 2023-12-28 08:42:27 +01:00
error_report_controller.ex Simplify Phoenix error template (#2913) 2023-05-16 10:52:17 +02:00
google_analytics_controller.ex Remove imports_exports and csv_imports_exports feature flags (#4089) 2024-05-09 10:09:24 +02:00
helpers.ex Simplify Phoenix error template (#2913) 2023-05-16 10:52:17 +02:00
invitation_controller.ex Move limit enforcement to accepting site ownership transfer (#3612) 2023-12-20 14:56:49 +00:00
page_controller.ex add landing page (#2989) 2023-06-01 14:34:48 +03:00
site_controller.ex Snippet integration verification (#4106) 2024-05-23 15:00:50 +02:00
stats_controller.ex Snippet integration verification (#4106) 2024-05-23 15:00:50 +02:00
unsubscribe_controller.ex Add presence check when unsubscribing from email reports 2021-05-03 16:56:46 +03:00