Google Adsense: Googlesyndication.com Adsense Javascript missing from page source

Last updated on March 13th, 2021

Having just spent a frustrating hour trying to trace the reason why my websites were no longer displaying Google Adsense ads, I thought I’d share in-case others have the same issue.

The issue I had was that ads weren’t displaying at all, or so I thought. The odd thing was that my revenue suggested some ads on the site must be being seen my some users.

After ages of trying different browsers, and playing with the code, I followed the Google Adsense troubleshooter, to no avail: https://support.google.com/adsense/bin/static.py?hl=en-GB&ts=2473099&page=ts.cs This said, this troubleshooter is a good step by step guide to follow to ensure you’ve checked key things.

To be sure, I viewed the source of the web pages, and I spotted something interesting… part of the Google Adsense code was missing despite it being in the uploaded code! The missing part of the code was generic bottom section of the Adsense coding for googlesyndication.com:


<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>

I then tried something very simple… a new html page with JUST the Google Adsense code in… and spotted additional code being injected into the page too!


<script language="JavaScript">
<!--

function SymError()
{
return true;
}

window.onerror = SymError;

var SymRealWinOpen = window.open;

function SymWinOpen(url, name, attributes)
{
return (new Object());
}

window.open = SymWinOpen;

//-->
</script>

<script type="text/javascript"><!--
google_ad_client = "ca-pub-7154374726774518";
/* FAMAV 468x60, Ad at top of all pages (above menu bar). Created 15/12/07 */
google_ad_slot = "1034118517";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>

<script language="JavaScript">
<!--
var SymRealOnLoad;
var SymRealOnUnload;

function SymOnUnload()
{
window.open = SymWinOpen;
if(SymRealOnUnload != null)
SymRealOnUnload();
}

function SymOnLoad()
{
if(SymRealOnLoad != null)
SymRealOnLoad();
window.open = SymRealWinOpen;
SymRealOnUnload = window.onunload;
window.onunload = SymOnUnload;
}

SymRealOnLoad = window.onload;
window.onload = SymOnLoad;

//-->
</script>

These additional functions for SymError and SymRealOnLoad etc… turn out to be Symantec (aka Norton) advert blocking software. It looks like the last install of Symantec products on my machine had taken a default setting to enable this blocking feature which was removing the googlesyndication lines from pages I visited, and adding the Sym functions.

I simply had to double click my Symantec software icon (in my case Symantec Firewall), and disable the “ad blocking” feature. Reloading the page then, the page displayed as expected!

What a way to waste an hour! Hope that saves someone else the pain.