- Clerk.io Help Center
- Using Clerk.io on Other / Custom Platforms
- Using Clerk.io in Your Store
-
Working with Clerk.io
-
Using Clerk.io on Other / Custom Platforms
-
Using Clerk.io on Shopify
-
Using Clerk.io on Magento 1
-
Using Clerk.io on Magento 2
-
Using Clerk.io on WooCommerce
-
Using Clerk.io on Prestashop
-
Using Clerk.io on BigCommerce
-
Using Clerk.io on Shoporama
-
Using Clerk.io on Shopware 6
-
Using Clerk.io on DanDomain
-
Using Clerk.io on Lightspeed
-
Using Clerk.io on SmartWeb / HostedShop
-
Using Clerk.io on DynamicWeb
-
Using Clerk.io with Any Email Client
-
Using Clerk.io with Copernica
-
Using Clerk.io with Autopilot
-
Using Clerk.io with Active Campaign
-
Using Clerk.io with Marketing Platform
-
Using Clerk.io with MailChimp
-
Using Clerk.io with MailUp
-
Using Clerk.io with Apsis
-
Using Clerk.io with UbiVox
-
Using Clerk.io with CleverReach
-
Using Clerk.io with Google Ads
-
Using Clerk.io with Act-On
-
Audience Integrations with Facebook
-
Using Clerk.io with DotDigital
-
Using Clerk.io with Klaviyo
Showing Recommendations in an Ajax Popup
Render Clerk.io Content after initial page load.
When a page is loaded, the Clerk.js library automatically runs a function to render all Clerk.io Content on that page.
This function can also be run after the initial page load, to show products in an Ajax Popup.
-
Since the function takes any class or ID as argument, start by replacing your Ajax Popup recommendations class clerk with another class. This is to prevent all Clerk.io content to be rendered again.
An example:<span
class="clerk-recommendations"
data-template="@powerstep-recommendations"
data-products="[123]">
</span>
2. In your Ajax Popup code, simply run the function on this class as a part of your
existing Ajax script, or in its own script:
Clerk.js Function
<script type="text/javascript">
Clerk('content','.clerk-recommendations');
</script>
Now you can show recommendations in your Ajax Popup, after the initial page load!