Embedding / Production
Describes the process of including Leopard on an external website.
Note that you can inject the Leopard Chat UI into a specific element on a page. This might be beneficial if you want to place it in a specific tab order. To enable this add a <div id="leopardChatWindow"></div>
anywhere on the page. This is not required though and if absent the UI will automatically be injected at the beginning of the body.
The keys in the TENEOCTX
object will be passed as individual request parameters to your TIE endpoint with every request.
You can pick up any of the parameters in a pre-processing script in Teneo Studio.
Dynamically passing information
Pass information from website to Leopard and Teneo
You can also dynamically make Leopard and Teneo aware of some page information by posting a message to the frame using JavaScript.
Only use this method when some dynamic HTML or action has happened on the page and you want Leopard to be updated.
Pass information from Teneo through to the website
You can run JavaScript sent from Teneo on the website that embeds Teneo. Add an output parameter to any node in Teneo with the name "script" with the value containing the JavaScript you want to run.
The above code snippet shows that you can run ad hoc JavaScript against the page that is embedding Leopard. You can also populate the leopardState
object if you have defined it on the target page and that data can then be subscribed to from other scripts.
Last updated