Shopify
1
Turn on Tolstoy in your theme
In Website setup & tracking, click Open Shopify theme. In the theme editor, turn Tolstoy on in App embeds, and then click Save. You do this one time for each store.
2
Publish the widget
Open the widget in Tolstoy and click Publish. The publish panel then shows the embed code.
3
Put the widget on a page
Copy the embed code. In the theme editor, add a Tolstoy Builder block where you want the widget. Paste the embed code into the block and click Save.
Other websites
1
Add the site code
Copy the code from Website setup & tracking and paste it into the
<head> of every page of your site. You do this one time.On product pages, set data-product-id to the ID of the product. On other pages, remove data-product-id.2
Publish the widget
Open the widget in Tolstoy and click Publish. The publish panel then shows the embed code.
3
Put the widget on a page
Paste the embed code into your page where you want the widget. If the embed code contains
PRODUCT_ID, replace it with the ID of the product on that page.Conversion tracking
Conversion tracking tells Tolstoy about each order, so that Tolstoy can show the sales that your widgets bring. It is optional. Copy the tracking code from Conversion tracking in Website setup & tracking. Paste it into your order confirmation page, and replace the placeholder values with the data of the order:https://widget.gotolstoy.com/track.js, which sends the order to Tolstoy.
Tolstoy records an order only when:
- The order has a
totalPrice. - The shopper saw Tolstoy on your site in the same browser.
- The shopper did not reject analytics cookies. See Cookie Consent.