foz1234 Posted July 26, 2017 Share Posted July 26, 2017 (edited) Hi, quick question, how / where can i enter the approval AdSense script into the <head></head> tags in cubecart foundation skin? Thanks Edited July 26, 2017 by foz1234 Quote Link to comment Share on other sites More sharing options...
foz1234 Posted July 27, 2017 Author Share Posted July 27, 2017 No one can tell me where the head tags are to put this script in? If I press source in document (index page) I don't see the head tags. So I assume I would need to edit something to put this Google script in the foundation skin folder Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 27, 2017 Share Posted July 27, 2017 (edited) In the Foundation skin /templates/ directory, using a programmer's text editor, open for editing the file main.php. The simple approach is to: Find: <script src="{$STORE_URL}/skins/{$SKIN_FOLDER}/js/vendor/jquery.js"></script> Add after: <script src="{$STORE_URL}/skins/{$SKIN_FOLDER}/js/vendor/adsense.js"></script> This assumes your script is named adsense.js, and that it is located in the skin's /js/vendor/ folder. Having edited a skin template, you may need to have CubeCart clear its cache (admin, Maintenance, Rebuild tab, Clear Cache). Edited July 27, 2017 by bsmither Quote Link to comment Share on other sites More sharing options...
foz1234 Posted July 28, 2017 Author Share Posted July 28, 2017 Hi Brian, thank you for your reply. it just says Paste between the <head> and </head> tags this is the script:- <script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script> <script> (adsbygoogle = window.adsbygoogle || []).push({ google_ad_client: "ca-pub-xxxxxxxxxxxxxx", enable_page_level_ads: true }); </script> it's to get a authorised AdSense account, i assume it can stay in there after a decision has been made if the site complies with there rules etc. would this replace your above post or should i add this in the following lines? thanks once again Brian Quote Link to comment Share on other sites More sharing options...
bsmither Posted July 28, 2017 Share Posted July 28, 2017 You can replace my suggested new line with exactly what you posted above. Quote Link to comment Share on other sites More sharing options...
foz1234 Posted July 29, 2017 Author Share Posted July 29, 2017 (edited) Thank you Brian much appreciated. added : yes that's worked now approved thanks once again Brian. Edited August 1, 2017 by foz1234 Quote Link to comment Share on other sites More sharing options...
foz1234 Posted August 11, 2017 Author Share Posted August 11, 2017 Is there any way to add the above code to header of each page within the store? Not sure if this is the problem but advert works on index page but not on products pages so I assume I need to add the code to all header tags or any advise greatly received thanks. Quote Link to comment Share on other sites More sharing options...
ayz1 Posted August 11, 2017 Share Posted August 11, 2017 (edited) If you have added the script between the <head and </head> tags in the main.php file then it should appear on every page. If not only thing I can think is that it's maybe a chaching issue. I've had a look at your website and the script is on the product pages. Can see what you mean now. Although the script is there the ad isn't showing on the product pages. Edited August 11, 2017 by ayz1 Quote Link to comment Share on other sites More sharing options...
ayz1 Posted August 11, 2017 Share Posted August 11, 2017 Do you need to add some html to the page in addition to the script in the <head></head> section? If so then it will need to go in the content.product.php file somewhere I can find it in your homepage but not your products page. Quote Link to comment Share on other sites More sharing options...
foz1234 Posted August 11, 2017 Author Share Posted August 11, 2017 (edited) Hi ayz1 ok sorted it, as you suggested a simple clean cache was all that was required. Edited August 11, 2017 by foz1234 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.