Why wouldn't you just look at your server logs to figure out who came from where? Barring that, you probably don't want to put a reference to a script into an
tag. You probably want to capture the environment variable in your main script for that page. That's the only reliable time the browser is going to set referrer to a URL from somewhere else. Of course, I see that you want to track this for a static HTML file, which brings you back to server logs. I've never heard a compelling reason to use SSI over simply writing a Perl script to replace index.html with index.pl.