Disable pURL Once Viewed

Whatever page you want the disable to be triggered on, you need to add a line of Javascript. I recommend this be done on the Thank You page. Otherwise the pURL will disable and they wont get to the Thank You. The JS code looks like this:

<script>
disPurl();
</script>

You can drop it anywhere in your template. We have dropped this onto NYLC Thank You Prefix (HR) and tested with the pURL http://BoingUser.NYLCinDC.org/

Until you get to the Thank You page, all works fine. Then once there, the JS code calls the disabling function. At that point the pURL record is still in the campaign but it not accessible. If you goto the campaign edit and view the pURL records, you will see the pURL has the prefix DISABLED://

Now when someone tries to go there, it will redirect them to the standard error page for the pURL. That is http://www.nylcindc.org/Error. Right now you do not have a page being served there but that is easy to add. So traffic coming to the disabled pURLs can be presented with a generic message managed in the templates area. Lastly, if you want to enable them again, just edit the pURL and change ‘DISABLED://’ to ‘http://’