Forum Moderators: martinibuster

Message Too Old, No Replies

Proxying AdSense code

         

freitasm

9:30 pm on Mar 28, 2021 (gmt 0)

10+ Year Member Top Contributors Of The Month



Has anyone tested proxying AdSense code so it comes up from your own domain?

Note I am not talking about changing the code, or storing it in anyway. Simply proxying so instead of calling it from pagead2.googlesyndication.com/pagead/js it is called from example.com/pagead/js - but the source is still pagead2.googlesyndication.com/pagead/js and nothing is changed in transit.

JorgeV

10:20 pm on Mar 28, 2021 (gmt 0)

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



Hello,

Very bad idea.

First of all, this is forbidden, even if you are not modifying the code, this is considered altering the Adsense's code.

Secondly, you don't know how Adsense is handling the call to their js file(s). For you, a js file is a static file, but you don't know if Adsense is not generating it on the fly, and doing some processing, resulting from the call of this file. For example, Adsense might record the IP address from which the file was called, and then match it with the IP address from which the ads are requested. If you are proxying the call, then it will be the IP of your server. I don't mean they are doing this, but this is a simple example, of things Adsense might do. It's also possible the JS code is dynamically generated based, on different criteria, related to the client.

If Adsense' JS files were static and identical for all requests, Google Chrome would embed it directly, to reduce calls.

Also, this will not fool ad blockers, if this is your idea.

ps: it's possible that premium publishers, have such feature.

lammert

10:22 pm on Mar 28, 2021 (gmt 0)

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



This should not work if Google uses the correct Cross Site Scripting prevention methods. If I remember correctly Google fixed the last holes allowing XSS in AdSense in 2015.

freitasm

10:28 pm on Mar 28, 2021 (gmt 0)

10+ Year Member Top Contributors Of The Month



Thanks folks.