React components for IDMC website
Before you start, create .env and set the env variables.
# Start web app
docker-compose up# Generate graphql files
yarn generate
# Typescript check
yarn typecheck
# Eslint check
yarn lint
# Check unused files
yarn check-unused
# Run tests
yarn test
# Build web app
yarn build# Clone proxy server
git clone git@github.com:toggle-corp/simple-proxy.git idmc-website-proxyBefore you start, copy .env.template as .env and set the env variables.
# Start proxy
docker-compose upYou will need to update the .env file for your react application.
Page views are sent to a GA4 property through react-ga4. Because this app has
no client-side router (the page is chosen via the ?page= query string in
standalone mode or window.page in embedded mode), GA4's automatic page-view
tracking is disabled and each page_view is sent manually.
Some event parameters are reportable only after being registered in the GA4 UI (Admin → Custom definitions → Create custom dimensions):
| Event parameter | Dimension name | Scope | Notes |
|---|---|---|---|
country_iso3 |
Country ISO3 |
Event | Per-country page popularity. The parameter name must match exactly. |
client_code |
Client Code |
Event | clientCode is stripped from page_location/page_referrer and reported only through this dimension. |
# PREVIEW
aws cloudformation deploy --capabilities CAPABILITY_NAMED_IAM --template-file aws/cloudformation.yaml --stack-name preview-idmc-website-components --tags app=idmc-website env=preview --parameter-overrides Env=preview HostedZoneId=<HostedZoneId>
# RELEASE
aws cloudformation deploy --capabilities CAPABILITY_NAMED_IAM --template-file aws/cloudformation.yaml --stack-name release-idmc-website-components --tags app=idmc-website env=release --parameter-overrides Env=release HostedZoneId=<HostedZoneId>