Run Custom Code on ONLY one CMS page

You could check the URL and then run code when it matches some value, like your collection page.

var url = window.location.href;

if(url.indexOf("/collection/testitem") > -1) {

alert("This is the test item");

}
1 Like