Jump to content

Trying to add adsense javascript into skin template but not working


Guest DesignBuyers

Recommended Posts

Guest Brivtech

There's probably many ways, but a proper way is possibly debatable.

Exactly where do you want to place it?

I have a separate question - Do you really want to place adSense onto your site? Because it is keyword-sensitive, it will list your competitors, and then you run the risk of losing an order for the sake of gaining a single click bonus. To me, that doesn't seem like good business sense when applied to an e-commerce site.

Link to comment
Share on other sites

Guest DesignBuyers

No its OK to me and it doesn't show other who selling same product that i sell.

I need to place it before the product image or after product image i already place it but no result its doesn't show i don't know the template file doesn't seems to work with java script i guess or what was wrong with it .

Anyway, I would like to place it before the product image or at the end of text of product .. or know both ways so i see whats better.

Link to comment
Share on other sites

Guest fashionseazon

There's probably many ways, but a proper way is possibly debatable.

Exactly where do you want to place it?

I have a separate question - Do you really want to place adSense onto your site? Because it is keyword-sensitive, it will list your competitors, and then you run the risk of losing an order for the sake of gaining a single click bonus. To me, that doesn't seem like good business sense when applied to an e-commerce site.

Really? I was thinking of placing adsense code. Where exactly will google list competitors when a customer clicks on my site? I do not understand this.

Link to comment
Share on other sites

Guest DesignBuyers

Its not about adsense .. i need to know where i can exactly place javascript codes into the template

Link to comment
Share on other sites

  • 4 months later...

Anyone have Adsense working on their CC4 site?

I created a new Site Doc from the Admin Panel and pasted the Adsense code in using the Source Code editor, but the Ads are not showing up at all on the webpage. Neither is the Youtube-based Adsense plugin (http://www.youtube.com/my_adsense_players) except for a hyperlink that says "Watch the latest videos on YouTube.com".

I also pasted the Adsense code into the footer of global/index.tpl and that isn't working at all either. When the page loads, the browser's status bar shows it is loading content from pagead.googlesyndication.com, so it is trying to work- but it just doesn't. I checked it in IE7 and FF2.

The Adsense codes are included below if anyone is curious (I removed my unique IDs and replaced with all caps).

Youtube code:

<div id='vu_ytplayer_PLAYER-ID='><a href='http://www.youtube.com/browse'>Watch the latest videos on YouTube.com</a></div><script type='text/javascript' src='http://www.youtube.com/watch_custom_player?id=PLAYER-ID='></script>

Adsense code:

<script type="text/javascript">

<!--

google_ad_client = "pub-CLIENT-ID";

/* COMPANY NAME */

google_ad_slot = "CAMPAIGN-ID";

google_ad_width = 728;

google_ad_height = 90;

//-->

</script> <script type="text/javascript"

src="http://pagead2.googlesyndication.com/pagead/show_ads.js">

</script>

Link to comment
Share on other sites

Hmmm, it seems that I've solved my issue:

I had installed a custom HOSTS file from http://www.mvps.org/winhelp2002/hosts.htm that is used to block adware & spyware sites like DoubleClick.

I guess it was blocking Adsense ads too.

(I believe Spybot S&D also adds entries to your hosts file if you have certain options enabled in their program.)

After reverting to a default hosts file, I can see the Adsense ads now on my site. Still trying to figure out why the Youtube Adsense plugin is not showing up.

Link to comment
Share on other sites

Ok, I figured out the Youtube Adsense plugin:

The code from the youtube site uses apostrophes (') instead of quotes ("), and the source code editor in the CC Admin Panel actually turns the apostrophe sign into & #39; so that's why the code did not work.

E.g. if you paste in script type='text/javascript' and save, the editor turns it into script type=& #39;text/javascript& #39;

So you have to manually replace the apostrophes with quotes after pasting in the youtube code.

Hope this helps someone.

Link to comment
Share on other sites

  • 2 years later...
Guest marksson

I want to put google adsense at the top of every product page, is there an easy way to do this across the board?

I'm not concerned about competitors as my products aren't really products, they are a free service.

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...