Tracking
Embed the Trustisto snippet and send page and user events from your website.
Getting started
3 articlesWhat the Trustisto JavaScript API does and where to get help.
Embed the Trustisto snippet on your website and pass your Website ID.
Load Trustisto only after the visitor accepts cookies, using window.SOCIALPROOF_COOKIE_CONSENT.
On page load
8 articlesSnippet to call on the homepage of your website.
Snippet to call on category pages, with an optional category ID.
Snippet to call on search pages, with an optional search query.
Snippet for sites where search and category are the same page.
Snippet to call on product pages, with product ID, name, link and image.
Snippet to call on the basket page, in a minimal or full version.
Snippet to call on the purchase confirmation page, with order, client and basket data.
Re-check URL triggers when a page changes its URL without a full reload.
On user action
7 articlesIdentify the user and save information about them for later use, e.g. when purchasing.
Snippet to call when the user adds a product to the basket.
Snippet to call when the user removes a product from the basket.
Snippet to overwrite the current user basket.
Send your own events, e.g. newsletter sign-up or video play, with SP.go('push').
Send a form from your website to a Trustisto form campaign with connectForm.
Pass the coupon code used in an order, so Trustisto can mark one-time coupons as used and credit the campaign that sent them.
JavaScript API
4 articlesRun your code once the library is loaded and initialized, and call the methods that return a value.
Read the saved client, manage their tags, segments and scoring, and save client fields straight from form inputs.
Read the products the visitor has recently seen and bought.
Read the visitor's basket, its size and value, and listen for basket changes.
Advanced
4 articlesShow an Overlay, a Bar or a Trust Info notification from your own code.
Read snippet values from the page at call time with $-prefixed values.
Render Trust Info notifications yourself with window.SOCIALPROOF_NOTIFICATOR.
Query parameters for logging, testing and resetting Trustisto on your website, and cross-device user IDs.