Jump to content

adsense approval script location


foz1234

Recommended Posts

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 

Link to comment
Share on other sites

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 by bsmither
Link to comment
Share on other sites

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

 

Link to comment
Share on other sites

  • 2 weeks later...

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. 

 

Link to comment
Share on other sites

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 by ayz1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...