Added in a page leave event for slugs.
Page enter and leave events
New generated JS