Hello, everyone with Coming! Please tell me how to make the AdSense ad change to another (for mobile devices) when entering from a mobile device, and so that the main ad, if it is not necessary to replace it, is deleted.
|
1 answer
- AdSense codes for mobile and usual in separate files.
- There is such a thing as a browser's UserAgent. Look at it, determine what the browser is, and, accordingly, download the corresponding file with AdSense code.
- It is possible, as an option, using JavaScript, to determine the extension of the screen. Based on this substitute the desired file. I understand that it is important for you that the advertisement does not climb beyond the scope of the mob. device, so this option is the most acceptable, because knowing the size of advertisements, your code should determine whether it fits in the browser or not.
|