rustdeskandClaude Opus 5 e9fce7d458 web: load Google Analytics only after the visitor accepts it
Analytics.astro rendered <GoogleAnalytics> whenever config.yaml carried a
measurement id, so gtag ran and the _ga cookies were set on the first page
view, before the banner was answered and whatever the visitor went on to
choose. The analytics service in the consent config was never wired up to
anything -- its onAccept was a `// TODO: load ga4` -- so consent decided
nothing either way. The privacy policy says the opposite, that cookies are
used on the basis of consent given through the banner.

Analytics.astro now only defines window.loadGoogleAnalytics, and the ga4
service calls it from onAccept, so Google is first contacted after the visitor
accepts. Rejecting leaves the loader uncalled, and the library erases the _ga
cookies it already matches.

CookieConsent.astro skipped run() once its own localStorage flag was set,
which meant the library was not initialised on any later visit -- with the
loader moved behind consent that would have left analytics permanently dead
instead of permanently on, since re-applying a stored consent is what calls
onAccept. It now runs on every page load and lets the library decide whether
to show the banner.

Consent could also not be withdrawn: the preferences modal had no trigger
anywhere on the site, and the privacy policy offered browser settings instead,
which is not a withdrawal mechanism and is not as easy as giving consent was.
The footer now links to the modal and the policy points at it.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EZ49AbZJYfm8NTp5yDPMab
2026-09-15 21:02:41 +08:00
2026-07-14 18:40:09 +08:00
2025-06-15 02:57:17 +08:00
2026-07-14 17:33:00 +08:00
2026-03-20 15:16:55 +08:00
2026-03-20 18:42:55 +08:00
2025-01-01 20:57:10 +02:00
2021-08-29 23:28:15 +08:00
2026-07-09 19:03:31 +08:00
2025-06-15 02:57:17 +08:00
fix
2025-08-06 19:42:29 +08:00
2026-07-14 17:33:00 +08:00
2025-06-20 20:28:39 +08:00
2026-03-20 15:16:55 +08:00

We need your help to translate this document to your native language

Preview

Preview and build at local

  1. Install Hugo

  2. Clone the repo, if you want to submit changes, please Fork and clone your fork.

git clone --recursive https://github.com/rustdesk/doc.rustdesk.com.git
  1. Change to the folder:
cd docs.rustdesk.com
  1. Start Hugo Server
hugo server

If you found any bugs, stop the server and delete public folder and run again.

You could make changes and than push and create PR.

Update branch/fork

Sync your fork at GitHub UI or create new branch that points to upstream.

Make sure you've checkout to right branch, and run:

git pull --recurse-submodules

If you're cloned from here, just run the command.

S
Description
Document of RustDesk
Readme MIT
81 MiB
0 Stars 1 Watchers 0 Forks
Languages
HTML 35.8%
Astro 33.2%
CSS 20.3%
TypeScript 4%
MDX 3.9%
Other 2.7%