=== Mandat AEO Assistant === Contributors: mandatleo Tags: ai, seo, content generation, gemini, aeo Requires at least: 6.0 Tested up to: 6.8 Requires PHP: 7.4 Stable tag: 3.2.7 License: GPL-2.0-or-later License URI: https://www.gnu.org/licenses/gpl-2.0.html AI-powered content generation plugin using Google Gemini API to create long-form SEO articles with images, internal linking, and Polylang integration. == Description == Mandat AEO Assistant is a powerful WordPress plugin that leverages Google's Gemini AI and Vertex AI to automatically generate high-quality, SEO-optimized blog posts. The plugin provides a comprehensive Article Studio interface where you can: * Generate long-form articles (1600+ words) using Google Gemini 2.0/2.5 models * Create AI-generated featured and in-content images using Imagen 4.0 * Automatically insert internal links from your existing content * Find and embed relevant YouTube videos * Generate SEO metadata (meta descriptions, focus keywords, tags) * Support for both Vietnamese and English content * Automatic translation with Polylang integration * Real-time cost tracking for all API usage The plugin is designed for content creators, bloggers, and digital marketers who want to streamline their content production workflow while maintaining high quality and SEO best practices. == External Services == This plugin relies on several external Google Cloud APIs to function. Below is detailed information about each service, the data transmitted, and links to their terms of service and privacy policies. = 1. Google Cloud Vertex AI (Gemini API) = **What it does:** Generates article text content using Google's Gemini language models (gemini-2.0-flash, gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite). **When it's used:** Every time you click "Create Article" in the Article Studio, or when using the automatic translation feature. **Data sent:** - Article prompts (topic, keywords, target audience, language preferences) - Source text for translation (when using Polylang translation feature) - User-configured generation parameters (word count, style, etc.) **Data received:** - Generated article HTML content - SEO metadata suggestions - Token usage statistics for cost calculation **API Endpoint:** `https://us-central1-aiplatform.googleapis.com/v1/projects/{project_id}/locations/us-central1/publishers/google/models/` **Service Provider:** Google LLC **Terms of Service:** https://cloud.google.com/terms **Privacy Policy:** https://policies.google.com/privacy = 2. Google Cloud Vertex AI (Imagen API) = **What it does:** Generates AI images for featured images and in-content illustrations using Google's Imagen 4.0 model. **When it's used:** When you click "Generate Images" after article creation. **Data sent:** - Text prompts describing the desired image - Image generation parameters (aspect ratio, style preferences) - Google Cloud authentication credentials (Service Account) **Data received:** - Base64-encoded PNG image data - No personal data is collected or transmitted **API Endpoint:** `https://us-central1-aiplatform.googleapis.com/v1/projects/{project_id}/locations/us-central1/publishers/google/models/imagen-4.0-generate-001:predict` **Service Provider:** Google LLC **Terms of Service:** https://cloud.google.com/terms **Privacy Policy:** https://policies.google.com/privacy = 3. Google OAuth2 API = **What it does:** Authenticates your Google Cloud Service Account to access Vertex AI APIs securely. **When it's used:** Automatically during every API call to Gemini or Imagen (token is cached for 55 minutes). **Data sent:** - JWT (JSON Web Token) signed with your Service Account private key - Service Account email address - Timestamp and expiration data **Data received:** - Temporary access token (valid for 1 hour) - Token expiration time **API Endpoint:** `https://oauth2.googleapis.com/token` **Service Provider:** Google LLC **Terms of Service:** https://developers.google.com/terms **Privacy Policy:** https://policies.google.com/privacy = 4. YouTube Data API v3 = **What it does:** Searches for and retrieves YouTube video information to embed relevant videos in articles. **When it's used:** Only when "Generate YouTube Video" option is enabled during article creation. **Data sent:** - Search query (text keywords) - Language and region preferences (if Vietnamese content is selected) - Your YouTube Data API key **Data received:** - Video ID, title, description - Channel name - Upload date - Video thumbnail URL **API Endpoint:** `https://www.googleapis.com/youtube/v3/search` **Service Provider:** Google LLC **Terms of Service:** https://developers.google.com/youtube/terms/api-services-terms-of-service **Privacy Policy:** https://policies.google.com/privacy = 5. Google Custom Search API (Programmable Search Engine) = **What it does:** Searches the web to gather factual information and sources for article generation. **When it's used:** Automatically during article generation to provide AI with up-to-date context and sources. **Data sent:** - Search query (article topic/keywords) - Language and region preferences - Your Custom Search Engine ID and API key - Number of results requested (typically 3-10) **Data received:** - Search result titles and URLs - Page snippets (short text excerpts) - No personal user data is transmitted **API Endpoint:** `https://www.googleapis.com/customsearch/v1` **Service Provider:** Google LLC **Terms of Service:** https://developers.google.com/custom-search/v1/overview **Privacy Policy:** https://policies.google.com/privacy = Important Privacy Notes = - **No user personal data** (names, emails, IP addresses) is ever sent to these external services - All API keys and credentials are stored securely in your WordPress database - Generated content is saved to your WordPress site only; Google does not retain your article content beyond API processing - Cost tracking data (token usage) is stored locally in your WordPress database - You have full control over what content is generated and can review everything before publishing = GDPR Compliance = This plugin does not collect, store, or transmit any personal data from your website visitors. All external API calls are initiated by authenticated WordPress administrators only. == Installation == 1. Upload the plugin files to the `/wp-content/plugins/mandat-aeo-assistant` directory, or install the plugin through the WordPress plugins screen directly. 2. Activate the plugin through the 'Plugins' screen in WordPress. 3. Go to **Settings > Mandat AEO Assistant** to configure your Google Cloud API credentials: - Google Cloud Service Account JSON (for Vertex AI) - Google Cloud Project ID - YouTube Data API Key (optional) - Custom Search API Key and Engine ID (optional) 4. Navigate to **Mandat AEO Assistant > Article Studio** to start generating content. == Frequently Asked Questions == = Do I need a Google Cloud account? = Yes, you need a Google Cloud account with billing enabled. The plugin uses Vertex AI (Gemini and Imagen) which are paid APIs, though Google offers free credits for new users. = How much does it cost to generate an article? = Costs vary based on article length and features used: - Gemini API: ~$0.01-0.05 per article - Imagen API: ~$0.08 for 2 images - Search API: ~$0.01 per search - YouTube API: Free (uses quota units) The plugin includes a built-in Cost Report to track all expenses. = Can I use this without Polylang? = Yes! Polylang is optional. If Polylang is not installed, the plugin will still generate articles in your chosen language (English or Vietnamese). = Is the generated content unique? = Yes, all content is generated uniquely by Google Gemini AI based on your prompts and web research. However, you should always review and edit generated content before publishing. = What WordPress version do I need? = WordPress 6.0 or higher is required. Tested up to WordPress 6.8. == Screenshots == 1. Article Studio interface - Main content generation screen 2. Article preview with real-time editing 3. Image generation settings 4. Cost report dashboard 5. Settings page for API configuration == Changelog == = 3.2.7 = * Fixed: Proper use of wp_add_inline_style() instead of echoing style tags * Fixed: Removed direct style block creation in AJAX handlers * Improved: Updated code to comply with WordPress.org plugin guidelines * Updated: Comprehensive documentation of external services in readme = 3.2.5 = * Added: Polylang automatic translation support * Added: Internal link translation for multilingual sites * Improved: Cost tracking for translation operations * Fixed: Image generation error handling = 3.2.4 = * Added: Real-time content editing in preview * Added: Category selection for posts * Improved: UI/UX with better loading states * Fixed: CSS scoping issues = 3.2.3 = * Added: Cost report filtering by date range * Added: Detailed token usage breakdown * Improved: Database structure for better performance = 3.2.0 = * Initial public release * Gemini 2.0 and 2.5 model support * Imagen 4.0 image generation * YouTube video embedding * Custom Search integration == Upgrade Notice == = 3.2.7 = Important update to comply with WordPress.org guidelines. Please update immediately if you plan to submit to the plugin directory. == Credits == This plugin uses the following external services: - Google Cloud Vertex AI (Gemini and Imagen) - Google OAuth2 API - YouTube Data API v3 - Google Custom Search API All trademarks are property of their respective owners. == Support == For support, feature requests, or bug reports, please visit: https://eonsr.com/ == License == This plugin is licensed under the GPL-2.0-or-later license.