# Get started with Doc Duck

Install Doc Duck on a documentation site, verify the deployment, and receive the first contextual feedback signal.

## Prepare the documentation site

You need permission to edit and deploy the documentation site. If you have a Doc Duck organization, select it before starting so the setup guide can insert its organization ID and show known installation progress. Without an organization, follow the same public journey with `YOUR_ORGANIZATION_ID`, then replace that value before deployment.

Decide which rendered element contains the page's documentation. The DocDuck feedback client belongs inside that `<article>` or `<main>` element so selections and page context stay scoped to the content readers are using.

## Install, deploy, and verify

The setup journey loads the feedback client script, places the client element in the document, checks a deployed page, and confirms the first signal. Agent feedback instructions are optional and can be included alongside the reader-facing client.


Follow this generic setup path when no organization is selected. Replace `YOUR_ORGANIZATION_ID` with the organization ID shown in Doc Duck before deploying.

1. Load the feedback tool in the `<head>` of every documentation page:

```html
<script src="https://docduck.dev/selection.js" defer></script>
```

2. Add the DocDuck feedback client element inside the `<article>` or `<main>` that contains the documentation:

```html
<docduck-feedback organization="YOUR_ORGANIZATION_ID"></docduck-feedback>
```

3. Run the documentation site locally and open a page containing both snippets. Select some text and confirm that the feedback controls appear.
4. Deploy the change, then open a production documentation page. A signed-in organization member can use the personalized install check; otherwise, inspect the deployed HTML and confirm that `https://docduck.dev/selection.js` and the organization ID are present.
5. Submit one test response from the deployed page and confirm that the page view or feedback appears in the Doc Duck dashboard.

Agent instructions are optional. If enabled, place generic API guidance beside the feedback client element and keep it scoped to feedback about the current page. See [Agent feedback](/docs/agent-feedback) for the request contract.


## Confirm the first signal

After deployment, open a production documentation page and select a short passage. Send one test response, then check the Doc Duck dashboard for either the tracked page view or the feedback. A signed-in organization member can also enter the deployed URL in the install check.

Do not treat a local preview as production verification. Keep localhost feedback only while testing; an organization administrator can clear local setup data after a deployed page has passed verification.

## Troubleshoot the install

- If the controls do not appear after selecting text, confirm that `https://docduck.dev/selection.js` loaded without a browser or content-security-policy error.
- If feedback is routed incorrectly, inspect the rendered `<docduck-feedback>` element and verify its organization ID.
- If the production check cannot reach a page, use a public HTTPS URL and wait until the latest deployment is available.
- If page views arrive but feedback does not, submit one response while watching the browser network panel and verify that the request is accepted.

Feedback client colors and spacing are optional setup. Finish the core install first, then use [Client theming](/docs/client-theming). To let software agents report on the page they are using, continue with [Agent feedback](/docs/agent-feedback).
