Before delving into the topic itself, let’s re-cap first what takes place between a target site and Nosto during a page load.
Assuming you would like to recommend products related to the shopping cart content you need to add a regular recommendation placeholder to the target area (pop-up) and design it accordingly. After that, create the shopping cart tagging within the overlay based on what products are or were just added to the shopping cart when a customer clicks an add to cart button. Tagging is needed to update Nosto about what items are currently held in the shopping cart. Creating and/or updating the cart tagging is on the other hand optional, but if it is missing, Nosto won’t be able to recommend items based on products just added to the cart. Instead, Nosto bases its recommendations on whatever tagging is present on the page, hence we recommend to create the tagging if possible.
You can enable a debugger in your browser’s console using
which outputs the event-log and fundamentally helps you to debug events sent to Nosto and also what is sent back as a payload (typically a recommendation). First four are regular events done when a page is loaded, whereas additional ones in this context are events, which are sent post page-load.
In the third event the cart array is empty before a product has been added to the cart as it doesn’t exist yet.
Once the cart tagging is present and pushed to Nosto, the third event looks like below featuring the product added to the cart.