The Optimization SDK Suite is pre-release (alpha). Breaking changes can be published at any time.
Reference implementation of @contentful/optimization-web for Angular applications. Demonstrates
all SDK integration patterns — entry resolution, auto and manual tracking, consent, identify/reset,
live updates, nested entries, rich text with merge tags, feature flags, analytics event display, and
the preview panel.
data-ctfl-* DOM attributessdk.tracking.enableElement.nvmrc)From the repository root:
pnpm build:pkgs
pnpm implementation:run -- web-sdk_angular implementation:install
pnpm implementation:run -- web-sdk_angular serve:mocks
pnpm implementation:run -- web-sdk_angular dev
The app is available at http://localhost:4200. The mock server must be running for entry data and
variant resolution to work.
Other commands from the repository root:
pnpm implementation:run -- web-sdk_angular build
pnpm implementation:run -- web-sdk_angular typecheck
Or equivalently from the implementation directory:
pnpm dev
pnpm build
pnpm typecheck
Copy .env.example to .env:
cp .env.example .env