Search by

yu-laravel / seo-meta-analyzer

yuriyakishin

Laravel Livewire tool that checks a page's title, description and other meta tags and suggests better ones with AI.

Package info

github.com/yuriyakishin/laravel-seo-meta-analyzer

pkg:composer/yu-laravel/seo-meta-analyzer

Statistics

Installs: 2

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.1 2026-11-19 11:17 UTC

This package is auto-updated.

Last update: 2026-11-19 11:22:50 UTC


README

License: MIT PHP Laravel Livewire Live Demo

A Livewire tool for Laravel that checks a page's title and meta description, then has an AI score them and write better versions. The visitor enters a URL. The tool reads the page, runs technical checks on the meta tags, and asks the AI how well they match the page and the searcher's intent.

SEO Meta Analyzer report

🔗 Live example: yu.net.ua/en/tools/seo-meta-analyzer

What it checks

  • Technical checks, without AI: a missing title or description, length outside the recommended range, several H1 headings, a title and description that say the same thing, and too little text on the page (a sign of a JavaScript-rendered page).
  • AI review: scores relevance to the page, match with search intent and likely click-through. It names concrete issues and recommendations.
  • New versions: three rewritten sets of title, description and H1, each from a different angle and with a copy button, shown next to the current snippet.

Requirements

Installation

composer require yu-laravel/seo-meta-analyzer

This also installs yu-laravel/web-tools-core. Both service providers are discovered automatically.

Set your OpenAI key in .env:

SEO_META_ANALYZER_OPENAI_API_KEY=sk-...

Usage

Put the component on a page whose layout includes @livewireStyles and @livewireScripts:

<livewire:seo-meta-analyzer />

Import the styles into your CSS build:

@import "../../vendor/yu-laravel/web-tools-core/resources/css/web-tools-core.css";
@import "../../vendor/yu-laravel/seo-meta-analyzer/resources/css/seo-meta-analyzer.css";

To match your site's colours and fonts, override the --wt-* variables (see Web Tools Core).

Configuration

Env variable Default Description
SEO_META_ANALYZER_ENABLED true Turn the tool off without uninstalling it.
SEO_META_ANALYZER_PROVIDER openai A key from providers in the config.
SEO_META_ANALYZER_OPENAI_API_KEY OpenAI API key.
SEO_META_ANALYZER_OPENAI_MODEL gpt-4o-mini Model name.
SEO_META_ANALYZER_OPENAI_ENDPOINT OpenAI chat completions Change it to use an OpenAI-compatible API.
SEO_META_ANALYZER_OPENAI_TIMEOUT 25 Seconds to wait for the AI.
SEO_META_ANALYZER_PER_HOUR 5 AI requests per visitor IP per hour. A recheck of an unchanged page comes from the cache and doesn't count.
SEO_META_ANALYZER_PAGES_PER_HOUR 30 Page loads per visitor IP per hour, cached ones included. This stops the tool from being used to flood other sites.

A result is cached for 24 hours per page content, so an unchanged page doesn't trigger a second AI request. Page fetching (timeouts, redirects, user agent) is set in Web Tools Core.

Using another AI provider

Implement Yu\SeoMetaAnalyzer\Llm\LlmProvider:

interface LlmProvider
{
    public function isConfigured(): bool;

    public function complete(string $system, string $user, array $schema): array;
}

complete() gets the prompts and a JSON schema, and must return the decoded JSON answer. Add a section for your provider under providers in config/seo-meta-analyzer.php, with class set to your class, and select it with SEO_META_ANALYZER_PROVIDER. The class receives that config section as its $config constructor argument.

Events

  • Yu\SeoMetaAnalyzer\Events\SeoMetaAnalyzerEvent fires after every finished check: successful, failed or from the cache. It carries url, locale, report (null on failure), error and fromCache.
  • Yu\SeoMetaAnalyzer\Events\MetaAnalyzerResultEvent fires only when the AI was actually asked. It carries the Report object.

Languages

The form and the AI answer come in 13 languages: cs, de, en, es, fr, it, ja, nl, pl, pt, tr, uk and zh. The language is taken from the visitor's browser, with your app locale as the fallback.

Limitations

The tool reads the HTML the server returns. On a page built entirely by JavaScript it sees little text, says so, and bases the score on the meta tags and the H1 only.

Author

Yuriy Akishin:

License

MIT. See LICENSE.