This is not a built-in feature of the widget, but you can implement code in your website (server-side only!) to check Genesys Cloud information to determine if you want to show the widget on your site or not. There's an example of this using v1 chat here: https://github.com/MyPureCloud/public-stats-service. The same concept could be implemented for the v2 chat widget.
Hi. Yes, it is possible. We are in process of updating developer documentation.
You can find an example here.
What I did in GTM:
Create a new Trigger based on 'Page View - DOM Ready'
Create a Tag based on 'Custom HTML', and copy & paste the snippet from the link above (always enclosed inside HTML tags)
This way, you will load the Widgets JavaScript.
As for the Widgets configuration object (window._genesys) I ended up creating a separate Custom HTML Tag, and configured it to always fire before #2 above: GTM has a nice feature for tag sequencing (Tag > Advanced Settings > Tag Sequencing > Fire tag before
This is needed, because Widgets configuration object must be loaded before 'widgets-core'. We'll be updating the script I posted above to include reference to configuration object directly in that script, so that all the Tag Sequencing is not even needed.
Thank you for you're help!
It's working great now.
So just still the other question.
How to manage to show the Icon only if someone is available.
So i understand that it's not possible directly on the Widget.
But if i'm using API to get Stat :
How can i get like a 'capacity' still available ?
Get number of agent onqueue. OK But if the Agent is Interacting (on Chat) it do not mean that the next one will wait. Because one agent can manage multiple chat on the same time. And it will be painfull to have to calculate it manually.