Integrating Genius Chat Widget

Integrating Genius Chat Widget

Integrating the Genius Chat Widget in to your website is easy. Firstly include the DG_CHAT_WIDGET_CONFIG object as provided by your Customer Success Manager inside a script tag at the bottom of each page you want the widget to appear on, like so:

<script>
  window.DG_CHAT_WIDGET_CONFIG = {
     widgetId: '22df40c4-110f-4b6f-aa2b-aeaffd6d1179',
     env: 'eu|us'
  }
</script>

Next, include a reference to the Genius Chat Init script and initialise the widget by calling the window.dgchat.init() method.

<script src="https://chat-assets.digitalgenius.com/dgchatinit.widget.v2.x.x.min.js"></script>
<script>window.dgchat.init()</script>

That's it! The chat widget will appear as configured on your webpage.

⚠️

We recommend against using Tag Management Systems (TMS) such as Google Tag Manager to embed chat in to your page. Ad blockers are known to block scripts injected via TMS.

If you are using server side tagging for GTM or another solution which circumvents problems with ad blockers this may not be an issue. In this case we recommend that you test that the widget is not blocked by popular blockers such as Ublock Origin once it is deployed.