Add TheSkinnyAI to any website by copying a simple code snippet.
This method works for:
Go to theskinnyai.com/dashboard and log in.
Click on the site you want to add the widget to.
Navigate to Site Settings → Widget Code to find your credentials.
Copy the following code and replace the placeholder values with your actual credentials:
<script>
(function(){
try {
var loader = document.createElement('script');
loader.src = 'https://theskinnyai.com/skinny-widget-loader.js';
loader.dataset.tenantId = 'YOUR_TENANT_ID';
loader.dataset.siteId = 'YOUR_SITE_ID';
loader.dataset.anonKey = 'YOUR_ANON_KEY';
loader.dataset.widgetHost = 'https://theskinnyai.com';
loader.dataset.position = 'bottom-right';
document.body.appendChild(loader);
} catch (e) { /* ignore */ }
})();
</script>
| Parameter | Required | Description |
|---|---|---|
data-tenant-id |
Yes | Your unique tenant identifier |
data-site-id |
Yes | Your site identifier |
data-anon-key |
Yes | API authentication key |
data-widget-host |
Yes | Always set to https://theskinnyai.com |
data-position |
No | bottom-right (default), bottom-left, top-right, top-left |
Paste the code snippet just before the closing </body> tag on every page where you want the widget to appear.
<!DOCTYPE html>
<html>
<head>
<title>My Website</title>
</head>
<body>
<!-- Your page content here -->
<!-- TheSkinnyAI Widget - Add just before </body> -->
<script>
(function(){
try {
var loader = document.createElement('script');
loader.src = 'https://theskinnyai.com/skinny-widget-loader.js';
loader.dataset.tenantId = 'your-tenant-id';
loader.dataset.siteId = 'your-site-id';
loader.dataset.anonKey = 'your-anon-key';
loader.dataset.widgetHost = 'https://theskinnyai.com';
loader.dataset.position = 'bottom-right';
document.body.appendChild(loader);
} catch (e) {}
})();
</script>
</body>
</html>
theme.liquid in the Layout folder</body></body>, not in <head>