Putting Google AdSense code into site

Hello,

I am trying to put the AdSense code into my Bubble website; however, when I try and validate on my Google AdSense account that the code is in my website, it keeps saying it can’t find it. Which means there is a 100% chance that I am doing it wrong. Below is the process I am goign through:

  • Under settings --> SEO/metatags --> “Script/meta tags in header”
  • Pasting script code from Google AdSense into this box
  • Deploying the new version of the website
  • Checking on AdSense if Google can “see” the code on my website

Am I putting the script in the wrong place? Is there anything more/different I need to do?

Thanks for the help!

6 Likes

Are you on a paid plan? The SEO scripts work only if you are on a paid plan.

I am on the paid plan.

Hello @hofst038,

Could you solve this?

I was able to yes.

How do you resolve it? Added code in Html block?

2 Likes

Please how did you solve this?

Hey @fracs500, you need to add code to meta block, and then to use HTML elements, just take in mind that you need to be on paid plan and ads will appear in about 24-48 Hours after Google will index your website, so before that add your website to Google search console.

Hope it helps

Regards EzCode Team !

5 Likes

I added the code to the meta block, and then I created an HTML element on the main page. It took a while for it to work, I am guessing there is a minimum time it takes to go into effect.

1 Like

What is a meta block? Is it an element you get through a specific plugin?

3 Likes

Hey @mccjon,

Nope sir, it’s something native that you have in bubble

It’s a same that you have in html - meta tags

Hope it helps

Regards EzCode Team !

5 Likes

Is there specific code you need to enter into the HTML element? Is it the same code that you put into the meta block?

2 Likes

Can you show an example of the HTML?

1 Like

@hofst038 Can you answer this? Do you have auto ads on, or are you doing by unity (ad type)? How are you able to accomplish this?

I’ve copied my code into the meta block, but what about the HTML elements on the page? Is it the same code? How does Google know those HTML elements are linked to the script in the meta block?

Also, I’ve placed 2 HTML elements on the page (each are sized according to the recommended ad sizes from Google). Does Google automatically know to populate each of these HTML elements based on their sizes and orientation?

Thanks in advance!

1 Like

Hi, here’s how it works.

  1. I copied the script into Google Adsense
  2. bubble > settings > seo/meta tag
  3. I pasted the code that I copied from Google into the header field
  4. I went to the main page of my website > design page
  5. under the elements tree you will see the name of your page, click on it, the properties popup will open. scroll down until you see the page html header field and paste the google code

I went back to Google Adsense to check and it worked right away.

I hope it was useful.

Got it working:)

The metatag method didn’t work for me, so I tried the ‘Ads.txt’ method, where you create a txt file and upload it to the root directory of your Bubble app.

Check out this guide from Google. So you need to actually create a .txt file with something like Notepad.

Then you upload it to the ‘Hosting File in Root Directory’ section within Settings>SEO/Metatags

Then you should be able to verify on Google AdSense - it worked immediately for me (versus the “metatag” method, which didn’t work even after waiting for an hour)