The final lesson brings together the advanced features: ads, WhatsApp buttons, copy protection, Next Post, SEO tidying, and how to fix code that doesn't appear. You already installed the license code in Lesson 1.1.
In This Lesson
- 1Ads and AdSense Configuration
- 2WhatsApp button
- 3Copy protection
- 4Next Post
- 5Page speed
- 6SEO tidying
- 7Realistic SEO
- 8If it doesn't appear
Ads and AdSense Configuration
Ads are the revenue source of a news site. There are two ways: install them manually in specific sections, or fill in the unit IDs once and let the template place them automatically.
Manual ad gadget: paste the ad code or banner image in the desired section. The title {ads} hides the gadget title. AdSense Configuration fills in the ad unit IDs once, then the template places ads automatically in the right positions.
Ready-to-paste code
Ad gadget title: {ads}
<script>(function(c,u){for(var k in u)if(u[k]!=='')c[k]=u[k]})(window.AKSARA_ADS=window.AKSARA_ADS||{},{client:'ca-pub-1234567890123456',top:'',article:'1111111111',end:'2222222222',sidebar:'3333333333',sidebarEnd:'',feed:'4444444444',footer:'',maxArticle:2});</script>
Steps
- Manual: add an HTML/JavaScript gadget in Post ADS 1, 2, or 3 (or Header/Footer ADS), fill in the Title
{ads}, paste the ad code, Save. - Automatic: open AdSense Configuration (Code) → Edit, change the text between the quotes: fill
clientwith the publisher ID (ca-pub-...), then the slot ID for each position. Don't remove the<script>tag. - Positions left empty are not displayed.
What each part of the code means
| Part | Meaning |
|---|---|
client | AdSense publisher ID. |
top, article, end | Slot at the top of the article, inside the article, and at the end of the article. |
sidebar, sidebarEnd | Ad slots in the sidebar. |
feed | Slot in the homepage article list (after the 3rd and 8th cards). |
footer | Slot in the footer. |
maxArticle | Maximum number of ads inside an article (default 2, limit 4). |
Floating WhatsApp Button
This button lets readers contact you directly.
A round green button in the bottom-right corner that opens WhatsApp to your number with an initial message. When the cursor hovers, the button expands and shows a label. A greeting bubble appears once per session and can be closed. The light pulse runs only 3 times to stay light on older laptops.
Ready-to-paste code
<div hidden>{getWhatsApp} $number={081234567890} $text={Hello, I read [judul] [url]} $greeting={Hi! How can we help you?}</div>
Steps
- Add an HTML/JavaScript gadget in Footer Left, leave the Title empty.
- Change the number to your WhatsApp number, then paste the code in Content and Save.
- To turn it off without deleting, add
$status={off}after{getWhatsApp}.
What each part of the code means
| Part | Meaning |
|---|---|
$number | WhatsApp number (required). A leading 0 is automatically changed to 62. |
$text | Initial message. [judul] and [url] are replaced with the page title and address. |
$greeting, $delay | Greeting bubble text and its appearance delay in seconds. Without $greeting, the bubble doesn't show. |
$label, $color | Label text and button color (hex code). |
$position, $bottom | right or left, and the distance from the bottom in pixels (default 76). |
$show | all (all pages), home, or post. |
$status | on or off. |
Article Copy Protection
Protection blocks ordinary copying of article text and can be turned on or off at any time.
Blocks copying article text: copy, cut, right-click, image dragging, and text selection in the article body (including Next Post articles). Visitors who try see a brief notification.
Ready-to-paste code
<div hidden>{getProtect} $status={on}</div>
<div hidden>{getProtect} $status={off}</div>
Steps
- Add an HTML/JavaScript gadget in Footer Left and paste the
$status={on}code. - To turn it off, change it to
$status={off}or delete the gadget. - Sections that may still be copied (for example codes or bank account numbers): add
class="allow-copy"in HTML mode, e.g.<span class="allow-copy">ABC-123</span>.
What each part of the code means
| Part | Meaning |
|---|---|
$status | on active, off disabled. |
$scope | article (default, article body only) or all (the entire page). |
$notice | Replaces the notification text. |
Next Post: Automatic Next Article
Next Post loads the next article as the reader scrolls, so readers stay longer.
When the reader scrolls down, the next article is loaded automatically below. This feature is off until the settings gadget contains the word on. Post ADS 1 and 2 also appear in each next article, and each article counts as one view after being in the middle of the screen for about 1.2 seconds.
Ready-to-paste code
on $max={5}
on $max={5} nextbanner=hide
on $max={5} nextga=on
Steps
- Open Settings: Sidebar and Next Post → Edit → write
on $max={5}→ Save. - Additional options are written in the same gadget, separated by spaces (see the table).
- Avoid the words off, mati, nonaktif (turns off Next Post) and left, kiri, none, tanpa (changes the sidebar position), unless that is your intention.
What each part of the code means
| Part | Meaning |
|---|---|
on | Turns on Next Post. Remove this word or write off to turn it off. |
$max={5} | Number of next articles (1 to 10, default 10). |
nextbanner=hide | Hides Post ADS 1 and 2 in the next articles. Without this option, ads appear. |
nextadsense=hide | Hides only the AdSense units there; regular banners still appear. |
nextview=no | Turns off view counting for the next articles. |
nextga=on | Sends a page_view event to Google Analytics 4 for each next article. |
Page Speed
Two small settings to make page transitions feel faster.
Two small settings to make page transitions feel faster. The template already has many built-in optimizations, so this module only adds two things that aren't there yet.
Ready-to-paste code
<div hidden>{getSpeed} $status={on}</div>
<div hidden>{getSpeed} $status={on} $prefetch={on} $preconnect={off}</div>
Steps
- Add an HTML/JavaScript gadget in Footer Left, leave the Title empty.
- Paste the code in Content, then Save.
- To turn everything off, write
$status={off}or delete the gadget.
What each part of the code means
| Part | Meaning |
|---|---|
$prefetch | Article pages that the cursor hovers over (or touches on a phone) are fetched in advance, so they open faster when clicked. Maximum 8 pages per visit. Automatically skipped in Save-Data mode or on 2G connections. |
$preconnect | Sets up the connection to Google ad servers earlier. Only applies if AdSense Configuration is filled in. |
$status | on or off. |
SEO Tidying
Tidying up technical SEO details that are often missed.
Tidies up technical SEO details that are often missed: image alternative text, link attributes, and empty meta descriptions. This module does not create structured data because the template already has it.
Ready-to-paste code
<div hidden>{getSeo} $status={on} $desc={Write a short description of your blog here, 100 to 155 characters.}</div>
Steps
- Add an HTML/JavaScript gadget in Footer Left and paste the code. Replace the contents of
$descwith your homepage description. - Save. To turn off one part, write for example
$alt={off}; to turn everything off,$status={off}. - A stronger method for the homepage: also fill it in Blogger → Settings → Search preferences → Meta description.
What each part of the code means
| Part | Meaning |
|---|---|
$alt | Fills in the alt attribute on article images that don't have one, from the image caption or article title. Deliberately empty alt attributes are not changed. |
$links | Links that open in a new tab are given rel="noopener". |
$meta | If the meta description is empty or less than 50 characters, it is filled from the beginning of the article (article pages) or from $desc (homepage). og:description and twitter:description are also filled if empty. |
$desc | Homepage description. About 155 characters maximum are used. |
SEO and Indexing: Realistic Steps
This section is honest about what can and cannot be done.
No script can guarantee that an article reaches page one of Google or produces high-paying ads. What can be done is to make sure Google can easily find, understand, and evaluate your blog.
Steps
- Meta description. Blogger → Settings → Search preferences → Meta description. Fill in 100 to 155 characters about your blog. An empty homepage is a common SEO gap.
- Description per article. In the post editor, open Post settings → Search description, then write a unique summary for each article.
- Search Console. Register the blog, open the Sitemap menu, submit
sitemap.xmlandsitemap-pages.xml. For new articles, use URL Inspection → Request indexing. - Internal links. Install the Sitemap page, Related Posts, and a hero or Featured on the homepage so new articles are found quickly.
- Speed. Measure with PageSpeed Insights. Compress images before uploading and avoid too many blocks on the homepage.
- Ads. Revenue per click is determined by the Google auction and influenced by niche, language, reader country, and traffic quality. Make sure
ads.txtis installed (Blogger → Settings → Monetization → Custom ads.txt). Don't ask visitors to click ads or modify ads, as that violates AdSense policy. - Language. Mixing several languages in one blog makes it hard to recognize. Separate by label or by blog if possible.
If It Doesn't Appear, Check This Order
Follow the diagram from left to right. Stop at the step where the answer is No, then fix it.
- Gadget type and section name. Must be HTML/JavaScript in the correct section. The default ticker is still Popular Posts, so delete it first then replace it.
- Code writing. Match the example, including
{getPosts}with a capital P and the curly braces. - Label name. Match it exactly as in Blogger. Specifically for
{getHero}, a wrong label is replaced with the latest articles. - Next Post doesn't appear. The Settings: Sidebar and Next Post gadget must contain the word
on. - Sidebar shifts for no reason. That settings gadget must not contain the words left, kiri, none, or tanpa.
- Module features require an active license and the latest module.
- After saving, press Ctrl+F5 or try in an incognito window.
- Featured Posts and Ticker News only accept one gadget. An empty Content Section is not displayed.
$status={off} and make sure the button disappears.