-1

Google +1 API reference: http://code.google.com/apis/+1button/

What I want to do is use the Google+1 API on my website that contains pages with links to other websites. When a visitor clicks the +1 button next to a link they like, I want the request to come from the user's computer, not from my web server.

My concern is that Google may think the +1s are spammy or whatnot if they all come from my web server, so I want them to appear natural, coming from IPs all over the world.

Hoping that someone who REALLY understands HTTP requests and Javascript can help answer this.

Thanks in advance!

EDIT: Turns out the JSON request that's sent when the +1 button is clicked contains a field called "container" that contains the source page URL, not the URL that's actually being +1'd. Also, when the .js files are GET to a visitor's machine, the "Referrer" is set to be the source page URL (of course).

I'm looking for a way to prevent the Referrer and the "container" field from containing the source page URL.

Kane
  • 899
  • 2
  • 15
  • 35

1 Answers1

2

A google +1 link in a web page already comes from the user's computer. The user is displaying your web page on their computer and when a Google +1 link is clicked, the user's own browser makes the Google +1 request to Google's computers. Your web site provides the code in the web page, but the user's own computer makes the Google +1 request. I don't think you need to worry about this issue as your web server is not making the actual Google +1 request.

jfriend00
  • 683,504
  • 96
  • 985
  • 979
  • But if the +1 javascript is embeded in MY page - - then won't Google know where the original request came from? – Kane Aug 01 '11 at 18:11
  • Yes, they presumably know where the request came from. Isn't that the point of a plus one button - to recommend your particular page? As long as it's real users pushing the button from various locations on the internet, everything is fine - that's how it is intended to be used. – jfriend00 Aug 01 '11 at 18:51
  • You can specify a "target URL" which can be different than the page that the Google +1 button is on. That's what I'll be doing. I'm not getting people to +1 my own pages, I'm getting them to +1 other people's URLs. – Kane Aug 01 '11 at 22:43
  • I don't know Google's rules about +1 on things on different domains, but if they're OK with that, then as long as the traffic is coming from a variety of different people's real browsers, the fact that the +1 requests are coming from your page should not be a problem - that's how it's intended to be used. What Google would object to would be your server cranking away on +1 requests without real people behind the requests. – jfriend00 Aug 01 '11 at 22:55
  • Yes, Google is ok with having +1 buttons on different domains. I did some testing and it turns out the JSON request that's sent when the +1 button is clicked contains a field called "container" that contains the source page URL, not the URL that's actually being +1'd. Also, when the .js files are GET to a visitor's machine, the "Referrer" is set to be the source page URL (of course). Therefore, I'm looking for a way to prevent the Referrer and the "container" field from containing the source page URL. – Kane Aug 02 '11 at 15:37
  • @Kane - why? It sounds like you're trying to prevent the collecting of environmental information that Google thinks is relevant. – jfriend00 Aug 02 '11 at 20:41