Parameterless Attribution

This documentation highlights the differences in the response rendered when using Parameterless Attribution with Session API

Introduction

Parameterless attribution, when enabled, removes tracking parameters from the URL and tracks user interactions with Nosto recommendations/campaigns through an alternative approach. For more information on Parameterless Attribution, please refer the help article here

Usage with Session API

It's important to note that when using Session API with Parameterless Tracking enabled, the structure of response returned is different from the traditional Session API responses.

Below are the examples of responses with/without Parameterless Attribution

With Parameterless Attribution

JSON Response Mode

recommendations: {
  "result_id": "productpage-nosto-2",
  "products": [
      {
          "name": "Voile Dress in Grey Pearl",
          "alternate_image_urls": [
              "https://cdn.shopify.com/s/files/1/0602/6874/0822/products/01182015_ASHLEY_Look20_21305_1380.jpg?v=1655287966"
          ],
          "description": "This is a demonstration store. You can purchase products like this from Baby & Company\n\nFormalwear that's not trying too hard. The Voile Dress attracts an audience for all the right reasons: artistic pleating, full circle skirt, and a natural waistline. Invisible zip closure at center back. Fully lined. Amelia Toro. Color Graphite/Pearl. 100% Cotton. Made in Columbia. Ashley is wearing a Size 2.\n\nShop our collection of Amelia Toro.",
          "url": "https://maninostoprod.myshopify.com/products/cotton-dress-in-graphite-pearl",
          "categories": [
              "women's dresses"
          ],
          "product_id": "7715036168406",
          ....
      }
  ],
  "result_type": "REAL",
  "title": "Other Customers Were Interested In",
  "div_id": "productpage-nosto-2",
  "source_product_ids": [
      "7715036430550"
  ],
  "params": {
      "nosto": "productpage-nosto-2",
      "refSrc": "7715036430550"
  }
}

HTML Response Mode

