> For the complete documentation index, see [llms.txt](https://docs.dinesafe.com/dinesafe-knowledge-base/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dinesafe.com/dinesafe-knowledge-base/iwp-reporting-widget/embedding-the-widget/how-to-embed-the-code.md).

# How to Embed the Code

### **Embed the Reporting Widget on Your Website**

1. &#x20;**Embed the code**: Paste the widget code provided by [Iwaspoisoned.com](http://iwaspoisoned.com/) into the appropriate section of your website’s HTML or template. Example provided here:

#### Simple Embedding: <a href="#simple-embedding" id="simple-embedding"></a>

{% code overflow="wrap" %}

```html
<html>
<body>
<iframe src="https://iwaspoisoned.com/widget/gov/46?id=dinesafe-test1&form=1" height="800" width="100%" style="outline: none; border: none; max-width: 450px;"></iframe>
</body>
</html>
```

{% endcode %}

#### Advanced Embedding:

{% code overflow="wrap" %}

```html
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Food Safety Reporting Widget</title>
    <style>
        .widget-container {
            width: 100%;
            height: 100vh;
            max-width: 450px;
            max-height: 650px;
            margin: 0 auto;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .widget-iframe {
            width: 100%;
            height: 100%;
            border: none;
        }
    </style>
</head>
<body>
    <div class="widget-container">
        <iframe 
            src="https://iwaspoisoned.com/widget/gov/46?id=dinesafe-test1&form=1" 
            class="widget-iframe"
            title="Food Safety Report Form"
            sandbox="allow-scripts allow-same-origin allow-forms"
            loading="lazy"
        >
            <p>Your browser does not support iframes. Please visit <a href="https://iwaspoisoned.com/widget/gov/46?id=dinesafe-test1&form=1">our reporting form</a> directly.</p>
        </iframe>
    </div>
    <script>
        window.addEventListener('message', function(event) {
            if (event.origin !== 'https://iwaspoisoned.com') return;
            // Handle any postMessage events from the iframe here
        }, false);
    </script>
</body>
</html>
```

{% endcode %}

2. **Preview the Changes**: Before publishing, preview the website to ensure the widget is displayed correctly.
3. **Publish**: Once satisfied with the integration, publish the changes to make the widget live.

Contact us at [***support@dinesafe.org***](mailto:support@dinesafe.org) if you have any questions.
