To learn more about Website Texting Functionality here: https://heyrosie.com/support/en/articles/13369509-website-text-messaging-currently-in-closed-beta
Get Your Installation Code
Your personalized installation code is available in the Rosie admin with your business ID already filled in: Settings → Website Texting
The installation code looks like this:
<script src="https://widget.heyrosie.com/widget.js" data-rosie-business-id="YOUR_BUSINESS_ID"></script>
Simply copy the code snippet from the admin (it has your business ID pre-filled) and follow the instructions below for your specific platform.
Quick Reference
WordPress
There are three recommended methods to add the Rosie Widget to your WordPress site.
Option 1: Rosie's WordPress Plugin (Recommended)
Rosie-built plugin for WordPress. See full installation details here:
Option 2: Code Snippets Plugin
The Code Snippets plugin provides a safe and easy way to add custom code without editing theme files.
Install the Code Snippets plugin from the WordPress Plugin Directory
Go to Snippets → Add New in your WordPress admin
Give your snippet a name (e.g., "Rosie Widget")
Add the following code, replacing the
<script>...</script>with your installation code from the Rosie admin:
function add_rosie_widget() { ?> <!-- Paste your installation code here --> <?php } add_action('wp_footer', 'add_rosie_widget');Set the snippet to run on the Front-end only
Click Save Changes and Activate
Option 3: functions.php
If you prefer not to use a plugin, you can add the code directly to your theme's functions.php file.
Go to Appearance → Theme File Editor
Select
functions.phpfrom the file listAdd the following code at the end, replacing the comment with your installation code from the Rosie admin:
function add_rosie_widget() { ?> <!-- Paste your installation code here --> <?php } add_action('wp_footer', 'add_rosie_widget');4. Click Update File
Note: If you're using a child theme (recommended), add the code to your child theme's functions.php to prevent losing changes during theme updates.
Drupal
Add the Rosie Widget to your Drupal site using a Custom Block.
Go to Structure → Block Layout in your Drupal admin
Click Place block in the desired region (recommended: Footer)
Click Add custom block
Give the block a description (e.g., "Rosie Widget")
In the Body field, switch to Full HTML or Plain text format
Paste your installation code from the Rosie admin
Configure visibility settings as needed
Click Save block
Note: You may need to clear Drupal's cache after adding the block for changes to take effect.
Reference: Drupal.org: Working with Blocks
Magento (Adobe Commerce)
Add the Rosie Widget to your Magento/Adobe Commerce store using a CMS Block.
Step 1: Create the CMS Block
Go to Content → Blocks in your Magento admin
Click Add New Block
Fill in the block details:
Block Title: Rosie Widget
Identifier: rosie_widget
Store View: All Store Views (or select specific stores)
In the Content field, paste your installation code from the Rosie admin
Click Save Block
Step 2: Add Block to Template
Add the following code to your theme's footer template (e.g., footer.phtml):
<?php echo $this->getLayout()->createBlock('Magento\Cms\Block\Block')->setBlockId('rosie_widget')->toHtml(); ?>Alternatively, you can add the block using Layout XML:
<referenceContainer name="before.body.end"> <block class="Magento\Cms\Block\Block" name="rosie.widget"> <arguments> <argument name="block_id" xsi:type="string">rosie_widget</argument> </arguments> </block> </referenceContainer>
Reference: Adobe Commerce DevDocs: Create a New Block
Wix
Add the Rosie Widget to your Wix site using the Custom Code feature.
Go to your Wix Dashboard
Navigate to Settings (gear icon)
Scroll down to the Advanced section
Click Custom Code
Click + Add Custom Code at the top right
Paste your installation code from the Rosie admin
Configure the following settings:
Name: Rosie Widget
Add Code to Pages: All pages
Place Code in: Body - end
Click Apply
Important: Your site must be published and have a connected domain for custom code to work.
Reference: Wix Help: Embedding Custom Code to Your Site
Squarespace
Add the Rosie Widget to your Squarespace site using Code Injection.
In your Squarespace dashboard, go to Settings
Click Advanced
Click Code Injection
In the Footer field, paste your installation code from the Rosie admin
Click Save
Note: Code Injection is available on Squarespace Core, Plus, Advanced, Business, and Commerce plans.
Adding to Specific Pages Only
If you only want the widget on specific pages:
Go to Pages and hover over the desired page
Click the gear icon to open page settings
Click Advanced
Add the code in the Page Header Code Injection field
Click Save
Reference: Squarespace Help: Using Code Injection
Joomla
Add the Rosie Widget to your Joomla site using a Custom HTML Module.
In your Joomla admin, go to Extensions → Modules
Click New to create a new module
Select Custom (or "Custom HTML" in older versions)
Configure the module:
Title: Rosie Widget
Show Title: Hide
Position: Select a footer position (e.g.,
footer,debug)
In the Custom Output or Content field, paste your installation code from the Rosie admin
Set Status to Published
In the Menu Assignment tab, select which pages should display the widget
Click Save & Close
Alternative: Template Override
For more control, you can add the code directly to your template:
Go to System → Site Templates
Click on your active template
Edit
index.phpand add the script before the closing</body>tag
Reference: Joomla Docs: Custom HTML Module
GoDaddy Website Builder
Add the Rosie Widget to your GoDaddy Websites + Marketing site.
Option 1: HTML Section (For Specific Pages)
Go to your GoDaddy Product Page
Find Websites + Marketing and click Manage
Navigate to the page where you want to add the widget
Click Add Section
Search for and select HTML
In the Custom Code field, paste your installation code from the Rosie admin
Click Done
Preview your changes, then Publish your site
Option 2: Head HTML (For All Pages)
For site-wide installation:
In your website editor, go to Settings
Look for Head HTML or Site-wide Code
Paste your installation code from the Rosie admin
Save and publish your site
Note: Embedding code can affect how your entire site functions. Test thoroughly after adding.
JavaScript Frameworks
React
React
Add the widget by dynamically loading the script in a useEffect hook. This ensures the script loads only on the client side and cleans up properly.
import { useEffect } from 'react'; function RosieWidget({ businessId }) { useEffect(() => { // Check if script already exists if (document.querySelector('script[src="https://widget.heyrosie.com/widget.js"]')) { return; } const script = document.createElement('script'); script.src = 'https://widget.heyrosie.com/widget.js'; script.setAttribute('data-rosie-business-id', businessId); script.async = true; document.body.appendChild(script); return () => { // Cleanup on unmount script.remove(); const widget = document.querySelector('rosie-widget'); if (widget) widget.remove(); }; }, [businessId]); return null; } // Usage in your App function App() { return ( <div> {/* Your app content */} <RosieWidget businessId="YOUR_BUSINESS_ID" /> </div> ); }
Next.js
Next.js
For Next.js, you can use the built-in Script component for optimal loading:
import Script from 'next/script'; export default function RootLayout({ children }) { return ( <html> <body> {children} <Script src="https://widget.heyrosie.com/widget.js" data-rosie-business-id="YOUR_BUSINESS_ID" strategy="lazyOnload" /> </body> </html> ); }
Vue
Vue
In Vue 3, use the onMounted lifecycle hook to load the script:
<script setup> import { onMounted, onUnmounted } from 'vue'; const props = defineProps({ businessId: { type: String, required: true } }); let script = null; onMounted(() => { // Check if script already exists if (document.querySelector('script[src="https://widget.heyrosie.com/widget.js"]')) { return; } script = document.createElement('script'); script.src = 'https://widget.heyrosie.com/widget.js'; script.setAttribute('data-rosie-business-id', props.businessId); script.async = true; document.body.appendChild(script); }); onUnmounted(() => { if (script) { script.remove(); } const widget = document.querySelector('rosie-widget'); if (widget) widget.remove(); }); </script> <template> <!-- Component renders nothing --> </template>Usage:
<template> <div> <!-- Your app content --> <RosieWidget business-id="YOUR_BUSINESS_ID" /> </div> </template>
Angular
Angular
In Angular, use the AfterViewInit lifecycle hook and Renderer2 for proper DOM manipulation:
import { Component, AfterViewInit, OnDestroy, Renderer2, Input } from '@angular/core'; @Component({ selector: 'app-rosie-widget', template: '', standalone: true }) export class RosieWidgetComponent implements AfterViewInit, OnDestroy { @Input() businessId!: string; private script: HTMLScriptElement | null = null; constructor(private renderer: Renderer2) {} ngAfterViewInit(): void { // Check if script already exists if (document.querySelector('script[src="https://widget.heyrosie.com/widget.js"]')) { return; } this.script = this.renderer.createElement('script'); this.script.src = 'https://widget.heyrosie.com/widget.js'; this.script.setAttribute('data-rosie-business-id', this.businessId); this.script.async = true; this.renderer.appendChild(document.body, this.script); } ngOnDestroy(): void { if (this.script) { this.renderer.removeChild(document.body, this.script); } const widget = document.querySelector('rosie-widget'); if (widget) { this.renderer.removeChild(document.body, widget); } } }Usage in your template:
<app-rosie-widget [businessId]="'YOUR_BUSINESS_ID'"></app-rosie-widget>
Troubleshooting
Widget Not Appearing
Use your personalized code: Make sure you're using the installation code from your Rosie admin panel with your business ID already filled in
Ensure the URL of your website is added to the allowed domains list in the Rose Admin.
Clear cache: Clear your browser cache and any site caching plugins
Check console: Open browser developer tools (F12) and check the Console tab for errors
Verify script placement: Ensure the script is placed before the closing
</body>tag
Widget Conflicts
If you experience conflicts with other scripts:
Try moving the Rosie Widget script to load last
Ensure no other elements have the
rosie-widgettag nameCheck for JavaScript errors from other scripts that might block execution
Need Help?
If you continue to experience issues, contact Rosie Support with:
Your website URL
User email associated with your Rosie account
Screenshots of any error messages
The CMS platform you're using