-
Notifications
You must be signed in to change notification settings - Fork 13
Quantum Metric
Quantum Metric is an analytics and design platform for digital products. The Supporter Revenue team use it to better understand the customer journeys through our support.theguardian.com website. Quantum Metric have their own JavaScript SDK that runs on the support site, on condition a user has consented to this.
The module quantumMetric.ts contains the logic to add the script to the page. This logic checks a user's consent status and the enableQuantumMetric
feature switch, if both conditions pass we add the script to the page.
When adding the script to the page we define a Script Integrity prop that instructs the browser to check the fetched script to ensure that the code is never loaded if the source has been manipulated.
Once the script has been loaded we are ready to track the events below.
We can send custom events to Quantum Metric using the window.QuantumMetricAPI.sendEvent
interface. The arguments passed to sendEvent
are agreed in advance with Quantum Metric.
We can't guarantee Quantum Metric's script will be ready to accept sendEvent
calls, so we have code to check it is ready before calling ``window.QuantumMetricAPI.sendEvent`.
Send AB test participations.
Paper/Guardian Weekly checkout has initialised.
Paper/Guardian Weekly checkout has completed with a conversion.
Contribution/Supporter + checkout has completed with a conversion.
Sent on:
- Contribution/Supporter + page load to indicate "cart value" at the start of the checkout.
- Amount button click to indicate a change in "cart value".
A user has selected a payment method on the checkout.
Notifies QM of the payment method used for a conversion.
- Redux Glossary
- Why Redux Toolkit?
- Writing state slices with Redux Toolkit
- Handling action side effects in Redux
- Presentational and Container Components
- Scoped actions and reducers
- Server Side Rendering
- Form validation
- CI build process
- Post deployment testing
- Post deployment test runbook
- TIP Real User Testing
- Code testing and validation
- Visual testing
- Testing Apple Pay locally
- Test Users
- Deploying to CODE
- Automated IT tests
- Deploying Fastly VCL Snippets
- Archived Components
- Authentication
- Switchboard
- How to make a fake contribution
- The epic and banner
- Environments
- Tech stack
- Supported browsers
- Contributions Internationalisation
- Payment method internationalisation in Guardian Weekly
- Print fulfilment/delivery
- Updating the acquisitions model
- Runscope testing
- Scala Steward for dependency management
- Alarm Investigations
- Ticker data
- Ophan
- Quantum Metric
- [Google Tag Manager] (https://github.com/guardian/support-frontend/wiki/Google-Tag-Manager)