How to insert Google Admobe code to <head> tag

Hello, I want to insert Google Admobe to my website edu3d.co

It requires to insert one peice of code into tag.

How to do that?

Thank you!

You should be able to create a custom component, then add HTML into the head tag.

1 Like

Hello, after looking for ’ + discourse’, I found this post is really helpful!!

It also explains why script in would disappear and discourse support Google Analytics.

I set the customized setting according to the following instruction https://meta.discourse.org/t/custom-javascript-in-head-disappear/144356/3 , Google Admob says it cannot detect my code now, but I found the script in page source. So I am gonna wait for 2 weeks to see what happen. Also, I am gonna add Google Analytics to my website.

When you find your script in the page source, is it’s source (src) different from when you added it yourself? If so, Google Admob may be looking for the wrong script.

If it is just a src={link} in , then this line of code is same.
If it is script, then discourse will convert it into a theme-link. This line of code is not same.
Not sure If Google Admob will accept this.

How to know if my Google Admob and Google Analytics are setting correct? I’ve done them both.

Yes, I know.

That is why I suggested that you should see if you can tell Google specifically what to look for.

1 Like

Adscene

I got this page for Adscene (Admob is for mobile)

This are the scripts in my page source code

Analytics

And I got this page for Analytics

Discourse Ad support

I add found this https://github.com/discourse/discourse-adplugin?utm_campaign=341&utm_impression=17eaa3e8-6004-4731-98ba-f2bb86d5710c&utm_medium=display&utm_referrer=https%3A%2F%2Fmeta.discourse.org%2F&utm_source=CodeFund to get this effect