Open App

Astro

For Astro projects, the widget script goes in your shared layout component (e.g. src/layouts/Layout.astro).

Install#

No package install needed. Replace YOUR_PROJECT_ID with the value from /v1/projects.

Add the script#

In your layout's <head> or before the closing </body>:

<script is:inline>
  window.SHOWTRUSTTO_WIDGET_CONFIG = { projectId: 'YOUR_PROJECT_ID' };
</script>
<script is:inline src="https://app.showtrust.to/showtrustto-widget.js" async></script>

The is:inline directive prevents Astro from processing the script as a module — important because the widget loader expects a global window property.

Add the container#

In any .astro page or component:

<div id="showtrustto-widget"><a slot="st-credit" href="https://showtrust.to/?ref=widget">Wall of love by ShowTrust</a></div>

On the Free plan the container includes a small Wall of love by ShowTrust link. The widget shows it once, under your wall, so keep it inside the container. To hide it, switch off the credit in your widget settings (Pro walls are white-label) and use the bare container: <div id="showtrustto-widget"></div>.

Was this page helpful?

ShowTrust

Collect testimonials. Show off the trust.

© Copyright 2026. All rights reserved.