recommendations: {
    "productpage-nosto-1": {
        "div_id": "productpage-nosto-2",
        "result_id": "productpage-nosto-2",
        "html": "<style>\r\n    #productpage-nosto-1 .product-grid {\r\n        display: flex;\r\n        /*grid-gap: var(--hh-space-2xs);*/\r\n        grid-gap: 10px;\r\n        padding-right: 1px;\r\n        overflow-x: scroll;\r\n    }\r\n    \r\n    #productpage-nosto-1 .product-grid__item {\r\n        flex: 0 0 25%;\r\n        max-width: 25%;\r\n    }\r\n    \r\n    @media (max-width: 989px) {\r\n        #productpage-nosto-1 .product-grid__item {\r\n            flex: 0 0 50%;\r\n            max-width: 50%;\r\n        }\r\n    }\r\n    \r\n    #productpage-nosto-1 .nosto-container {\r\n        padding: 20px;\r\n    }\r\n    #productpage-nosto-1 .ns-title-padding {\r\n        padding-bottom: 20px;\r\n    }\r\n    \r\n    #productpage-nosto-1 .badge-item.caption {\r\n        text-transform: capitalize;\r\n    }\r\n    \r\n    @media screen and (min-width: 990px) {\r\n        #productpage-nosto-1 .card .form {\r\n            display: grid;\r\n            grid-template-rows: 2fr!important;\r\n        }\r\n    }\r\n    \r\n    /*@media (max-width: 767px) {*/\r\n    /*    #productpage-nosto-1 .badge-item.caption {*/\r\n    /*        font-size: 10px;*/\r\n    /*        padding: 5px;*/\r\n    /*    }*/\r\n    /*}*/\r\n</style>\r\n\r\n<div class=\"nosto-container\">\r\n    <div class=\"main-wishtlist__header\">\r\n        <h1 class=\"h3 ns-title-padding\">\r\n          COMPLETE YOUR LIBRARY\r\n        </h1>\r\n    </div>\r\n    <ul class=\"product-grid  js-product-grid-list\">\r\n              <li class=\"product-grid__item\" style=\"--order: 1\">\r\n          <hh-product-card id=\"product-card-6841401016404\" class=\"product-card\">\r\n             <hh-product-form class=\"card\" show-mini-cart=\"\">\r\n                <form method=\"post\" action=\"/cart/add\" id=\"product-card-form6841401016404template--21314528837912__product-grid\" accept-charset=\"UTF-8\" class=\"form\" enctype=\"multipart/form-data\" novalidate=\"novalidate\" data-type=\"add-to-cart-form\">\r\n                   <input type=\"hidden\" name=\"form_type\" value=\"product\"><input type=\"hidden\" name=\"utf8\" value=\"✓\">\r\n                   <input type=\"hidden\" name=\"quantity\" value=\"1\">\r\n                   <input type=\"hidden\" name=\"id\" value=\"40111261778004\">\r\n                   <div class=\"card__image-container\">\r\n                      <a class=\"skip-to-content-link visually-hidden\" href=\"#ProductCardWishlist-template--21314528837912__product-grid-6841401016404\">\r\n                      Skip to product information\r\n                      </a>\r\n                      <!-- media carousel -->\r\n                                                                                                              <a href=\"https://www.assouline.com/products/barbie\" aria-label=\"Barbie\" id=\"product-6841401016404\" data-page=\"1\" data-product-card-link=\"\">\r\n                         <hh-image-carousel class=\"product-card-media product-card-media--6841401016404\" role=\"region\" arrows=\"\" pagination=\"\" slide-count=\"3\" location=\"product-card\">\r\n                            <div slot=\"item\" class=\"slide\" role=\"group\" tabindex=\"0\" slide-index=\"0\" aria-roledescription=\"Slide\" aria-label=\"1 of 8\">\r\n                               <adaptive-image class=\"\" data-image=\"https://cdn.shopify.com/s/files/1/2131/2399/files/Barbie_01-Updated.jpg?v=1708977408\" data-mobile-image=\"IiI=\" data-aspect-ratio=\"0.8\" data-mobile-aspect-ratio=\"\" data-alt=\"Patek Philippe: The Impossible Collection\" data-loading=\"\" data-sizes=\"\" data-object-fit=\"\" style=\"--hh-object-fit: cover; --hh-aspect-ratio: 0.8; --hh-mobile-aspect-ratio: 0.8;\">\r\n                               </adaptive-image>\r\n                            </div>\r\n                                                        <div slot=\"item\" class=\"slide\" role=\"group\" tabindex=\"0\" slide-index=\"0\" aria-roledescription=\"Slide\" aria-label=\"1 of 8\">\r\n                               <adaptive-image class=\"\" data-image=\"https://cdn.shopify.com/s/files/1/2131/2399/files/Barbie_BACK_02_1.jpg?v=1708977408\" data-mobile-image=\"IiI=\" data-aspect-ratio=\"0.8\" data-mobile-aspect-ratio=\"\" data-alt=\"Patek Philippe: The Impossible Collection\" data-loading=\"\" data-sizes=\"\" data-object-fit=\"\" style=\"--hh-object-fit: cover; --hh-aspect-ratio: 0.8; --hh-mobile-aspect-ratio: 0.8;\">\r\n                               </adaptive-image>\r\n                            </div>\r\n                                                        <div slot=\"item\" class=\"slide\" role=\"group\" tabindex=\"0\" slide-index=\"0\" aria-roledescription=\"Slide\" aria-label=\"1 of 8\">\r\n                               <adaptive-image class=\"\" data-image=\"https://cdn.shopify.com/s/files/1/2131/2399/files/barbie-assouline-3.jpg?v=1708977408\" data-mobile-image=\"IiI=\" data-aspect-ratio=\"0.8\" data-mobile-aspect-ratio=\"\" data-alt=\"Patek Philippe: The Impossible Collection\" data-loading=\"\" data-sizes=\"\" data-object-fit=\"\" style=\"--hh-object-fit: cover; --hh-aspect-ratio: 0.8; --hh-mobile-aspect-ratio: 0.8;\">\r\n                               </adaptive-image>\r\n                            </div>\r\n                                                     </hh-image-carousel>\r\n                      </a>\r\n                      <!-- wishlist icon -->\r\n                      <hh-wishlist-button id=\"ProductCardWishlist-template--21314528837912__product-grid-6841401016404\" class=\"card__wishlist\" product-id=\"6841401016404\" product-url=\"https://www.assouline.com/products/barbie\" variant-id=\"40111261778004\"></hh-wishlist-button>\r\n                      <div class=\"badge-wrapper\">\r\n                                                                                                                            <div class=\"badge-item caption\">\r\n                                        <div>Best Seller</div>\r\n                                    </div>\r\n                                                                                                                                                                                                            </div>\r\n                   </div>\r\n                   <div class=\"card__info-container\">\r\n                      <div class=\"card__text-container\">\r\n                         <!-- collection -->\r\n                         <!--<span class=\"card__collection caption\">-->\r\n                         <!--The Ultimate Collection-->\r\n                         <!--</span>-->\r\n                         <!-- title -->\r\n                         <a href=\"https://www.assouline.com/products/barbie\" class=\"card__title h6 js-product-card-title\">Barbie</a>\r\n                         <!-- price -->\r\n                         <dl class=\"price body\">\r\n                            <div>\r\n                               <dt class=\"visually-hidden\">Regular price</dt>\r\n                               <dd>\r\n                                  $105.00\r\n                               </dd>\r\n                            </div>\r\n                         </dl>\r\n                      </div>\r\n                      <div class=\"card__cta-container hidden--sm \">\r\n                         <!-- atc -->\r\n                         <hh-button-wrapper theme=\"primary\">\r\n                            <!--<button class=\"card-cta\" type=\"submit\" name=\"add\" disabled=\"\">-->\r\n                            <button class=\"card-cta\" type=\"submit\" name=\"add\">\r\n                            Add to cart\r\n                            </button>\r\n                         </hh-button-wrapper>\r\n                      </div>\r\n                      <!-- cart atc -->\r\n                      <div class=\"hidden\">\r\n                         <!--<button class=\"card-cta card-cta--cart\" type=\"submit\" name=\"add\" disabled=\"\">-->\r\n                         <button class=\"card-cta card-cta--cart\" type=\"submit\" name=\"add\">\r\n                            <span class=\"visually-hidden\">\r\n                            Add to cart\r\n                            </span>\r\n                            <svg xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-plus\" fill=\"none\" viewBox=\"0 0 10 11\">\r\n                               <path class=\"vertical\" d=\"M5 0.399902V10.3999\" stroke=\"currentColor\"></path>\r\n                               <path d=\"M0 5.3999L10 5.3999\" stroke=\"currentColor\"></path>\r\n                            </svg>\r\n                         </button>\r\n                      </div>\r\n                   </div>\r\n                   <input type=\"hidden\" name=\"product-id\" value=\"6841401016404\">\r\n                </form>\r\n             </hh-product-form>\r\n          </hh-product-card>\r\n       </li>\r\n              <li class=\"product-grid__item\" style=\"--order: 1\">\r\n          <hh-product-card id=\"product-card-22925377556\" class=\"product-card\">\r\n             <hh-product-form class=\"card\" show-mini-cart=\"\">\r\n                <form method=\"post\" action=\"/cart/add\" id=\"product-card-form22925377556template--21314528837912__product-grid\" accept-charset=\"UTF-8\" class=\"form\" enctype=\"multipart/form-data\" novalidate=\"novalidate\" data-type=\"add-to-cart-form\">\r\n                   <input type=\"hidden\" name=\"form_type\" value=\"product\"><input type=\"hidden\" name=\"utf8\" value=\"✓\">\r\n                   <input type=\"hidden\" name=\"quantity\" value=\"1\">\r\n                   <input type=\"hidden\" name=\"id\" value=\"1650229182484\">\r\n                   <div class=\"card__image-container\">\r\n                      <a class=\"skip-to-content-link visually-hidden\" href=\"#ProductCardWishlist-template--21314528837912__product-grid-22925377556\">\r\n                      Skip to product information\r\n                      </a>\r\n                      <!-- media carousel -->\r\n                                                                                                                                                          <a href=\"https://www.assouline.com/products/swans\" aria-label=\"Swans: Legends of the Jet Society\" id=\"product-22925377556\" data-page=\"1\" data-product-card-link=\"\">\r\n                         <hh-image-carousel class=\"product-card-media product-card-media--22925377556\" role=\"region\" arrows=\"\" pagination=\"\" slide-count=\"5\" location=\"product-card\">\r\n                            <div slot=\"item\" class=\"slide\" role=\"group\" tabindex=\"0\" slide-index=\"0\" aria-roledescription=\"Slide\" aria-label=\"1 of 8\">\r\n                               <adaptive-image class=\"\" data-image=\"https://cdn.shopify.com/s/files/1/2131/2399/files/swans-legends-of-the-jet-society-assouline-1.jpg?v=1707850953\" data-mobile-image=\"IiI=\" data-aspect-ratio=\"0.8\" data-mobile-aspect-ratio=\"\" data-alt=\"Patek Philippe: The Impossible Collection\" data-loading=\"\" data-sizes=\"\" data-object-fit=\"\" style=\"--hh-object-fit: cover; --hh-aspect-ratio: 0.8; --hh-mobile-aspect-ratio: 0.8;\">\r\n                               </adaptive-image>\r\n                            </div>\r\n                                                        <div slot=\"item\" class=\"slide\" role=\"group\" tabindex=\"0\" slide-index=\"0\" aria-roledescription=\"Slide\" aria-label=\"1 of 8\">\r\n                               <adaptive-image class=\"\" data-image=\"https://cdn.shopify.com/s/files/1/2131/2399/files/SWANS_02_986e7251-12db-4b87-a5c6-04ba16455cf2.jpg?v=1707951032\" data-mobile-image=\"IiI=\" data-aspect-ratio=\"0.8\" data-mobile-aspect-ratio=\"\" data-alt=\"Patek Philippe: The Impossible Collection\" data-loading=\"\" data-sizes=\"\" data-object-fit=\"\" style=\"--hh-object-fit: cover; --hh-aspect-ratio: 0.8; --hh-mobile-aspect-ratio: 0.8;\">\r\n                               </adaptive-image>\r\n                            </div>\r\n                                                        <div slot=\"item\" class=\"slide\" role=\"group\" tabindex=\"0\" slide-index=\"0\" aria-roledescription=\"Slide\" aria-label=\"1 of 8\">\r\n                               <adaptive-image class=\"\" data-image=\"https://cdn.shopify.com/s/files/1/2131/2399/files/swans-legends-of-the-jet-society-assouline-2.jpg?v=1707950916\" data-mobile-image=\"IiI=\" data-aspect-ratio=\"0.8\" data-mobile-aspect-ratio=\"\" data-alt=\"Patek Philippe: The Impossible Collection\" data-loading=\"\" data-sizes=\"\" data-object-fit=\"\" style=\"--hh-object-fit: cover; --hh-aspect-ratio: 0.8; --hh-mobile-aspect-ratio: 0.8;\">\r\n                               </adaptive-image>\r\n                            </div>\r\n                                                        <div slot=\"item\" class=\"slide\" role=\"group\" tabindex=\"0\" slide-index=\"0\" aria-roledescription=\"Slide\" aria-label=\"1 of 8\">\r\n                               <adaptive-image class=\"\" data-image=\"https://cdn.shopify.com/s/files/1/2131/2399/files/swans-legends-of-the-jet-society-assouline-3.jpg?v=1707950916\" data-mobile-image=\"IiI=\" data-aspect-ratio=\"0.8\" data-mobile-aspect-ratio=\"\" data-alt=\"Patek Philippe: The Impossible Collection\" data-loading=\"\" data-sizes=\"\" data-object-fit=\"\" style=\"--hh-object-fit: cover; --hh-aspect-ratio: 0.8; --hh-mobile-aspect-ratio: 0.8;\">\r\n                               </adaptive-image>\r\n                            </div>\r\n                                                        <div slot=\"item\" class=\"slide\" role=\"group\" tabindex=\"0\" slide-index=\"0\" aria-roledescription=\"Slide\" aria-label=\"1 of 8\">\r\n                               <adaptive-image class=\"\" data-image=\"https://cdn.shopify.com/s/files/1/2131/2399/files/swans-legends-of-the-jet-society-assouline-4.jpg?v=1707950916\" data-mobile-image=\"IiI=\" data-aspect-ratio=\"0.8\" data-mobile-aspect-ratio=\"\" data-alt=\"Patek Philippe: The Impossible Collection\" data-loading=\"\" data-sizes=\"\" data-object-fit=\"\" style=\"--hh-object-fit: cover; --hh-aspect-ratio: 0.8; --hh-mobile-aspect-ratio: 0.8;\">\r\n                               </adaptive-image>\r\n                            </div>\r\n                                                     </hh-image-carousel>\r\n                      </a>\r\n                      <!-- wishlist icon -->\r\n                      <hh-wishlist-button id=\"ProductCardWishlist-template--21314528837912__product-grid-22925377556\" class=\"card__wishlist\" product-id=\"22925377556\" product-url=\"https://www.assouline.com/products/swans\" variant-id=\"1650229182484\"></hh-wishlist-button>\r\n                      <div class=\"badge-wrapper\">\r\n                                                                                                                            <div class=\"badge-item caption\">\r\n                                        <div>Out of Stock</div>\r\n                                    </div>\r\n                                                                                                                                <div class=\"badge-item caption\">\r\n                                        <div>Pre-Order</div>\r\n                                    </div>\r\n                                                                                                                                                                                                            </div>\r\n                   </div>\r\n                   <div class=\"card__info-container\">\r\n                      <div class=\"card__text-container\">\r\n                         <!-- collection -->\r\n                         <!--<span class=\"card__collection caption\">-->\r\n                         <!--The Ultimate Collection-->\r\n                         <!--</span>-->\r\n                         <!-- title -->\r\n                         <a href=\"https://www.assouline.com/products/swans\" class=\"card__title h6 js-product-card-title\">Swans: Legends of the Jet Society</a>\r\n                         <!-- price -->\r\n                         <dl class=\"price body\">\r\n                            <div>\r\n                               <dt class=\"visually-hidden\">Regular price</dt>\r\n                               <dd>\r\n                                  $195.00\r\n                               </dd>\r\n                            </div>\r\n                         </dl>\r\n                      </div>\r\n                      <div class=\"card__cta-container hidden--sm \">\r\n                         <!-- atc -->\r\n                         <hh-button-wrapper theme=\"primary\">\r\n                            <!--<button class=\"card-cta\" type=\"submit\" name=\"add\" disabled=\"\">-->\r\n                            <button class=\"card-cta\" type=\"submit\" name=\"add\">\r\n                            Add to cart\r\n                            </button>\r\n                         </hh-button-wrapper>\r\n                      </div>\r\n                      <!-- cart atc -->\r\n                      <div class=\"hidden\">\r\n                         <!--<button class=\"card-cta card-cta--cart\" type=\"submit\" name=\"add\" disabled=\"\">-->\r\n                         <button class=\"card-cta card-cta--cart\" type=\"submit\" name=\"add\">\r\n                            <span class=\"visually-hidden\">\r\n                            Add to cart\r\n                            </span>\r\n                            <svg xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-plus\" fill=\"none\" viewBox=\"0 0 10 11\">\r\n                               <path class=\"vertical\" d=\"M5 0.399902V10.3999\" stroke=\"currentColor\"></path>\r\n                               <path d=\"M0 5.3999L10 5.3999\" stroke=\"currentColor\"></path>\r\n                            </svg>\r\n                         </button>\r\n                      </div>\r\n                   </div>\r\n                   <input type=\"hidden\" name=\"product-id\" value=\"22925377556\">\r\n                </form>\r\n             </hh-product-form>\r\n          </hh-product-card>\r\n       </li>\r\n              <li class=\"product-grid__item\" style=\"--order: 1\">\r\n          <hh-product-card id=\"product-card-6841398624340\" class=\"product-card\">\r\n             <hh-product-form class=\"card\" show-mini-cart=\"\">\r\n                <form method=\"post\" action=\"/cart/add\" id=\"product-card-form6841398624340template--21314528837912__product-grid\" accept-charset=\"UTF-8\" class=\"form\" enctype=\"multipart/form-data\" novalidate=\"novalidate\" data-type=\"add-to-cart-form\">\r\n                   <input type=\"hidden\" name=\"form_type\" value=\"product\"><input type=\"hidden\" name=\"utf8\" value=\"✓\">\r\n                   <input type=\"hidden\" name=\"quantity\" value=\"1\">\r\n                   <input type=\"hidden\" name=\"id\" value=\"40111247491156\">\r\n                   <div class=\"card__image-container\">\r\n                      <a class=\"skip-to-content-link visually-hidden\" href=\"#ProductCardWishlist-template--21314528837912__product-grid-6841398624340\">\r\n                      Skip to product information\r\n                      </a>\r\n                      <!-- media carousel -->\r\n                                                                                                              <a href=\"https://www.assouline.com/products/mexico-city\" aria-label=\"Mexico City\" id=\"product-6841398624340\" data-page=\"1\" data-product-card-link=\"\">\r\n                         <hh-image-carousel class=\"product-card-media product-card-media--6841398624340\" role=\"region\" arrows=\"\" pagination=\"\" slide-count=\"3\" location=\"product-card\">\r\n                            <div slot=\"item\" class=\"slide\" role=\"group\" tabindex=\"0\" slide-index=\"0\" aria-roledescription=\"Slide\" aria-label=\"1 of 8\">\r\n                               <adaptive-image class=\"\" data-image=\"https://cdn.shopify.com/s/files/1/2131/2399/files/mexico-city-assouline-1.jpg?v=1707852528\" data-mobile-image=\"IiI=\" data-aspect-ratio=\"0.8\" data-mobile-aspect-ratio=\"\" data-alt=\"Patek Philippe: The Impossible Collection\" data-loading=\"\" data-sizes=\"\" data-object-fit=\"\" style=\"--hh-object-fit: cover; --hh-aspect-ratio: 0.8; --hh-mobile-aspect-ratio: 0.8;\">\r\n                               </adaptive-image>\r\n                            </div>\r\n                                                        <div slot=\"item\" class=\"slide\" role=\"group\" tabindex=\"0\" slide-index=\"0\" aria-roledescription=\"Slide\" aria-label=\"1 of 8\">\r\n                               <adaptive-image class=\"\" data-image=\"https://cdn.shopify.com/s/files/1/2131/2399/files/mexico-city-assouline-2.jpg?v=1707852529\" data-mobile-image=\"IiI=\" data-aspect-ratio=\"0.8\" data-mobile-aspect-ratio=\"\" data-alt=\"Patek Philippe: The Impossible Collection\" data-loading=\"\" data-sizes=\"\" data-object-fit=\"\" style=\"--hh-object-fit: cover; --hh-aspect-ratio: 0.8; --hh-mobile-aspect-ratio: 0.8;\">\r\n                               </adaptive-image>\r\n                            </div>\r\n                                                        <div slot=\"item\" class=\"slide\" role=\"group\" tabindex=\"0\" slide-index=\"0\" aria-roledescription=\"Slide\" aria-label=\"1 of 8\">\r\n                               <adaptive-image class=\"\" data-image=\"https://cdn.shopify.com/s/files/1/2131/2399/files/mexico-city-assouline-3.jpg?v=1707852531\" data-mobile-image=\"IiI=\" data-aspect-ratio=\"0.8\" data-mobile-aspect-ratio=\"\" data-alt=\"Patek Philippe: The Impossible Collection\" data-loading=\"\" data-sizes=\"\" data-object-fit=\"\" style=\"--hh-object-fit: cover; --hh-aspect-ratio: 0.8; --hh-mobile-aspect-ratio: 0.8;\">\r\n                               </adaptive-image>\r\n                            </div>\r\n                                                     </hh-image-carousel>\r\n                      </a>\r\n                      <!-- wishlist icon -->\r\n                      <hh-wishlist-button id=\"ProductCardWishlist-template--21314528837912__product-grid-6841398624340\" class=\"card__wishlist\" product-id=\"6841398624340\" product-url=\"https://www.assouline.com/products/mexico-city\" variant-id=\"40111247491156\"></hh-wishlist-button>\r\n                      <div class=\"badge-wrapper\">\r\n                                                                                                                            <div class=\"badge-item caption\">\r\n                                        <div>Best Seller</div>\r\n                                    </div>\r\n                                                                                                                                <div class=\"badge-item caption\">\r\n                                        <div>New Arrival</div>\r\n                                    </div>\r\n                                                                                                                                                                                                                                                                        </div>\r\n                   </div>\r\n                   <div class=\"card__info-container\">\r\n                      <div class=\"card__text-container\">\r\n                         <!-- collection -->\r\n                         <!--<span class=\"card__collection caption\">-->\r\n                         <!--The Ultimate Collection-->\r\n                         <!--</span>-->\r\n                         <!-- title -->\r\n                         <a href=\"https://www.assouline.com/products/mexico-city\" class=\"card__title h6 js-product-card-title\">Mexico City</a>\r\n                         <!-- price -->\r\n                         <dl class=\"price body\">\r\n                            <div>\r\n                               <dt class=\"visually-hidden\">Regular price</dt>\r\n                               <dd>\r\n                                  $105.00\r\n                               </dd>\r\n                            </div>\r\n                         </dl>\r\n                      </div>\r\n                      <div class=\"card__cta-container hidden--sm \">\r\n                         <!-- atc -->\r\n                         <hh-button-wrapper theme=\"primary\">\r\n                            <!--<button class=\"card-cta\" type=\"submit\" name=\"add\" disabled=\"\">-->\r\n                            <button class=\"card-cta\" type=\"submit\" name=\"add\">\r\n                            Add to cart\r\n                            </button>\r\n                         </hh-button-wrapper>\r\n                      </div>\r\n                      <!-- cart atc -->\r\n                      <div class=\"hidden\">\r\n                         <!--<button class=\"card-cta card-cta--cart\" type=\"submit\" name=\"add\" disabled=\"\">-->\r\n                         <button class=\"card-cta card-cta--cart\" type=\"submit\" name=\"add\">\r\n                            <span class=\"visually-hidden\">\r\n                            Add to cart\r\n                            </span>\r\n                            <svg xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-plus\" fill=\"none\" viewBox=\"0 0 10 11\">\r\n                               <path class=\"vertical\" d=\"M5 0.399902V10.3999\" stroke=\"currentColor\"></path>\r\n                               <path d=\"M0 5.3999L10 5.3999\" stroke=\"currentColor\"></path>\r\n                            </svg>\r\n                         </button>\r\n                      </div>\r\n                   </div>\r\n                   <input type=\"hidden\" name=\"product-id\" value=\"6841398624340\">\r\n                </form>\r\n             </hh-product-form>\r\n          </hh-product-card>\r\n       </li>\r\n              <li class=\"product-grid__item\" style=\"--order: 1\">\r\n          <hh-product-card id=\"product-card-6841398722644\" class=\"product-card\">\r\n             <hh-product-form class=\"card\" show-mini-cart=\"\">\r\n                <form method=\"post\" action=\"/cart/add\" id=\"product-card-form6841398722644template--21314528837912__product-grid\" accept-charset=\"UTF-8\" class=\"form\" enctype=\"multipart/form-data\" novalidate=\"novalidate\" data-type=\"add-to-cart-form\">\r\n                   <input type=\"hidden\" name=\"form_type\" value=\"product\"><input type=\"hidden\" name=\"utf8\" value=\"✓\">\r\n                   <input type=\"hidden\" name=\"quantity\" value=\"1\">\r\n                   <input type=\"hidden\" name=\"id\" value=\"40111247917140\">\r\n                   <div class=\"card__image-container\">\r\n                      <a class=\"skip-to-content-link visually-hidden\" href=\"#ProductCardWishlist-template--21314528837912__product-grid-6841398722644\">\r\n                      Skip to product information\r\n                      </a>\r\n                      <!-- media carousel -->\r\n                                                                                                              <a href=\"https://www.assouline.com/products/james-bond-destinations\" aria-label=\"James Bond Destinations\" id=\"product-6841398722644\" data-page=\"1\" data-product-card-link=\"\">\r\n                         <hh-image-carousel class=\"product-card-media product-card-media--6841398722644\" role=\"region\" arrows=\"\" pagination=\"\" slide-count=\"3\" location=\"product-card\">\r\n                            <div slot=\"item\" class=\"slide\" role=\"group\" tabindex=\"0\" slide-index=\"0\" aria-roledescription=\"Slide\" aria-label=\"1 of 8\">\r\n                               <adaptive-image class=\"\" data-image=\"https://cdn.shopify.com/s/files/1/2131/2399/files/james-bond-destinations-assouline-1.jpg?v=1707852528\" data-mobile-image=\"IiI=\" data-aspect-ratio=\"0.8\" data-mobile-aspect-ratio=\"\" data-alt=\"Patek Philippe: The Impossible Collection\" data-loading=\"\" data-sizes=\"\" data-object-fit=\"\" style=\"--hh-object-fit: cover; --hh-aspect-ratio: 0.8; --hh-mobile-aspect-ratio: 0.8;\">\r\n                               </adaptive-image>\r\n                            </div>\r\n                                                        <div slot=\"item\" class=\"slide\" role=\"group\" tabindex=\"0\" slide-index=\"0\" aria-roledescription=\"Slide\" aria-label=\"1 of 8\">\r\n                               <adaptive-image class=\"\" data-image=\"https://cdn.shopify.com/s/files/1/2131/2399/files/james-bond-destinations-assouline-2.jpg?v=1707852529\" data-mobile-image=\"IiI=\" data-aspect-ratio=\"0.8\" data-mobile-aspect-ratio=\"\" data-alt=\"Patek Philippe: The Impossible Collection\" data-loading=\"\" data-sizes=\"\" data-object-fit=\"\" style=\"--hh-object-fit: cover; --hh-aspect-ratio: 0.8; --hh-mobile-aspect-ratio: 0.8;\">\r\n                               </adaptive-image>\r\n                            </div>\r\n                                                        <div slot=\"item\" class=\"slide\" role=\"group\" tabindex=\"0\" slide-index=\"0\" aria-roledescription=\"Slide\" aria-label=\"1 of 8\">\r\n                               <adaptive-image class=\"\" data-image=\"https://cdn.shopify.com/s/files/1/2131/2399/files/james-bond-destinations-assouline-3.jpg?v=1707852531\" data-mobile-image=\"IiI=\" data-aspect-ratio=\"0.8\" data-mobile-aspect-ratio=\"\" data-alt=\"Patek Philippe: The Impossible Collection\" data-loading=\"\" data-sizes=\"\" data-object-fit=\"\" style=\"--hh-object-fit: cover; --hh-aspect-ratio: 0.8; --hh-mobile-aspect-ratio: 0.8;\">\r\n                               </adaptive-image>\r\n                            </div>\r\n                                                     </hh-image-carousel>\r\n                      </a>\r\n                      <!-- wishlist icon -->\r\n                      <hh-wishlist-button id=\"ProductCardWishlist-template--21314528837912__product-grid-6841398722644\" class=\"card__wishlist\" product-id=\"6841398722644\" product-url=\"https://www.assouline.com/products/james-bond-destinations\" variant-id=\"40111247917140\"></hh-wishlist-button>\r\n                      <div class=\"badge-wrapper\">\r\n                                                                                                                            <div class=\"badge-item caption\">\r\n                                        <div>Best Seller</div>\r\n                                    </div>\r\n                                                                                                                                <div class=\"badge-item caption\">\r\n                                        <div>New Arrival</div>\r\n                                    </div>\r\n                                                                                                                                                                                                            </div>\r\n                   </div>\r\n                   <div class=\"card__info-container\">\r\n                      <div class=\"card__text-container\">\r\n                         <!-- collection -->\r\n                         <!--<span class=\"card__collection caption\">-->\r\n                         <!--The Ultimate Collection-->\r\n                         <!--</span>-->\r\n                         <!-- title -->\r\n                         <a href=\"https://www.assouline.com/products/james-bond-destinations\" class=\"card__title h6 js-product-card-title\">James Bond Destinations</a>\r\n                         <!-- price -->\r\n                         <dl class=\"price body\">\r\n                            <div>\r\n                               <dt class=\"visually-hidden\">Regular price</dt>\r\n                               <dd>\r\n                                  $120.00\r\n                               </dd>\r\n                            </div>\r\n                         </dl>\r\n                      </div>\r\n                      <div class=\"card__cta-container hidden--sm \">\r\n                         <!-- atc -->\r\n                         <hh-button-wrapper theme=\"primary\">\r\n                            <!--<button class=\"card-cta\" type=\"submit\" name=\"add\" disabled=\"\">-->\r\n                            <button class=\"card-cta\" type=\"submit\" name=\"add\">\r\n                            Add to cart\r\n                            </button>\r\n                         </hh-button-wrapper>\r\n                      </div>\r\n                      <!-- cart atc -->\r\n                      <div class=\"hidden\">\r\n                         <!--<button class=\"card-cta card-cta--cart\" type=\"submit\" name=\"add\" disabled=\"\">-->\r\n                         <button class=\"card-cta card-cta--cart\" type=\"submit\" name=\"add\">\r\n                            <span class=\"visually-hidden\">\r\n                            Add to cart\r\n                            </span>\r\n                            <svg xmlns=\"http://www.w3.org/2000/svg\" aria-hidden=\"true\" focusable=\"false\" role=\"presentation\" class=\"icon icon-plus\" fill=\"none\" viewBox=\"0 0 10 11\">\r\n                               <path class=\"vertical\" d=\"M5 0.399902V10.3999\" stroke=\"currentColor\"></path>\r\n                               <path d=\"M0 5.3999L10 5.3999\" stroke=\"currentColor\"></path>\r\n                            </svg>\r\n                         </button>\r\n                      </div>\r\n                   </div>\r\n                   <input type=\"hidden\" name=\"product-id\" value=\"6841398722644\">\r\n                </form>\r\n             </hh-product-form>\r\n          </hh-product-card>\r\n       </li>\r\n           </ul>\r\n</div>"
    }
}

