18

At the end of my PayPal buttons theres this line:

<img alt="" border="0" src="https://www.paypalobjects.com/en_AU/i/scr/pixel.gif" width="1" height="1">

It ruins the aesthetics of my design a little. Anyone know what its purpose is and can I remove it?

MeltingDog
  • 14,310
  • 43
  • 165
  • 295
  • Most probably it's there for a reason. Try styling it using CSS instead. –  Sep 06 '12 at 05:13

2 Answers2

30

I have setup multiple paypal buttons without pixel.gif being present.

You can remove it if you want. It is there for PayPal to monitor traffic as it is stated there

PayPal uses this line of code for internal use only to monitor traffic. Use of this code is optional. You can learn more by Googling "tracking pixel".

antoniom
  • 3,143
  • 1
  • 37
  • 53
  • I don't think this is true as there won't be much information for PayPal to actually use. I believe it exists to make the PayPal page load quicker should a user decide to Pay. The image will warm the DNS and SSL. – TheNextBigThing Jun 29 '16 at 11:27
  • 2
    @TheNextBigThing Well, it is true that it speeds up loading the paypal page a little but, but on the other hand, it slows down loading of your page a little, which I consider more significant. "Not much information" is not true. The paypal servers will know your IP address. Cookies are also sent from your browser to paypal, so paypal will get to know all pages that you visit that have a paypal button, even if you don't click it. This is a data privacy issue similar to Facebook Like buttons. – Christopher K. May 24 '18 at 09:49
  • I can vouch for that line causing my old legacy site to hang indefinitely trying to complete access to that pixel graphic. I doesn't seem to be a problem with other browsers or IE9 and up, so I've screened it out with a conditional comment. It is a link for donations, so until I'm sure I don't need it at all, I may leave the conditional code. But if that article is correct, I don't need it at all, and who needs something slowing down my visitors. If they're using IE, they already have enough problems! :-) – Randy Nov 03 '20 at 20:11
  • Another issue is that if the image doesn't load, the ALT text gets rendered to the page, so you end up seeing some text that says "Paypal button". – posfan12 Apr 14 '21 at 22:12
0

This solution worked for me.

I changed this piece of code from src="https://www.paypalobjects.com/en_SI/i/scr/pixel.gif"

to

src="https://www.paypalobjects.com/en_US/i/scr/pixel.gif"

sulica
  • 111
  • 9