-1

I don't want to dilute the SEO of related sites by having variables in them, since the referral links are part of a network which is SEO savvy.

Is there a way to add the code via javascript on click or hover?

Or is this a pointless concern? To the best of my knowledge google does not like variables in URLs and considers them as separate (duplicate) pages.

Orangeman555
  • 1,179
  • 2
  • 21
  • 45

1 Answers1

1

Changing a link on hover is completely possible. A simple way to do it would be as follows (assuming you're using jQuery):

<a href="http://www.example.com/index.php" data-query="?foo=bar">link</a>

<script type="text/javascript">
    $(document).ready(function () {
        $('a').hover(function () {
            if ($(this).attr('data-query'))
                $(this).attr('href',$(this).attr('href') + $(this).attr('data-query'));
            $(this).attr('data-query','');
        });
    });
</script>
AlliterativeAlice
  • 11,841
  • 9
  • 52
  • 69