AdWords is now Google Ads. Our new name reflects the full range of advertising options we offer across Search, Display, YouTube, and more. Learn more

Optimize
4K members online now
4K members online now
Learn how to create your first experiment and get tips on creating A/B, redirect, and multivariate tests.
Guide Me
star_border
Reply

Testing new adsense unit

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

Hi guys;

I am trying to test with optimize if adding a new unit to my page in a specific place will help my revenue.

I chose an element over which i want my ad to appear, than selected "add change" -> "JavaScript" and copy-pasted my adsense code.

so the code is

<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- zo - 300x600 -->
<ins class="adsbygoogle"
style="display:inline-block;width:300px;height:600px"
data-ad-client="ca-pub-YYYYYYYYYYYY"
data-ad-slot="XXXXXXXXXX"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>

 

 

and it results with an error:

Unexpected token <

 

 

when i do that with add HTML i get error of "Please remove the SCRIPT tags.", when pressinf "fix HTML" whats left of my code is useless

<ins class="adsbygoogle" style="display:inline-block;width:300px;height:600px" data-ad-client="ca-pub-YYYYYYYY" data-ad-slot="XXXXXXXX"></ins>

 

 

Does anyone has any idea on what's the problem and how may i solve it ?Smiley Sad