CMS Development

JGutiérrezGil
Membre

Google Adsense

Résolue

Hi, how can I edit every html page of my website to insert the adsense code? 

I only found how to add a html header in the general settings of my website, but it is not enough for Google (it seems)

 

Thanks in advance!!

0 Votes
1 Solution acceptée
Elbeon
Solution
Contributeur | Partenaire solutions Diamond
Contributeur | Partenaire solutions Diamond

Google Adsense

Résolue

@JGutiérrezGil I have a free HubSpot account and I'm able to do it here:

  • For the website pages, click on each website page, go to Settings > Advanced and there you will be able to place the Adsense code in the head HTML
  • For the blog pages, you only need to do it once by going to HubSpot Settings > Tools > Website > Blog > Templates
  • For landing pages I haven't found this option yet


Hope this helps!

Voir la solution dans l'envoi d'origine

0 Votes
11 Réponses
JGutiérrezGil
Membre

Google Adsense

Résolue

I placed the Adsense code in the meta description of each page. And it seemed that it worked, because Google said to me that they could verify my website (and it failed, but it was for the content).

0 Votes
matt_scott
Contributeur de premier rang | Partenaire solutions Platinum
Contributeur de premier rang | Partenaire solutions Platinum

Google Adsense

Résolue

Is this what you tried?
Settings - > Website -> Pages -> Templates Tab
Usually you just put the code in the head HTML section, hit save and then the code will be on every page of your site

You may need to make sure the HTML isn't being overridden with any domain specific settings (choose your domain from the dropdown at the top to check)

Matthew Scott
Head of Development | Hubspot Solutions Architect

B2B marketing agency: Specialist B2B content marketing and demand generation for SaaS vendors and HubSpot Users | Deeply Digital | HubSpot Partner since 2010


01926 334003

deeplydigital.co.uk

3 Morton Street, Leamington Spa, CV32 5SY, UK
0 Votes
JGutiérrezGil
Membre

Google Adsense

Résolue

Thanks Matt.

 

I don't find the section you refer to. I still use a free HubSpot account, I think that is the reason, isn't it?

If so, is there any other way to do it in my current account?

 

Thanks!

0 Votes
Elbeon
Solution
Contributeur | Partenaire solutions Diamond
Contributeur | Partenaire solutions Diamond

Google Adsense

Résolue

@JGutiérrezGil I have a free HubSpot account and I'm able to do it here:

  • For the website pages, click on each website page, go to Settings > Advanced and there you will be able to place the Adsense code in the head HTML
  • For the blog pages, you only need to do it once by going to HubSpot Settings > Tools > Website > Blog > Templates
  • For landing pages I haven't found this option yet


Hope this helps!

0 Votes
PKumar178
Membre

Google Adsense

Résolue

Hi, can you please elaborate and explain in detail, as I tried to find and add code here but adsense is unable to verify the site?

0 Votes
Jaycee_Lewis
Gestionnaire de communauté
Gestionnaire de communauté

Google Adsense

Résolue

Awesome! Thanks @Elbeon 🙌

linkedin

Jaycee Lewis

Developer Community Manager

Community | HubSpot

0 Votes
JGutiérrezGil
Membre

Google Adsense

Résolue

Thanks Elbeon!

 

Not exactly in the head of HTML of each page (I only see this section in the main page), but it seems to work if I place the Adsense code in the meta description of each page.

 

 

0 Votes
Elbeon
Contributeur | Partenaire solutions Diamond
Contributeur | Partenaire solutions Diamond

Google Adsense

Résolue

@JGutiérrezGil I placed in the head html to get my website verified, because it said "To get your site ready to show ads, copy and paste this code between the <head></head> tags on each page of your site"

I did that for a few pages and for my blog as well and it got verified. Still struggling with finding a way to get that ads.txt file uploaded though.

 

But I wouldn't place your Adsense code in the meta description, because that description will be shown in the search results. 

0 Votes
JGutiérrezGil
Membre

Google Adsense

Résolue

I could only place the html code in the main page, and it seems it's not enough for Google. That's why I tried placing the meta Adsense code in every page...

I'll review the search results of my web site. I didn't know it.

 

0 Votes
Elbeon
Contributeur | Partenaire solutions Diamond
Contributeur | Partenaire solutions Diamond

Google Adsense

Résolue

If you have the same problem as me, it means you also need to upload the ads.txt file to your website: https://community.hubspot.com/t5/CMS-Development/Inserting-ads-txt-file-for-Google-AdSense/td-p/3636...

 

That is where I'm stuck because it doesn't seem possible for a free HubSpot account. I've done this in the past for my Wordpress website and that website got verified and has ads running on it. If you find a solution for the ads.txt file, do let me know!

0 Votes
HJannessSimon
Membre

Google Adsense

Résolue

I am having a very hard time with this too. Have you found a solution? I have the start kit and still can't seem to find where it goes. 

0 Votes