Back to the lesson

Original working file

START-HERE.txt

Code and working example pages keep their original identifiers and sample text. The lesson and file guidance explain them in your language.

PRACTICAL ROUTE

Choose one useful visitor action, connect a practice analytics stream with an assistant and verify what is actually collected.

Your role: Choose the event’s meaning, control the practice tracking choice and verify provider observations.

1. Use the supplied project and ask your coding assistant to carry out the implementation. You do not need to write HTML, JavaScript or SQL yourself.
2. Follow the current lesson steps, configure only your own permitted accounts and check the result in the actual page/provider.
3. Keep expected results and observed results separate. Record the exact blocked step if you cannot run a live check.

The detailed setup below is available to you and your assistant. Code explanations and extra implementation exercises are optional; important access/privacy checks are still part of the practical lesson.

--- REQUIRED SETUP (CODE READING IS OPTIONAL) ---
Create a GA4 property and web data stream in your own account. Put its G-... measurement ID in config.js (it is public configuration, not an API secret). Disable Enhanced Measurement for this dedicated practice stream to avoid extra automatic interactions. Serve public/ over HTTP. No analytics provider loads until Allow analytics is clicked. Use synthetic test paths only. Inspect DebugView/Realtime in your own account; local dataLayer entries alone are not ingestion proof. Remove debug_mode after testing. For public deployment implement appropriate notice, consent withdrawal and persistent preference handling for your audience.
Do not open index.html using file://: the module imports need HTTP. From the workshop root, run python3 -m http.server 8000 --directory public, then open http://localhost:8000. This static server is sufficient here because analytics collection is external, unlike the lessons with your own server functions.