feat: Integrate DataForSEO for indexed pages tracking

- Updated CRON documentation to include DataForSEO metrics synchronization.
- Enhanced SettingsController to manage DataForSEO API credentials and settings.
- Modified SiteController to handle DataForSEO domain input.
- Updated Site model to accommodate DataForSEO data handling.
- Added methods in SiteSeoMetric model for DataForSEO data retrieval and validation.
- Implemented SiteSeoSyncService to synchronize SEO metrics from both SEMSTORM and DataForSEO.
- Enhanced dashboard templates to display indexed pages data.
- Updated settings and site creation/edit templates to include DataForSEO fields.
- Created migration for adding DataForSEO related columns in the database.
- Developed DataForSeoService to fetch indexed pages count from DataForSEO API.
This commit is contained in:
2026-02-21 11:41:17 +01:00
parent 10ddd2ac1c
commit b2aead1fbe
15 changed files with 541 additions and 219 deletions

View File

@@ -52,6 +52,7 @@
<th class="text-nowrap"><a class="link-dark text-decoration-none" href="<?= htmlspecialchars($sortLink('top20')) ?>">TOP20<?= htmlspecialchars($sortMark('top20')) ?></a></th>
<th class="text-nowrap"><a class="link-dark text-decoration-none" href="<?= htmlspecialchars($sortLink('top50')) ?>">TOP50<?= htmlspecialchars($sortMark('top50')) ?></a></th>
<th class="text-nowrap"><a class="link-dark text-decoration-none" href="<?= htmlspecialchars($sortLink('traffic')) ?>">Ruch<?= htmlspecialchars($sortMark('traffic')) ?></a></th>
<th class="text-nowrap"><a class="link-dark text-decoration-none" href="<?= htmlspecialchars($sortLink('indexed_pages')) ?>">Zaindeksowane<?= htmlspecialchars($sortMark('indexed_pages')) ?></a></th>
<th>Aktualizacja</th>
<th></th>
</tr>
@@ -59,7 +60,7 @@
<tbody>
<?php if (empty($rows)): ?>
<tr>
<td colspan="10" class="text-center text-muted py-4">Brak danych SEO.</td>
<td colspan="11" class="text-center text-muted py-4">Brak danych SEO.</td>
</tr>
<?php else: ?>
<?php foreach ($rows as $row): ?>
@@ -128,6 +129,14 @@
-
<?php endif; ?>
</td>
<td class="text-nowrap">
<?php if (!empty($row['metric_month'])): ?>
<?= (int) ($row['indexed_pages'] ?? 0) ?>
<small><?= $formatDelta($row['indexed_pages'] ?? 0, $row['prev_indexed_pages'] ?? null) ?></small>
<?php else: ?>
-
<?php endif; ?>
</td>
<td class="text-nowrap">
<?php if (!empty($row['updated_at'])): ?>
<?= htmlspecialchars(date('d.m.Y H:i', strtotime((string) $row['updated_at']))) ?>