I am using the below script to display my advertisement. I am using onclick to display my advertisement. I am try following code:
<a href="#" onclick="doalert(this); return false;" >Click here</a>
function doalert(obj) {
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- xxxxxxxxxxxx -->
<ins class="adsbygoogle"
style="display:block"
data-ad-client="ca-pub-xxxxxxxxxxxxx"
data-ad-slot="xxxxxxxxxxxxx"
data-ad-format="auto"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
}
I want to check the page without click to advertisement are load.
Requirement- I am click the link for display advertisement. Otherwise no load advertisement.