Go Back to Parent Doc

How to Configure Gemini Campaigns

Learn how to set up and optimize Gemini Campaigns in AI Content Writer to generate original content using Google’s Gemini API.

Table of Contents

What is a Gemini Campaign?

Gemini Campaign uses the Google Gemini API to create completely original, AI-generated articles based on your keywords.

Unlike Article or RSS Feed campaigns, which start from existing web content, Gemini campaigns:

  • Use your keywords and prompts as the primary input
  • Request fresh content directly from Google’s AI models
  • Produce unique, AI-written articles tailored to your topics

Key Features

✅ Fully Original Content: No scraping; content comes straight from Gemini ✅ Keyword-Driven: You control the topics via keywords and prompts ✅ Free/Freemium: Gemini offers a free tier with generous limits ✅ Flexible Output: Ideal for tutorials, guides, listicles, and evergreen content ✅ Multi-Language Support (depending on Gemini capabilities)

Ideal Use Cases

  • Bloggers who need regular, evergreen articles
  • Content marketers wanting topic-based content at scale
  • Small businesses creating educational or FAQ-style content
  • Niche site owners publishing long-form, SEO-focused articles
  • Agencies needing repeatable, scalable content generation workflows

How Gemini Campaigns Work

Under the hood, Gemini campaigns rely on:

  • Campaign configuration stored in the aicw_campaign post type
  • The Gemini service class (includes/Services/Gemini.php)
  • Cron routines that generate titles, content, thumbnails, and publish posts

High-Level Flow

1. KEYWORD SELECTION

Campaign chooses a keyword from your list

2. PROMPT GENERATION

Plugin builds a prompt based on campaign settings and keyword

3. GEMINI API REQUEST

Request is sent to Google Gemini API with your API key

4. CONTENT GENERATION

Gemini returns original article content (and possibly title)

5. POST CREATION & ENRICHMENT

Post is created/updated
Content filters are applied
Thumbnail is generated
Post is published according to your rules

Cron-Based Automation

Gemini campaigns participate in the same automation workflow as other campaign types:

  1. Title Generation – Schedules and prepares content tasks
  2. Content Generation – Calls Gemini API and stores the result
  3. Thumbnail Generation – Uses Pexels API for featured images
  4. Publishing – Sets post status to publishdraft, or pending based on configuration

These steps are staggered using WordPress cron hooks defined in includes/Cron.php.

Prerequisites

Before setting up a Gemini campaign, make sure the following requirements are met.

1. Google Gemini API Key

You must have a valid Gemini API key.

Basic steps (high level):

  1. Create or log into your Google Cloud account
  2. Create a project for AI/ML usage
  3. Enable Gemini / Generative Language API
  4. Generate an API key
  5. Copy the key and store it securely

Plugin Configuration:

  1. Go to WordPress Admin → AI Content Writer → Settings → API Settings
  2. Find the Google Gemini API section
  3. Paste your Gemini API key into the appropriate field
  4. Save changes
  5. If available, use any Test Connection option to verify it works

For exact UX and field names, refer to the plugin’s Settings → API Settings page.

For featured images:

  1. Create a Pexels account
  2. Generate an API key
  3. Add it under Settings → API Settings → Pexels API in the plugin

Images are optional but strongly recommended for UX and SEO.

3. Sufficient PHP Resources

Gemini calls usually return quickly, but content generation can be heavy.

Recommended minimums:

  • PHP Version: 7.4+ (8.0+ preferred)
  • Memory Limit: 128MB+ (256MB recommended)
  • Timeouts: Default WordPress HTTP timeouts are usually fine

Creating a Gemini Campaign

Step 1: Create a New Campaign

  1. Navigate to AI Content Writer → Campaigns
  2. Click Add New Campaign
  3. Enter a descriptive Title, for example:
    • “Gemini – WordPress Tutorials”
    • “Gemini – SEO Tips 2025”
    • “Gemini – Small Business Blog Content”

Step 2: Select Campaign Type: Gemini

In the Campaign Details section:

  1. Locate the Campaign Type dropdown
  2. Select Gemini
  3. This will:
    • Use keywords as the primary input
    • Hide RSS-specific fields
    • Use Gemini-specific generation logic in cron

Step 3: Choose Campaign Source (Keywords)

For Gemini campaigns, the source is typically Keywords.

  • Ensure Campaign Source is set to Keywords
  • This tells the plugin to use your keywords for prompt construction