Without Parameterless Attribution

JSON Response Mode

recommendations: {
  "productpage-nosto-1": {
      "result_id": "productpage-nosto-2",
      "products": [
          {
              "name": "Ophelia Wired Body Black",
              "description": "An utterly glamorous piece if we’ve ever seen one, the Ophelia wired body offers a beautiful display of conceal-and-reveal elements that are guaranteed to keep things interesting. This striking number is distinguished by intricate embroidery that catches the eye with its delicate sheen, bringing a note of pure opulence to your top-drawer edit, while the strategically placed wiring helps create a beautiful shape.",
              "url": "https://www.bluebella.com/products/ophelia-wired-body-black",
              "categories": [
                  "38C",
                  "38D"
              ],
              ....
      ],
      "result_type": "REAL",
      "title": "You May Also like PDP BS",
      "div_id": "productpage-nosto-2",
      "source_product_ids": []
  }
}

HTML Response Mode

recommendations: {
  "productpage-nosto-2": "<!--\r\n\r\nNosto Solutions Oy\r\n\r\nUser will find comments along the document which can be helpful\r\nto tweak it and make it bespoke to different eCommerces' look&feel.\r\n\r\n\r\n-->\r\n<div class=\"nosto-block\"></div>"
}

This section is only applicable when using HTML response mode in Session API calls. JSON response handling remains the same in both cases.

When handling HTML responses from Session API calls, it's recommended to use the below approach while extracting html content from the response, to support both cases discussed above.

nostojs(api => 
    api.defaultSession()
    .setResponseMode("HTML").viewProductSku("7715036430550", "43072643629270")
    .setPlacements(api.placements.getPlacements()).load({})
    .then(response => { 
       const htmlContent = response.recommendations["productpage-nosto-2"]?.html || response.recommendations["productpage-nosto-2"]
       if (htmlContent) {
         //render the response in the appropriate slot on page. 
       }
    }))

In the above example, `htmlContent` gets the value from the html property within the placement object (productpage-nosto-2), if available (when Parameterless Attribution is enabled).

Gets the HTML content directly from the placement object (productpage-nosto-2 ) otherwise (when Parameterless Attribution is disabled).

Last updated