CH-432: Add the referrer URL context, including the js
Fixing / adding tests