How to install and verify scripts
How to install script
Roof AI is installed on your website using a small JavaScript snippet (a single <script> tag). This script loads the Roof AI chat widget and connects visitor conversations to your brokerage’s listings and lead workflows.
Where the widget appears depends on your tier:
- Core: the widget is shown on listing details pages only
- Intel / Lifecycle: the widget is shown site-wide (including your homepage and listing details pages)
In all cases, installation is done by placing the script in your site’s global <head>, so Roof AI can load reliably on the pages where it’s enabled.
Step-by-step: CMS
1) Get your Roof AI install script (sent by email)
After onboarding, we’ll email you your unique Roof AI script snippet. Keep that email handy – you’ll copy and paste the snippet exactly as provided.
2) Find your site’s global header/template
Locate where your website defines the global <head>...</head> section (sometimes called “global header,” “site header,” or “master template”).
3) Paste the Roof AI script into <head>
Paste the script anywhere inside <head> and publish/deploy your changes.
4) Confirm the widget is showing on the right pages (based on your tier)
- Core: widget appears on listing details pages only
- Intel/Lifecycle: widget appears site-wide (including on the homepage and listing details pages)
5) Verify it’s live
- Hard refresh your site (Cmd/Ctrl + Shift + R)
- Confirm the widget appears where expected
- Optional: DevTools → Network → confirm widget.js loads successfully
Step-by-step: Google Tag Manager (GTM)
1) Get your Roof AI install script (sent by email)
After onboarding, we’ll email you your unique Roof AI script snippet. Keep that email handy – you’ll copy and paste the snippet exactly as provided.
2) Open Google Tag Manager
Log into Google Tag Manager and select the container connected to your website.
3) Create a new tag
Go to Tags → New and name it: Roof AI - Webchat Widget.
4) Configure the tag as Custom HTML
- Tag type: Custom HTML
- Paste your Roof AI script snippet (from the email) into the HTML box
5) Set the trigger
Set the trigger based on your tier:
- Core: fire on listing details pages only (use a page view trigger limited to your listing URL pattern)
- Intel / Lifecycle: fire on All Pages
6) Save → submit → publish
Save the tag, then Submit and Publish your GTM container.
7) Verify it’s live
- Use preview mode in GTM to confirm the tag fires where expected
- Load a listing details page (and homepage if Intel/Lifecycle)
- Optional: DevTools → network → confirm widget.js loads successfully
Common GTM issues
- Tag saved but container not published
- Trigger not set to All Pages
- You published the wrong container/environment
- Script loads on homepage but not listing details pages (Intel / Lifecycle tier only) – site routing / template issue
Working with a dev or web vendor? Send this info to them!
FAQ
Can we exclude specific pages?
Yes, you can exclude specific pages by URL pattern (ex. exclude certain realtor pages). Depending on how your site is set up, your web vendor may need to implement the exclusion rules.
Do subdomains work?
No, Roof AI doesn’t support running the bot on subdomains.
Ready to boost your brokerage?
Talk to our team and discover how Roof AI can transform your real estate operations
.avif)