Step 4: Enter Keywords

Use the Keywords textarea to define the topics Gemini will write about.

Format: Comma-separated list (one or more items)

Examples:

How to speed up WordPress, WordPress security best practices, Beginner guide to WordPress SEO, How to choose a WordPress theme
Small business marketing ideas, Local SEO tips for restaurants, Social media strategy for small businesses

Tips for Good Keywords:

✅ Be specific – e.g., “How to set up WooCommerce payments” ✅ Use questions – “How to secure a WordPress login page” ✅ Target long-tail phrases – “Best WordPress caching plugins for 2025” ✅ Separate content types – Group similar topics in their own campaigns

The plugin will typically pick one keyword per run, randomly or sequentially depending on the implementation. More targeted keywords usually equal better content.

Step 5: (Optional) Campaign Host

For Gemini campaigns, the Campaign Host field (if visible) is not directly used for scraping like Articles campaigns.

  • You can usually leave this blank for Gemini campaigns
  • If you see host settings, they’re typically for other campaign types

Always check the UI labels; if a field is clearly tied to Articles or RSS, you can ignore it here.

Step 6: Configure Content Filtering (Optional)

Gemini output is generally clean, but you still have full filtering control.

Block Keywords

Use Block Keywords to avoid generating or publishing content that contains certain terms.

Example:

competitor brand, political topic, adult term, banned keyword

Use cases:

  • Avoid specific competitors or brands
  • Exclude sensitive topics
  • Keep your content within your niche’s guidelines

Search & Replace (Pro)

In the Pro version, you can define search/replace rules applied to Gemini output.

Use cases:

  • Replace generic brand references with your brand
  • Standardize styling (e.g., “e-commerce” → “eCommerce”)
  • Automatically add affiliate tags to certain domains (advanced setups)

HTML Cleaner (Pro)

Gemini typically returns plain text or Markdown-like content. HTML cleaning is more useful for Article/RSS campaigns, but if your Gemini prompts cause HTML output, you can:

  • Remove or adjust certain HTML tags via selectors
  • Use this only if Gemini is instructed to output HTML

Gemini Campaign Settings in Detail

Content Insertion

You can still use the Insert Content features with Gemini campaigns.

Position

  • None – Don’t insert custom content
  • Before Content – Prepend a block before the AI-generated article
  • After Content – Append a block after the AI-generated article

Content

Supports plain text or HTML.

Example: AI Disclosure (Before Content)

<div class="ai-disclaimer">
<p><strong>Note:</strong> This article was generated with the help of AI (Google Gemini) and reviewed by our editorial team.</p>
</div>

Example: Newsletter CTA (After Content)

<div class="article-cta">
<h3>Enjoyed this article?</h3>
<p>Subscribe to our newsletter for more AI-powered tutorials and tips.</p>
<a href="/newsletter/" class="button">Join Now</a>
</div>

Publishing Options

These settings define how Gemini-generated posts are published.

Post Type

Choose where your articles should live:

  • Post – Standard blog posts (default and recommended)
  • Page – For static pages (e.g., evergreen guides)
  • Custom Post Types – If your theme/plugins define CPTs you want to use

Post Status

Common choices:

  • Draft – Manual review before publishing (recommended at first)
  • Pending Review – For editorial workflows
  • Publish – Auto-publish when content is ready

Start with Draft. Once you’re confident about the quality of Gemini output and your filters, you can switch to Publish for full automation.

Post Author

Select any WordPress user.

Good patterns:

  • Create a dedicated user such as “AI Content Writer”
  • Or assign to your own account while testing

Categories & Tags

  • Assign categories that match the campaign’s topic
  • Add tags that reflect your keywords or themes

Example:

  • Categories: WordPressTutorials
  • Tags: performancesecuritySEOGemini

Content Settings for Gemini Campaigns

Posts per Run

Controls how many posts the campaign will attempt to generate each time the relevant cron tasks run.

Recommendations:

  • Initial Testing: 1 post per run
  • Normal Use: 1–3 posts per run
  • High Volume / Mature Setup: 3–5 posts per run (watch quotas)

Remember that:

  • Each post consumes AI tokens / requests
  • Higher volume means higher API usage (and costs if you move beyond free tier)

Frequency

In the free plugin:

  • Cron scheduling is primarily hourly, with staggered steps for titles, content, thumbnails, and publishing.

