This article will help you configure the widget to appear only on specific pages on your site. This option is useful for users who have access to the site’s code and want full control over where the widget appears.
How to display a widget on specific pages
The concept behind this process is simple. By entering the URL within the code, Tidio will only be visible on the pages that have been defined. It will be hidden on any other URL that does not match the defined link.
Let’s see an example:
We added a URL: http://mystore.com/products/black/ to the code. In this case, the widget will be displayed on all URLs that contain this phrase.
The widget will not appear in:
- http://mystore.com/about
- http://mystore.com/contact
- http://mystore.com/blog
But it will appear in:
- http://mystore.com/products/black/
- http://mystore.com/products/black/shoes
- http://mystore.com/products/black/accessories
Code
To implement this option, follow these steps:
- This code needs to load after the script, so the code should be placed below the Tidio JavaScript code or above the
</body> If you are using the Tidio plugin.
-
Copy and paste the code below or find the code on our Codepen page.
If you have any further questions, please send a message to our support team at support@tidio.net
<script async src="https://code.tidio.co/fouwfr0cnygz4sj8kttyv0cz1rpaayva.js"></script>
<script>
(function() {
// שנה כתובות URL מורשות כאן
var whitelistedUrls = [
'http://tidio.com',
];
// אל תשנה את הסקריפט לאחר שורה זו
var shouldShowWidget = (function isCurrentUrlWhitelisted() {
var currentUrl = window.location.href;
var isWhitelisted = false;
whitelistedUrls.forEach(url => {
if (currentUrl.indexOf(url) > -1) {
isWhitelisted = true;
}
})
return isWhitelisted;
})();
function onTidioChatApiReady() {
if (shouldShowWidget) {
window.tidioChatApi.show();
}
else {
window.tidioChatApi.hide();
}
}
if (window.tidioChatApi) {
window.tidioChatApi.on('ready', onTidioChatApiReady)
}
else {
document.addEventListener('tidioChat-ready', onTidioChatApiReady);
}
})();
</script>
Another interesting use for the widget is to display it only on support or FAQ pages on your website. This way, customers can get immediate help when they are looking for answers to their questions, which improves the user experience and increases satisfaction.
[note_box] Tip: If you have a store with a lot of products, you can use a more general URL like “http://mystore.com/products/” to display the widget on all product pages. This saves time and ensures that customers can easily contact you from any product page. [/note_box]
Source link
Understanding the importance of the widget
The widget is a very important tool for many websites, especially e-commerce websites. It allows for direct communication with customers, which leads to an improved user experience. When the widget is displayed on the right pages, it can help customers get answers to their questions quickly and efficiently.
Benefits of using a widget on specific pages
- Improved customer experience: Customers can get immediate help without having to search for contact information.
- Increase conversions: When customers get answers to their questions, they are more likely to make purchases.
- Save time: Customers don’t have to wait for responses by email or phone.
- Customization: The widget can be customized to appear only on relevant pages.
How to choose the right pages?
To choose the right pages to display the widget on, consider the needs of your customers. For example:
- Product Pages – Customers may be interested in questions about the product.
- Support pages – customers looking for answers to frequently asked questions.
- Checkout pages – Customers may need help during the checkout process.
summary
Setting the widget to appear on specific pages is a great way to improve the customer experience on your site. By using the right code, you can control where the widget appears and ensure that it is available exactly when your customers need it. Feel free to contact our support team if you have any additional questions or if you need help setting up your widget.
Additional recommendations
To get the most out of your widget, here are some additional recommendations:
- Check the statistics: Use data analysis tools to see which pages the widget gets the most use.
- Improve content: Make sure the widget’s content is clear and helpful, so customers feel comfortable using it.
- Listen to feedback: Get feedback from your customers about how they use the widget and improve it accordingly.
- Update the widget: Keep the widget up to date with new information and additional services.
Final summary
In conclusion, the widget is an essential tool that can improve the customer experience on your website. By displaying the widget on the right pages, you can ensure that your customers get the support and information they need, thereby increasing satisfaction and conversions on your website.