--- title: "Loading Yotpo Reviews with AJAX" slug: "loading-yotpo-with-ajax" tags: ["Reviews"] updated: 2024-05-09T10:53:21Z published: 2024-05-09T10:53:21Z canonical: "support.yotpo.com/loading-yotpo-with-ajax" --- > ## Documentation Index > Fetch the complete documentation index at: https://support.yotpo.com/llms.txt > Use this file to discover all available pages before exploring further. # Loading Yotpo Reviews with AJAX Products Reviews ###### Supported plans Free, Starter, Pro, Premium, Enterprise ###### eCommerce Platform N/A Yotpo's on-site assets and features load asynchronously. This means that the various widgets will **only be loaded once** on the initial page load, and will be then ignored by any AJAX scripts running on the page. As such, AJAX-based elements such as endless scroll pages or custom product pages will only appear on the initial page load. In this article, you'll learn how to load Yotpo Reviews with AJAX. Please note:Due to advanced requirements, these codes should only be added by an experienced developer. #### Loading Yotpo with AJAX To properly display Yotpo on-site assets on pages that dynamically update content (without reloading the entire page), it is necessary to reinitialize Yotpo assets every time new content is loaded. To automatically update and re-initiate Yotpo assets, the Javascript below must be added to callback functions when new content is loaded. For new widgets: ```javascript yotpoWidgetsContainer.initWidgets() ``` For legacy widgets: Please note:The Yotpo JavaScript library needs to be loaded at this point ```javascript yotpo.initWidgets() ``` In addition to updating the callback functions, be sure to update the relevant widget attributes per product: For example: - Product ID - Product URL - Product Name - Product Description Upon refreshing the page content, on-site assets will be updated to reflect the correct data attributes. ## Related - [Running Yotpo with Rocket Loader (Legacy)](/running-yotpo-with-rocket-loader-rocketscript.md) - [Setting up Your Rewards Sticky Bar](/setting-up-your-rewards-sticky-bar.md) - [Adding the Reviews Widget to Shopify](/adding-the-reviews-widget-to-shopify.md)