solved Google ads to Jamroom skin

Nmaster88
Nmaster88
@nmaster88
9 years ago
94 posts
Hello, i'm trying to add my google ad widget to the site and it's not working.
I tried adding the code directly to site and using the global config tab and neither of them works for me.
How you guys do? Thanks
updated by @nmaster88: 12/12/15 03:11:50PM
michael
@michael
9 years ago
7,715 posts
You probably want to alter the skins template, maybe header.tpl or footer.tpl but it really depends on where you want the ads to display.

"Using the Template Editor"
https://www.jamroom.net/the-jamroom-network/documentation/development/3183/using-the-template-editor

And since its javascript, make sure you read this:
https://www.jamroom.net/the-jamroom-network/documentation/development/3011/literal-literal
Nmaster88
Nmaster88
@nmaster88
9 years ago
94 posts
I have my code like this, isn't it supposed to work?
Sem Título.jpg
Sem Título.jpg  •  39KB

douglas
@douglas
9 years ago
2,790 posts
Nmaster88:
I have my code like this, isn't it supposed to work?

Which skin are you using?


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
Nmaster88
Nmaster88
@nmaster88
9 years ago
94 posts
douglas:
Nmaster88:
I have my code like this, isn't it supposed to work?

Which skin are you using?

I'm not using a default skin. Do you think i have something missing?
douglas
@douglas
9 years ago
2,790 posts
Are you using a cloned skin?

If so which skin did you clone?


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
Nmaster88
Nmaster88
@nmaster88
9 years ago
94 posts
No, it's not a clone skin, it's a template i'm adapting.
douglas
@douglas
9 years ago
2,790 posts
This is what is used in our skins:

            <script type="text/javascript"><!--
                google_ad_client = "##############";
                google_ad_width = 180;
                google_ad_height = 150;
                google_ad_format = "180x150_as";
                google_ad_type = "text_image";
                google_ad_channel ="";
                google_color_border = "CCCCCC";
                google_color_bg = "CCCCCC";
                google_color_link = "FF9900";
                google_color_text = "333333";
                google_color_url = "333333";
                //--></script>
            <script type="text/javascript"
                    src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
            </script>

There isn't a need for the literal tags.

Hope this helps!


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
Nmaster88
Nmaster88
@nmaster88
9 years ago
94 posts
What do i need to change there to match my google ads code? thanks
gary.moncrieff
gary.moncrieff
@garymoncrieff
9 years ago
865 posts
google_ad_client = "##############";
Nmaster88
Nmaster88
@nmaster88
9 years ago
94 posts
gary.moncrieff:
google_ad_client = "##############";

I've put: google_ad_client = "ca-pub-2460287167860304";
The problem is it still doesn't work. Don't i have to change more on the code?
It's strange, because if the ad works on my blog isn't it supposed to work here?
douglas
@douglas
9 years ago
2,790 posts
Do you have a link that we can check out?


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
Nmaster88
Nmaster88
@nmaster88
9 years ago
94 posts
douglas:
Do you have a link that we can check out?

http://dev.serveion.com/wowmusic/#

It's given me a 403 Ok response from it...
douglas
@douglas
9 years ago
2,790 posts
Is that message its giving you in your error logs?

I can see the code is there... the only thing I can think is that maybe your google id isn't correct?


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
Nmaster88
Nmaster88
@nmaster88
9 years ago
94 posts
douglas:
Is that message its giving you in your error logs?

I can see the code is there... the only thing I can think is that maybe your google id isn't correct?

You mean this: google_ad_client = "";?
In my google adsense account i have:
Publisher ID


EDIT: ID's removed.
updated by @nmaster88: 12/09/15 09:29:27AM
michael
@michael
9 years ago
7,715 posts
Take a look at the GENERATED source code and I think you'll see a few things you want to fix up.

ie:
* go here http://dev.serveion.com/wowmusic/
* (in firefox) ctrl+u to see source code

There are quite a few locations shown in red, that usually means an error.

Some of them are stuff like this:
<!--<script type="text/javascript" src="/skins/wmWowMusic/js/lib-1-9-1.js"></script><!-- lib Js -->
Which has 2 opening tags for an html comment, but only 1 closing tag. that should be fixed up.

Further down there is:
 <h1 id="logo"> <a href="index.html"> <img src="http://dev.serveion.com/wowmusic/skins/wmWowMusic/img/logo.jpg"></h1>
Which has an opening 'a href' but no closing tag. That should be fixed up.

The part your probably most interested in related to the google code is down around line 1952 ish. (screenshot)

You have a script tag open, then some html inside that open script block.

If you can get the code that google says "Use this code to show adsense" in tact out to the source code, then you'll probably fix it.
Nmaster88
Nmaster88
@nmaster88
9 years ago
94 posts
michael:
Take a look at the GENERATED source code and I think you'll see a few things you want to fix up.

ie:
* go here http://dev.serveion.com/wowmusic/
* (in firefox) ctrl+u to see source code

There are quite a few locations shown in red, that usually means an error.

Some of them are stuff like this:
<!--<script type="text/javascript" src="/skins/wmWowMusic/js/lib-1-9-1.js"></script><!-- lib Js -->
Which has 2 opening tags for an html comment, but only 1 closing tag. that should be fixed up.

Further down there is:
 <h1 id="logo"> <a href="index.html"> <img src="http://dev.serveion.com/wowmusic/skins/wmWowMusic/img/logo.jpg"></h1>
Which has an opening 'a href' but no closing tag. That should be fixed up.

The part your probably most interested in related to the google code is down around line 1952 ish. (screenshot)

You have a script tag open, then some html inside that open script block.

If you can get the code that google says "Use this code to show adsense" in tact out to the source code, then you'll probably fix it.

Thanks for the help!

But it really was related to google, they have to approve the ads to the site first, and it seems it was not approved hehe.

Tags