π
π
π
π
Tolstoy
Searchβ¦
π
π
π
π
Tolstoy
Welcome
API Reference
User
Video
Webhook
Project
JavaScript SDK
Installation
Configuration
Identify
Events
Powered By
GitBook
Installation
Learn how to install the Tolstoy Widget on your site.
Tolstoy Widget Code
Add the following script at the head on your site:
Replace
{{APP_KEY}}
with your account App Key.
1
<script>
2
window.tolstoyAppKey='{{APP_KEY}}';
3
var s = document.createElement('script');
4
s.type = 'text/javascript';
5
s.async = true;
6
s.src = 'https://widget.gotolstoy.com/widget/widget.js';
7
document.head.appendChild(s);
8
</script>
Copied!
For Shopify users the script is added automatically using the ScriptβTag API
β
Single Tolstoy Code
If you want only a single widget on a single page you can also load just the Widget ID
By using this you won't be able to use rules and conditions.
1
# Replace the window.tolstoyAppKey='{{APP_KEY}}';
2
window.tolstoyWidgetId
=
'{{TOLSTOY_ID}}'
Copied!
β
Tolstoy User
If you know the logged in user you can add his email for better tracking.
If you want to add specific Rules & Triggers on users you can skip this and use
Identify
β
1
window.tolstoyUser
=
'{{email}}'
Copied!
API Reference - Previous
Project
Next - JavaScript SDK
Configuration
Last modified
8mo ago
Copy link
Contents
Tolstoy Widget Code
Single Tolstoy Code
Tolstoy User