# Check your setup

### Session view in the debug toolbar <a href="#viewing-the-session-view-in-the-debug-toolbar" id="viewing-the-session-view-in-the-debug-toolbar"></a>

1. Navigate to your site in [incognito mode](https://support.google.com/chrome/answer/95464).
2. Load the debug toolbar by appending `nostodebug=true` to your store's URL e.g. `https://example.com?nostodebug=true`
3. Click the login link and navigate to the session view.

![Click the login button](https://2052219189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4IGuGLvRTou2pTniuH%2Fuploads%2Fgit-blob-d930df3125b22dd628efe64e2bf503b230fa3571%2FScreenshot%202021-09-10%20at%2012.52.43.png?alt=media\&token=69fd0c1b-55f9-42ad-b3fb-f23e19f6681f) ![After logging in, the session tab should be visible on the left-hand side](https://2052219189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4IGuGLvRTou2pTniuH%2Fuploads%2Fgit-blob-5ef3918b6849caf1d5096715ee2a04840a5073bd%2FScreenshot%202021-09-10%20at%2012.53.29-20210910-095337.png?alt=media\&token=351af0ad-2821-4604-a18d-212aa2f6ab67)

### View Category

Navigate to a category page and verify that the View Category event is tracked with the following details:

* Target matches the viewed category.

![Viewing the "Bags" category](https://2052219189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4IGuGLvRTou2pTniuH%2Fuploads%2Fgit-blob-a8147b93d6d7ee2b1f30fb313ba41a1ec176fad8%2FView%20Category.png?alt=media\&token=2fc6a1f2-257f-41f2-9569-487b656cec13)

If the category doesn't appear in the session, these pages might help

* [Tagging: category](https://docs.nosto.com/techdocs/implementing-nosto/implement-on-your-website/manual-implementation/category-and-brand-tagging)
* [Session API: category](https://docs.nosto.com/techdocs/apis/frontend/implementation-guide-session-api/spa-basics-tracking-events#upon-viewing-a-collection)

### View Product

Navigate to a product page and verify that the View Product event is tracked with the following details:

* Target matches the viewed product ID.

![Viewing product 784735895612](https://2052219189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4IGuGLvRTou2pTniuH%2Fuploads%2Fgit-blob-cc3ffec86f9964e97210eff9487cf37005717214%2FView%20Product.png?alt=media\&token=3c28647e-4554-418f-972d-3a0fc4ec1361)

If the product doesn't appear in the session, these pages might help:

* [Tagging: product](https://docs.nosto.com/techdocs/implementing-nosto/implement-on-your-website/manual-implementation/product-tagging)
* [JS API: product](https://docs.nosto.com/techdocs/apis/js-apis/common-examples/sending-product-view-events)
* [Session API: product](https://docs.nosto.com/techdocs/apis/frontend/implementation-guide-session-api/spa-basics-tracking-events#upon-viewing-a-product)

### View a Recommended Product <a href="#view-a-recommended-product" id="view-a-recommended-product"></a>

Click on a product recommendation and verify that the View Product event is tracked with the following details:

* Target matches the viewed product ID.
* Ref matches the previously viewed recommendation slot ID.

![Viewing product 789528674364 from recommendation slot productpage-nosto-14-high-upsell](https://2052219189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4IGuGLvRTou2pTniuH%2Fuploads%2Fgit-blob-e577213bfed6360eb0f3c1cd3eca7efa18e916c3%2FView%20Recommended%20Product.png?alt=media\&token=98a44bc6-ec07-4107-adab-4aaeec408b4d)

If the product id and recommendation slot id don't appear in the session, these pages might help:

* [JS API: Attribution for recommended Products](https://docs.nosto.com/techdocs/apis/js-apis/recommendations/sending-product-view-events#attribution-for-recommended-products)
* [JS API: Sending Add to Cart-Events](https://docs.nosto.com/techdocs/apis/js-apis/common-examples/sending-add-to-cart-events)
* [Session API: handling attribution](https://docs.nosto.com/techdocs/apis/frontend/implementation-guide-session-api/spa-basics-leveraging-features#handling-attribution)

### Cart

Add the product to cart and verify that the cart’s contents are correct. Ensure that the product details in the cart match the product that was previously viewed.

* Product ID
* Price & Currency
* Quantity

![](https://2052219189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4IGuGLvRTou2pTniuH%2Fuploads%2Fgit-blob-10f0b9a004b61bd6658de36d98b710203c374b33%2FCart.png?alt=media\&token=145dda91-6101-4d71-8713-7314e326be84)

If the cart doesn't correctly show in the session view, these pages might help:

* [Tagging: cart](https://docs.nosto.com/techdocs/implementing-nosto/implement-on-your-website/manual-implementation/cart-tagging)
* [JS API: cart](https://docs.nosto.com/techdocs/apis/js-apis/common-examples/dynamically-sending-the-cart-content)
* [Session API: cart](https://docs.nosto.com/techdocs/apis/frontend/implementation-guide-session-api/spa-basics-managing-sessions#setting-the-cart)

### Order

Purchase the product and verify that the Buy Product event is tracked with the following details:

* Ref matches the recommendation slot id
* Target matches the product id

Wait 30 minutes for the session to expire and then verify that the order shows up in the orders page of the Nosto admin UI.

![Buy product 789528674364 from recommendation slot productpage-nosto-14-high-upsell.](https://2052219189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4IGuGLvRTou2pTniuH%2Fuploads%2Fgit-blob-f4ea5e0f5a3865f1d3fdc7332a53b40b0d5b9c4c%2FOrder.png?alt=media\&token=6d654792-e603-460d-806e-fbfb6ea1195d)

If the order doesn't correctly show in the session view, these pages might help:

* [Tagging: order](https://docs.nosto.com/techdocs/implementing-nosto/implement-on-your-website/manual-implementation/order-tagging)
* [Session API: order](https://docs.nosto.com/techdocs/apis/frontend/implementation-guide-session-api/spa-basics-tracking-events#upon-placing-an-order)

{% hint style="info" %}
If it’s not possible to perform a test order, the Nosto admin UI's orders page can be used to review that orders link to known products in the catalog and that some items have click attribution towards the visible recommendations.
{% endhint %}

### Measuring Performance

We’ve integrated with the [User Timing API](https://developer.mozilla.org/en-US/docs/Web/API/User_Timing_API) to be able to show some performance measurements of our client script. The supported measurements are:

* `nosto.get_dynamic_placements` Parse the DOM and find placements on the page. Performed before a recommendations request is sent.
* `nosto.load_recommendations` Send the recommendations request and handle the recommendation result. This encompasses measuring the recommendations request and `nosto.inject_campaigns`.
* `nosto.inject_campaigns` Inject both dynamic and static campaigns into the DOM. This encompasses both `nosto.inject_static_campaigns` and `nosto.inject_dynamic_campaigns`.
* `nosto.inject_static_campaigns` Inject static campaigns into the DOM.
* `nosto.inject_dynamic_campaigns` Inject dynamic campaigns into the DOM.
* `nosto.evaluate_js` Extract and evaluate embedded JavaScript from recommendation templates.

#### Lighthouse

Chrome's [lighthouse](https://developers.google.com/web/tools/lighthouse) tool can be opened by doing the following:

1. Right click and select Inspect.
2. Navigate to the Lighthouse tab.
3. Ensure the Performance category is enabled.
4. Click Generate Report

![](https://2052219189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4IGuGLvRTou2pTniuH%2Fuploads%2Fgit-blob-2fe14b1c12c524089b634f8c6dc4c8dda3c91016%2Fimage.png?alt=media\&token=79661ed1-91cd-4a8f-9661-39c665b01908) ![](https://2052219189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4IGuGLvRTou2pTniuH%2Fuploads%2Fgit-blob-71c926e70d694cf9bfcaa7fdfb1aaa32fde1ee40%2Fimage.png?alt=media\&token=4bf3b67f-8174-4b82-98dc-40e7bf16986b)

Once the report is generated, you can expand the “User Timing marks and measures” section under the Diagnostics section to see some basic information like how long after the page started to load the measurements start and how long each measurement took.

![](https://2052219189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4IGuGLvRTou2pTniuH%2Fuploads%2Fgit-blob-3479f914d6b259ecbfc001cb15a47cc4d6771ae2%2Fimage.png?alt=media\&token=bf00e9a9-0969-4d84-99f3-f3be811957eb)

You can scroll back up and click the View Original Trace button to view a timeline of the measurements. You may need to expand the Timings section to view the client script’s recorded measurements. You can zoom in an out of this graph and swipe side to side to get a better view of things.

![](https://2052219189-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-M4IGuGLvRTou2pTniuH%2Fuploads%2Fgit-blob-fe6f0bbf0cd9848c094192ead4eca14c7e4707a4%2Fimage.png?alt=media\&token=0f3718a3-b61a-4b14-b19f-5676afe78073)
