If you would like to modify some of the attributes, it is important to understand how the information is transferred to Heyday to ensure the modifications are present at all moments.
As you know, the Heyday chat optimizes the customer experience by leveraging useful data from a brand's website. This information can be transferred to the heyday chat before or after the chat is initialized, therefore, in modifying certain attributes, you must ensure the changes are applied to each scenario.
List of configurables:

How Data is Transferred to Heyday

The initialization of the Heyday chat happens when the script with the code snippet is executed:
<script src='<organization>/<channel>/<language>/setupchat.js
When the information is passed to Heyday before the initialization of the Chat, the heyday attributes tag <div> is added before the script in the code, as the example below indicates:
<div id="hdAttributes" country="CA"></div>
<script src='<organization>/<channel>/<language>/setupchat.js
For instance, the country of the webpage (ex: Canada vs. USA) is typically known before the Heyday chat is initialized.
It is possible to include multiple parameters in the same <div>.
For example:
<div id="hdAttributes" country=”CA” delay_close="3" ></div>
On the other hand, when the information to be passed is an identifier (i.e. ID) associated with the customer, it may only be known once the customer has logged to the brand website, which can happen after the chat is initialized.
In order to pass the Client-ID after the Heyday chat initialization, a callback function ‘hdAsyncInit’ must be defined by the website and declared before Heyday chat script is loaded.
window.hdAsyncInit = function() {
<script src='<organization>/<Channel>/fr/setupchat.js'></script>
ClientIdAfterInit: alpha-numeric value defined by the brand.
Important: if a ClientID was set with <div id="hdAttributes" external_id="ClientId"></div>, it will be overwritten by ClientIdAfterInit.
The following section explains the parameters that can be modified and how to implement them.
Copy link