For both Modal and Embedded guides you need to install the script below on the webpage the guide should appear. Replace YOUR_COMPANY_ID with your company UUID. You can find the script with your ID under company settings in the platform.
If your guide is Embedded you also need to use the code below to set where you want the guide to be placed on the webpage. (You do not need this for Modal guides)
<divid="dt-product-guide"></div>
Localization
To utilize localized product guides, add a locale query parameter to the SDK script source.
Example:
&locale=en_US
Note: If no locale is provided, the SDK will search for a suitable locale by looking at the html-tag lang property or the OpenGraph meta-tag.
Tracking
Sales tracking
We need you to set up our sales tracking events to get the most out of ebbot. They look like this:
/* items is a list of the products added to cart / purchased. id/groupId is the product id / group id that your transformer specifies. quantity is the amount of the product, this is optional. value is the sale price of the product. currency is the currency the user paid in, use the same one to group the sales up and get an overview in our dashboard, this is optional.
ext is the external source, this is optional. When using the default head this is the placementId.*/// Add to cart eventwindow.DT.event('add_to_cart', { items: [ { id: string, groupId?: string, quantity: number, value: string | number } ], currency: string }, ext?: { [key: string]: value});// Purchase eventwindow.DT.event('purchase', { items: [ { id: string, groupId?: string, quantity: number, value: string | number } ], currency: string }, ext?: { [key: string]: value});
Important: Make sure that you send the same id and groupId that you have connected to ebbot through the feed.
These events will send data to us so that you can view your sales in our dashboard, from there you will be able to compare the sales from different guides or placements.
You should install these events where you have set up your purchase events for Google Tag Manager or similar services.
Still not sure how to do it? You can contact us at helpme@ebbot.ai for assistance.
Ecommerce store integrations
Add to cart
If “Add to cart” is enabled, a button will be displayed with each product allowing users to add items directly to cart. When the button is clicked, an event of type dt_add_to_cart is dispatched on window.
Event type:
CustomEvent<{ items: { id: string; quantity: number }[] }>
{ reset?: boolean; args?: { entryTags?: TagCondition[]; entryActions?: Action[]; }}typeTagCondition= {// Conditions may be group with a AND/OR group as below condition: { op:'AND'|'OR'; values: { op:'EQ'|'NEQ'|'EXISTS'; name:string; value:string|number|boolean }[]; };// 0 - 1 weight?:number; inclusivity?:'INCL'|'EXCL'; required?:boolean;};typeAction= { type:'set'|'incr'|'decr'; id:string } & (| { type:'set'; value:string|number|boolean }| { type:'incr'|'decr'; value:number });
How to install a script and/or a div on your website
Each website and company has its own way of installing scripts and code. Therefore, these instructions are general but will hopefully help you. You will most likely find more specific instructions with your e-commerce provider.
Installing a script
Most websites use a third-party tool to manage their scripts, e.g. Google Tag Manager. If so, install ebbot in there, the same way you do for other scripts.
If you prefer you can instead install the script in your website’s header or footer.
Installing a div
Put the div where you want the embedded CTA or guide to appear on your website. Most websites allow for creating custom html elements. Create a customer html element, or similar, in the position on your website where you want the guide to appear.
Styling tips
You can change some main colors under placement defaults, these will be the same for all placements. If you want to have specific colors for a certain placement you can accomplish this by using the css editor for that placement.
We have a bunch css vars that you can change how you like, here’s a list:
When entering your css we recommend that the css structure should look something like this:
& {/* Put css vars here */ --primary-color:black;/* Style the guide components under '&#dt-pg-root' to avoid using !important */&#dt-pg-root {background:white;&.dt-option {background:blue; } }/* Style the modal components under '&#dt-cta' to avoid using !important */&#dt-cta {z-index:100;&.dt-cta-content {background:grey; } }}
If these instructions were not enough, try searching for the solution through your e-commerce provider’s documentation.