Using Liquid to display different .js embeds depending on page URL

Highlighted
New Member
1 0 0

I'm trying to get a Shopify collection page to display different .js embeds on a specific part of the page, depending on the URL of the current page.

Can this be done using {% if page.url == %} if so, how would I have variants of page URLs and specific embed codes?

The page URL looks like this:

https://www.example.com/collections/technology/technology-connected-home

The embed code looks like this:

<script type="text/javascript" src="https://apps.example.com/app/js/18218989163.js"></script>
0 Likes