---
name: install-enping-widget
description: Install or repair the Enping website feedback widget in an application. Use when the user asks to add Enping feedback capture, place an Enping embed, activate reviewer access, or diagnose a rejected widget request. Requires the account-specific snippet from Enping; agent MCP setup belongs to connect-mcp instead.
---

# Install the Enping widget

Use the Enping dashboard as the source of truth for account-specific values. The
public installation key identifies an install; it does not authorize access.

## Get the installation

1. Read the host repository instructions and find its site-wide document or root
   layout.
2. Use the exact embed copied from `Project > Settings > Widget` in Enping. If it
   is unavailable, ask the user to register the host origin and copy the embed.
   Never invent an installation key, endpoint, origin, or access mode.
3. Confirm which access mode the dashboard shows:
   - `Public` renders for ordinary visitors and uses visitor-scoped access.
   - `Internal` stays inert until a signed-in member activates it or a reviewer
     link is redeemed.
   - `Signed identity` requires a host-generated signed identity in addition to
     the loader reference.

## Place the widget

Add the copied script once in the host's site-wide HTML or root-layout script
area. Preserve its `src`, `data-installation-key`, `data-endpoint`, access-mode,
origin, screenshot, and `async` attributes. Keep the integration at the host
boundary; feature pages and framework components should not own the widget.

For an internal install, reviewers activate a browser with
`#enping-review` (legacy `?enping-review` also works). A reviewer link carries
its invite value in the same activation parameter. `#enping-review=off`
disables the reviewer session on that browser.

For signed identity, treat the dashboard loader as a reference rather than a
complete integration. Generate a short-lived compact JWT on the host's trusted
server and send it as `x-enping-signed-identity`. Its header `kid` must match an
active Enping key; claims include `iss`, `sub`, `aud`, `iat`, `exp`,
`installationKey`, and `siteOrigin`. Keep signing keys and tokens out of browser
source and repository files.

## Verify the boundary

- Load the exact registered origin and confirm the script is present only once.
- Exercise the configured access mode: an ordinary visitor for public mode, or
  an activated member/reviewer for internal mode.
- Confirm a submission reaches the intended Enping project and includes its page
  context. A private widget remaining invisible to an unactivated visitor is a
  successful state.
- If a request is rejected, compare the live origin, installation key, endpoint,
  access mode, and reviewer/signed-identity state with the dashboard. Preserve a
  fail-closed result until the mismatch is understood.

Finish by reporting the host file changed, registered origin, access mode, and
any dashboard or reviewer activation still required.