With Pro (and filters):

  • You can adjust the campaign frequency (e.g., every 15 or 30 minutes, twice daily, daily, weekly) via the campaign frequency settings.

Monitoring & Logs

Viewing Logs

To troubleshoot or review Gemini campaign activity:

  1. Go to AI Content Writer → Logs
  2. Filter by date, campaign, or type
  3. Look for errors or warnings in red
  4. Click on log entries for detailed stack traces or error messages

Common Log Messages

  • API key missing/invalid: Check your API settings
  • Quota exceeded: You’ve hit the free tier limits; consider upgrading
  • Network/DNS error: Temporary issue; retry later

Best Practices for Gemini Campaigns

Designing Effective Keywords & Prompts

✅ Make keywords descriptive, not single words ✅ Use problem/solution style phrases ✅ Consider adding context in the keyword itself (e.g., “for beginners”, “in 2025”, “step-by-step”) ✅ Break different themes/topics into separate campaigns

Examples of strong Gemini keywords:

  • “Step-by-step guide to securing a WordPress login page in 2025”
  • “Beginner-friendly tutorial on optimizing WordPress performance”
  • “How small business owners can use WordPress for local SEO”
  • “Comprehensive checklist for launching a WordPress blog”

Balancing Quality and Volume

✅ Start slowly: 1 post per run ✅ Manually review early output ✅ Refine keywords based on what works best ✅ Only then increase posts per run and consider auto-publish

Editorial & Compliance Considerations

✅ Add an AI disclosure (before or after content) ✅ Have a human editor review critical content (medical, legal, financial) ✅ Check for factual accuracy, especially with time-sensitive topics ✅ Comply with Google and Gemini usage terms and policies

SEO Optimization

✅ Use categories and tags strategically ✅ Enable featured images via Pexels API ✅ Use an SEO plugin to manage meta data ✅ Add internal links to pillar content ✅ Avoid relying on AI alone—add your own insight where possible

Cost Management

✅ Track your Gemini API usage in Google Cloud console ✅ Set limits or alerts where possible ✅ Prefer fewer, higher-quality, longer-form posts over many shallow ones ✅ Use free tier for testing before scaling up

Common Issues & Troubleshooting

No Content Being Generated

Possible causes:

  1. Gemini API key is missing or invalid
  2. API call fails due to network/DNS issues
  3. Campaign is paused
  4. Keywords field is empty

What to do:

  • Double-check Settings → API Settings → Gemini
  • Look at AI Content Writer → Logs for detailed error messages
  • Ensure campaign status is set to Active
  • Confirm that keywords are provided and saved

Low-Quality or Off-Topic Content

Causes & fixes:

  • Keywords too vague → Make them more descriptive and task-oriented
  • No context in keywords → Add “for beginners”, “step-by-step guide”, etc.
  • Very broad topics → Split into more focused campaigns

Hitting API Limits

If you see quota or rate limit errors in your logs:

  • Reduce Posts per Run
  • Reduce the number of active Gemini campaigns
  • Increase the interval between runs (Pro/frequency settings)
  • Consider upgrading your Gemini plan if usage is consistently high

Thumbnails Not Appearing

Check:

  • Pexels API key is configured and valid
  • Media uploads are allowed and not blocked by permissions
  • No disk space or hosting-level restrictions

Long Response Times or Timeouts

  • Check server logs for timeout errors
  • Reduce content length in prompts (if you’re customizing them)
  • Lower Posts per Run to reduce per-cron workload
  • Talk to your host about raising timeout or memory limits

When to Use Gemini vs. Other Campaign Types

Feature / NeedGemini CampaignsArticle CampaignsRSS Feed Campaigns
Content SourceAI-generated (keywords & prompts)Existing articles/web contentRSS feeds from specified sources
OriginalityFully original, no scrapingBased on existing contentBased on external RSS content
Control Over TopicsHigh (via keywords/prompts)Medium (topic selection)Low (follows RSS feed topics)
Content Type FlexibilityHigh (tutorials, guides, etc.)Medium (usually articles)Low (limited to feed item format)
Setup ComplexityModerate (API key, prompts)Low (basic settings, no API needed)Low (URL setup for feeds)
Ideal ForBlogs, marketers, agenciesQuick content, curationAggregating external content
Free Tier AvailabilityYesNoYes

Last Updated: November 24, 2025 | Plugin Version: 2.1.0

Shopping Cart
  • Your cart is empty.
Scroll to Top