You should be able to access the URL of the parent itch.io page via your javascript and extract the URL parameter from there. We don't have an official API to access that data yet.