> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help.trustmary.com/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Alternative widget embedding (React, Node.js, etc.)

In this article we'll show you an alternative method of embedding our review widget to your site, if the regular script isn't working for some reason. The instructions can be used with, for example, sites built with React, Node.js, etc. and also with other types of websites, if you're running into issues with the regular embedding process.

# How to find the code snippets

### Generating the embed code

Start by navigating to the **Widgets** section in Trustmary. In there, select a widget or create a new one.

![](https://storage.crisp.chat/users/helpdesk/website/-/b/8/0/8/b8083cc0c8b32000/widgetscreatenew_kgai57.png)

Once in the widget editor, click the **Add to website** button. Here you'll find the first code snippet needed to embed the widget.

![](https://storage.crisp.chat/users/helpdesk/website/b8083cc0c8b32000/widgetseditoraddtowebsite_1yjqr5h.png)

Click the **Copy** button next to the code on the darker background to copy it.

![](https://storage.crisp.chat/users/helpdesk/website/b8083cc0c8b32000/widgetsaddtowebsitedialogue_61gsax.png)
Then take the **widget ID** (the string of characters in the URL) from the code you just copied...

![](https://storage.crisp.chat/users/helpdesk/website/b8083cc0c8b32000/widgetsaddtowebsitedialogue-ko_d3shea.png)
...and paste it **in place of the asterisks** on this div-element:

```javascript
<div data-trustmary-widget="********"></div>
```

The code can then be installed on your site on the spot where you would like the widget to appear.

### Getting the head element script

Next you'll need to get the script that loads the widgets on your site, and is installed in the head element of your website. Start by navigating to your account **Settings**.

![](https://storage.crisp.chat/users/helpdesk/website/-/b/8/0/8/b8083cc0c8b32000/navigationprofilemenu_ie2dbf.png)

Under the **Developers** tab, you'll find the **Trustmary tag** script, which you can copy by clicking the Copy button on the right.


![](https://storage.crisp.chat/users/helpdesk/website/-/b/8/0/8/b8083cc0c8b32000/settingsdevelopersscript_1nilr0r.png =800x287)
Once you've copied the script from the settings, install it in the **head element** (between <head> and </head>) on your website. Some editors might refer to this as "Code injection" or "Adding custom code". 

When both of the code snippets are installed correctly in their respective places, the widget should be displayed, and your reviews should be online.