Know current page of storefront via script tags js in shopify app

Highlighted
New Member
4 0 0

Hello,
I'm developing a shopify app i which i show sliders of products via script tag apis,currently my sliders are showing on all pages of storefront.I have to include sliders on specific pages for example upsell slider on cart page and most poplar products on catalog etc.how can i get current page via jquery(js) so that i cant do something like this
if(page=='cart'){

cart_slider.show();}elseif(page=='Home'){

home_slider.show();}

0 Likes