How to integrate?
- Login into your platform instance
- Go to Configure section in the navigation, subsection Data
- Select Events SDK tab and click Set Events SDK
- Select if you want to collect personal data or not and copy the snippet to clipboard
- Set the snippet on every page of your website or in a shared component such as the header or footer
Collect personal data
<script>
!(function (e, t, n, p, o, a, i, s, c) {
e[o] ||
(((i = e[o] =
function () {
i.process ? i.process.apply(i, arguments) : i.queue.push(arguments);
}).queue = []),
(i.t = 1 * new Date()),
((s = t.createElement(n)).async = 1),
(s.src =
'https://events-scripts.thingsolver.com/v1/script.js?t=' +
864e5 * Math.ceil(new Date() / 864e5)),
(c = t.getElementsByTagName(n)[0]).parentNode.insertBefore(s, c));
})(window, document, 'script', 0, 'ts', true),
ts('init', 'dev', { env: 'prod', endpoint: 'https://events.thingsolver.com/api/latest/events/sdk/collect', shouldCollect: true }),
ts('event', 'page-load');
(function (l, s, c) { s = document.createElement('script'); s.src = l; s.onload = c; document.head.appendChild(s); })('https://events-scripts.thingsolver.com/v1/products.min.js', function () { setup('https://events-scripts.thingsolver.com/mappings/dev/cache.json', 'https://events-scripts.thingsolver.com/mappings/dev/mappings.json') });
</script>
<script src="https://events-scripts.thingsolver.com/custom/dev/custom.js?t=" async defer></script>
Don't collect personal data
<script>
!(function (e, t, n, p, o, a, i, s, c) {
e[o] ||
(((i = e[o] =
function () {
i.process ? i.process.apply(i, arguments) : i.queue.push(arguments);
}).queue = []),
(i.t = 1 * new Date()),
((s = t.createElement(n)).async = 1),
(s.src =
'https://events-scripts.thingsolver.com/v1/script.js?t=' +
864e5 * Math.ceil(new Date() / 864e5)),
(c = t.getElementsByTagName(n)[0]).parentNode.insertBefore(s, c));
})(window, document, 'script', 0, 'ts', true),
ts('init', 'dev', { env: 'prod', endpoint: 'https://events.thingsolver.com/api/latest/events/sdk/collect', shouldCollect: false }),
ts('event', 'page-load');
(function (l, s, c) { s = document.createElement('script'); s.src = l; s.onload = c; document.head.appendChild(s); })('https://events-scripts.thingsolver.com/v1/products.min.js', function () { setup('https://events-scripts.thingsolver.com/mappings/dev/cache.json', 'https://events-scripts.thingsolver.com/mappings/dev/mappings.json') });
</script>
<script src="https://events-scripts.thingsolver.com/custom/dev/custom.js?t=" async defer></script>
*Note: the code blocks above are just an example. Find your unique code by logging to your app environment.
What events will be collected?
Default events:
- page-load
- page-close
- focus
- link
Optional events:
- phone
Expanding on events
- Focus event – It's fired every time the website user stops looking at the website page
- Link event - It's fired if a link was clicked in the last 5 seconds that goes to an external host (leaving to some other website)
- Email event - It's fired when a website visitor is leaving the page and he/she has entered in any input a valid email address.
- Phone event - It's fired when a website visitor is leaving the page and he/she has entered in any input a valid phone number.
What data is being collected?
_tsf_cl |
Cookie Long |
_tsf_cs |
Cookie Short |
ua |
User Agent |
u |
URL |
t |
Timestamp |
p |
Path |
r |
Referrer |
h |
Host |
hn |
Host Name |
scr_ah |
Available Height on Screen |
scr_aw |
Available Width on Screen |
scr_h |
Screen Width |
scr_w |
Screen Height |
e |
Event Type |
ev |
Environment Type |
dt |
Document Title |
dn |
Domain Name |
uid |
Client ID from Snippet |
em |
|
pn |
Phone |
fs |
Focus in Seconds |
c |
Custom Data |
csid |
All Keys from Custom |
How does cookie short work?
Cookie short expires if a visitor doesn’t have any interaction with website for 20 minutes. If the user interacts with the website, the cookie's expiration resets to 20 minutes.
Comments
0 comments
Please sign in to leave a comment.