Adsense in IFRAME

Hey folks, I created a fully AJAX-based web application, however Adsense does not seem to be able to generate relevant ads for the content delivered by AJAX.

To show relevant ads, I created an I-Frame that would display a cache file containing a hard copy of the AJAX content in html format and included an adsense.js script in it.

Here is an example:

adsenseexample.html 


<html>
<head>
<title>User Cache</title>
</head>
<body>
<div style="height:200px;">
<script type="text/javascript"><!--
google_ad_client = "ca-pub-xxxxxxxxxxxxxx";
google_ad_slot = "xxxxxxxxxxxxx";
google_ad_width = 200;
google_ad_height = 200;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
(This is where the cached content is. It not visible to the user but 
a complete duplicate of what they are viewing. It in
 plain text with no pictures for faster loading).
</head>
</body>

What loads in the iframe:

<iframe src="adsenseexample.html"> </iframe>

Does anyone know why I still do not receive relevant ads. Is this method wrong from the start?

Thank.

+3
source share
3 answers

Here are some interesting discussions in the Mail that seem to solve the problem.

Adsense in iframe?

: , , Google, , , , , TOS

+2

Hm, iframe src, , http-? .

0

Google states in its ToS that IFRAMES should not be used with Adsense.

-1
source

Source: https://habr.com/ru/post/1789877/


All Articles