Open the Richpanel Chat Widget Directly on Your Site
If you want to have the Richpanel chat widget open directly on your website without needing to click to access it, follow these steps. This guide will help you configure your site so that the chat widget appears immediately when a visitor lands on your page.
Steps to Configure Direct Chat Widget Access
By default, the Richpanel chat widget appears as an icon that users need to click to open. However, you can modify the URL to make the chat widget open directly when a visitor arrives on your site
1. Access Your Website’s HTML
You need to add or modify a URL parameter in your website’s code to make the chat widget open directly. Here’s how you can do it:
For Shopify:
- Log in to your Shopify admin panel.
- Go to "Online Store" and then "Themes".
- Click on "Customize" for the theme you are using.
- Select "Theme Actions" and choose "Edit Code".
- Locate the "theme.liquid" file under "Layout".
- Find the closing
</body>
tag. - Add the following script snippet before the closing
</body>
tag: - Save the changes.
htmlCopy code
<script>
document.addEventListener("DOMContentLoaded", function() {
// Open the chat widget directly
if (window.location.hash === "#rp-customer-widget-home") {
// Assuming the widget's open method is available globally
window.richpanelWidget.open();
}
});
</script>
For Custom HTML Sites:
- Access the HTML code of your website where the chat widget is integrated.
- Add or modify the script similar to the example above to open the widget directly based on the URL parameter.
- Save and publish the changes.
2. Update Your URL
To ensure the chat widget opens directly, use the URL with the specific hash parameter:
bashCopy code
https://yourwebsite.com/#rp-customer-widget-home
Replace https://yourwebsite.com/
with your actual website URL.
3. Verify Installation
After updating the code, visit your website to check if the chat widget opens directly as intended. You should see the widget visible immediately upon page load without needing to click.