Welcome to WebmasterWorld Guest from

Forum Moderators: Robert Charlton & goodroi

Message Too Old, No Replies

Outbound link - onclick - redirect - track - send to page. It's OK?

2:53 pm on Jun 15, 2014 (gmt 0)

New User

joined:June 15, 2014
votes: 0

I want to store clicks from outbound links into database.
And I need to have normal links in href parametres, like href="http://www.example.com".
The way I am considering is to do it by changing URL with JS when user click on link.
"onclick" -> link is changed from "http://www.example.com" to "example.net/redirect/product-xyz/" -> data is stored into database -> user is redirected to "http://www.example.com"
But, It's "kosher" for google? Could it be penalised?

[edited by: brotherhood_of_LAN at 3:31 pm (utc) on Jun 15, 2014]
[edit reason] generalised link [/edit]

6:41 pm on June 15, 2014 (gmt 0)

Senior Member from GB 

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month

joined:Apr 30, 2008
votes: 191

I think that as long as you are redirecting to the exactly the same URL to which you are linking in href you should be fine.

In fact this is very similar to how Google Analytics Outbound links tracking works [support.google.com...]

What I would do however is make sure that the target URL is passed on as a parameter to the redirect script. This would ensure that you do not have the same URL redirecting to different targets (which would happen if you perform redirect based on, lets say, referrer).
10:20 pm on June 15, 2014 (gmt 0)

New User

joined:June 15, 2014
posts: 2
votes: 0

Just for clarify, admin changed my original sample link "mycatalogue dot com/redirect/product-xyz/" to "example dot net/redirect/product-xyz/" It could seem like one site..
1:02 am on June 16, 2014 (gmt 0)

Administrator from US 

WebmasterWorld Administrator not2easy is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Dec 27, 2006
votes: 265

The reason it was replaced with example.com and example.net was to ensure that anyone can see that it is redirecting to a different domain, while still following the forum TOS to always use "example.com" in place of posting actual domains here.