analytics/test/support
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
..
conn_case.ex Implement UI for 2FA setup and verification (#3541) 2023-12-06 12:01:19 +01:00
data_case.ex Google APIs integration improvements (#2358) 2022-10-24 09:34:02 +02:00
exchange_rate_mock.ex Revenue tracking: Add currency field to goal creation (#2948) 2023-05-23 12:08:09 +02:00
factory.ex Add support for imported custom events (#4033) 2024-05-09 13:13:19 +01:00
google_api_mock.ex Implement basics of GA4 import (#3851) 2024-03-12 18:08:25 +01:00
html.ex Snippet integration verification (#4106) 2024-05-23 15:00:50 +02:00
http_mocker.ex Upgrade Erlang/Elixir stack (#3454) 2023-10-24 10:33:48 +02:00
paddle_api_mock.ex Fix upgrade page for legacy trials + bug fixes (#3486) 2023-11-06 14:01:55 +00:00
plugins_api_case.ex Merge Plugins.API.Router into main one (#3767) 2024-02-12 10:44:32 +01:00
test_utils.ex Remove references to site.imported_data (#4006) 2024-04-19 11:15:51 +02:00