Add Parameter to all Links in a Page

Simple Javascript to a parameter to all link in a page.

<script type="text/javascript">
jQuery(document).ready(function ($) {
    $(function() {
        $("a").attr('href', function(i, h) {
            return h + (h.indexOf('?') != -1 ? "&var=value" : "?var=value");
        });
    });
});
</script>

i use this to create demo site 🙂

You can add this simple JQuery script in footer.