Hello,
How can I add google adsense code (script) to cs-cart MV? As per Google guide, the script should be inserted between “< head> …< /head>” tag. I tried several things but unable to connect my cs-cart site to google adsense.
Any help is appreciated!
Thanks,
Esmael
- enable the My changes module
- create template
design/themes/YOUR_THEME/templates/addons/my_changes/hooks/index/head_scripts.post.tpl - use “data-no-defer” attribute in the script tag
Problem: Embedded Scripts Appear after All Other Page Content — CS-Cart 4.16.x documentation - clear cache and check the result
Thank you for your help. Unfortunately, this change did not help. I followed your steps and inserted the script as you suggested. I received the same error as attached.
Thanks
Please re-attach the image
Yes, this is the correct screenshot that I see when I try to load my cs-cart website in google adsense. Google adsense is not able to load the preview of my cs-cart website. This screenshot shows the error I received in adsense. I followed your steps and inserted the script as you suggested. I received the same error as in the screenshot that you saw in the previous message. I hope that clarifies the confusion.
Thanks,
Haha. Is your store-front opened?
yes the storefront is up and running.