Google AdSense is important for website monetization. It helps you generate a steady income by displaying relevant ads. If you need somewhere to start, the barrier is super easy with Google. We used it for a few months before Switching to Mediavine.
If you’re a Breakdance user, adding Google AdSense to your website is straightforward. Follow the steps below to start optimizing your site’s earning potential!
How to Add Google AdSense Globally in Breakdance
1) Create a Google Ad Unit
Make sure you’ve already set up your Google Adsense account.
Open your Google AdSense dashboard and go to Ads > By ad unit.
Google provides you several ways to create an ad unit. For this tutorial, let’s choose ‘Display Ads.’
Choose how you want your ads to be displayed. For now, let’s choose the horizontal view. Then, enter an ad unit name and click ‘Create.’
Google will then generate a script you can add to your website. Copy the script to your clipboard.
2) Add a New Snippet
A snippet is a piece of code used to extend the functionality of your WordPress website. There are many WordPress plugins you can use to add a code snippet. In this guide, we’ll use Code Snippets to add our Google ad script.
On your WordPress dashboard, head over to Snippets > Add New. Enter a title. Then, tap the ‘Content HTML’ tab and paste your Google ad script here.
At the bottom of the code editor, you’ll be presented with different options on where you want to insert your code snippets.
Ideally, we want to place our ads at the head section so that they appear in all pages of our website. You can then manage the ads on your individual pages on your Google Adsense account.
So, let’s tap the ‘Display in site <head> section’ option, as shown above. Click save and activate.
3) Open a Single Post
You should see a new space added at the top of your page. This is for our Google ad.
Notice that you won’t see anything displayed here. That’s because Google will need to review your site first (you’ll need to add your site to your Google AdSense account).
The ads should start displaying once your page is published and it's deemed compliant with AdSense policies.
Save your template. And you’re done!
How to Add Google AdSense on Specific Breakdance Pages
Now I'm not sure if this is recommended (as Google probably wants your script installed globally, then managed through their platform) but why not include it anyways.
1) Add a Shortcode Block
Again, open your single post template in Breakdance.
Let’s say we want our Google ad displayed on the left side of the page. Ideally, your page must have at least two columns. Click the right-most column and a ‘Div’ element.
Then, add a shortcode block under the div. This is where we’re going to paste the Google ad script.
2) Create a Google Ad Unit
On your Google Adsense dashboard, navigate to Ads > Display Ads. For this step, let’s choose the vertical view. Enter an ad unit name and click ‘Create.’
Copy the generated code to your clipboard.
3) Add a New Snippet
Back to your WordPress dashboard, click Snippets > Add New. Enter a title. Choose the ‘Content HTML’ tab and paste your Google ad script here.
At the bottom of the code editor, choose ‘Only display when inserted into a post or page.’ Save and publish your snippet. Then, copy the generated shortcode, as shown below.
4) Add the Generated Shortcode
Back to your Breakdance editor, paste the shortcode, as shown.
5) Add a Horizontal Ad
Let’s try to add a Google ad at the bottom of our featured image.
Again, you’ll need to go back to your Google Adsense dashboard. Create an ad unit and choose the horizontal view. Copy the Google ad script.
Back to your WordPress, add another snippet and paste the ad code. Follow the same settings mentioned above. Then, copy the shortcode.
On your Breakdance editor, add a ‘Div’ element below the image. Add a shortcode block.
Then, paste the generated shortcode here.
To make it easier to identify the space for the ads, I’ve changed the background color of the divs to gray.
6) Optional - Make Your Ad Sticky
A popular trick to keep your ads within the user’s view is to make them sticky. This increases the engagement rate as your visitors will likely interact with or remember the advertised product or service.
Let’s go ahead and make the ad on the right side sticky.
Click the ‘Div’ element on the right and go to Settings > Advanced. Tap ‘Animations’ then ‘Sticky.’ Choose the bottom position so that the ad remains at the bottom as the user scrolls down the page.
Here’s the final output:
Wrapping It Up
There you have it - you’ve just added Google ads on your Breakdance page!
Hopefully, you’ve found this helpful.
Want to explore more? Check out this guide on how to add global blocks in Breakdance. You’ll find this very useful if you want to add an adaptable content block to every single page of your site.