Hi
I've just opened a Google Adsense account and now have the code to copy and paste "under my header" so that Adsense can verify my website.
I've gone into Modules/HTML Content and selected Code View.
The code copied and pasted is:
<script data-ad-client="ca-pub-5069328492041911" async src="https://pagead2.googlesyndication.com/p ... "></script>
BUT, when I save it and go back into it, Opencart has automatically changed the code to this:
<script data-ad-client="ca-pub-5069328492041911" async="" src="https://pagead2.googlesyndication.com/p ... ygoogle.js" data-checked-head="true"></script>
(adding the data-checked-head="true" part)
So of course Adsense doesnt recognise the code and wont work.
Can anyone help to resolve this please, in simple terms as I have very little IT experience?
Many thanks in advance.
You can't add javascript or php with html module.
Just add the code with an ocmod modificator, before the body closing tag in the footer template.
Just add the code with an ocmod modificator, before the body closing tag in the footer template.
Suppliers Module - XML, CSV, XLS Product Feed Import and Update
Rich Snippets | Facebook Open Graph Meta Tags | WebP Images
Hi agentjr,
First you must download Ads.txt from your Google Adsense account, then upload into your domain website.
Then you must add your Google Adsense script
<script data-ad-client="ca-pub-5069328492041911" async src="https://pagead2.googlesyndication.com/p ... "></script>
on your own website at your cpanel ------> public_html>catalog>view>theme>(default or what ever you use themes)>template>common>header.twig .....you must add your Adsense script between <head>....</head>.
After that you must wait for 24 hours to let Google Adsense learning your website structure for the best ads positions, next morning you Google Adsense will be active on your website.
Trust me, I already have same problem as you and resolved. I hope you success to modify your Opencart (DO NOT FORGET TO BACKUP YOUR OPENCART FIRST, BEFORE MAKE ANY MODIFICATIONS).
Kindly regards,
melvin16
First you must download Ads.txt from your Google Adsense account, then upload into your domain website.
Then you must add your Google Adsense script
<script data-ad-client="ca-pub-5069328492041911" async src="https://pagead2.googlesyndication.com/p ... "></script>
on your own website at your cpanel ------> public_html>catalog>view>theme>(default or what ever you use themes)>template>common>header.twig .....you must add your Adsense script between <head>....</head>.
After that you must wait for 24 hours to let Google Adsense learning your website structure for the best ads positions, next morning you Google Adsense will be active on your website.
Trust me, I already have same problem as you and resolved. I hope you success to modify your Opencart (DO NOT FORGET TO BACKUP YOUR OPENCART FIRST, BEFORE MAKE ANY MODIFICATIONS).
Kindly regards,
melvin16
Give us the URL so we can see what you've done ...
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Any updates? I'm wanting to add this to some out of stock individual products. It won't even allow it to be inserted via MySQL WorkBench.
I was looking around the forum but there is no clear answer so here is the step-by-step guide on how to input google Adsense in Opencart. https://www.youtube.com/watch?v=oFkobq6jo7U
Who is online
Users browsing this forum: No registered users and 220 guests