Run Custom Code on ONLY one CMS page

Hi, I need to run some Custom Code on ONLY one of the CMS pages. Its about 8 items in my CMS. I can run Conditional Visibility but that doesnt help as it still runs… just not the code is visible… someone help please!
Like what would the code for my if-statement be to react to the title of the CMS item?

Here is my public share link: LINK
(how to access public share link)

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