External site integration

Embed Widget Implementation Guide

This integration adds a user-facing dialog for switching document links between normal and accessible view, with a full backend workflow for lookup, request intake, event telemetry, and admin email notifications.

Quick install snippet

Start with this baseline and replace the domain key with your tenant/site identifier.

<script>
  window.DocAccessibleWidgetConfig = {
    domainKey: "customer-portal-001",
    lookupEndpoint: "https://docaccessible.com/api/embed/resolve",
    requestEndpoint: "https://docaccessible.com/api/embed/request",
    eventEndpoint: "https://docaccessible.com/api/embed/events",
    openMode: "same_tab"
  };
</script>
<script src="https://docaccessible.com/embed/docaccessible-widget.js" defer></script>

How it works end-to-end

Install one script

Load the hosted widget script and optional data attributes on any public site page with document links.

Detect document links

The widget scans PDF links, watches SPA route changes, and intercepts link clicks when accessible mode is active.

Resolve mapping via API

On click, the widget calls /api/embed/resolve and opens mapped accessible HTML URLs when status is available.

Handle missing versions

If status is missing or processing, users can submit /api/embed/request and admins get immediate email alerts.

Store telemetry events

Switches, opens, and request actions can be posted to /api/embed/events for product analytics and rollout tuning.

Backend APIs now live

MethodEndpointPurpose
POST/api/embed/resolveReturn available/processing/missing status for a source document URL.
POST/api/embed/requestCreate a missing-accessible-version request and notify admin recipients.
POST/api/embed/eventsRecord widget interaction events with payload and timestamp.

Related reading

Continue with connected guides and operational references.

4 linked pages