SEO & AEO: everything from the PDF review (robots, sitemap, 404, meta/OG, JSON-LD, Swedish text, /tjanster, EXIF clean, alt texts, Admin@, Örebro) #1

Merged
imagesbyolofsson merged 9 commits from seo-aeo-2026-10-27 into main 2026-10-27 23:45:32 +00:00
2 changed files with 26 additions and 0 deletions
Showing only changes of commit ce5676f552 - Show all commits
+17
View File
@@ -222,6 +222,21 @@ const uniqueMonths = [...new Map(allMonths.map(item => [item.name, item])).value
</style>
<script>
// --- ANONYM STATISTIK ---
// Räknare per dag och bild i kundportalen: ingen cookie, ingen IP, inget id.
const STATS_URL = 'https://customer.imagesbyolofsson.se/api/stats/hit';
function statsItem(src: string): string {
const file = (src.split('/').pop() || '').replace(/\.[A-Za-z0-9_-]{6,12}\.(jpe?g|webp|avif|png)$/i, '');
return ('portfolio/' + file.replace(/[^\w\-.]/g, '_')).slice(0, 150);
}
function stat(kind: 'view' | 'open' | 'download', item: string) {
try {
const body = new Blob([JSON.stringify({ kind, item })], { type: 'text/plain' });
navigator.sendBeacon?.(STATS_URL, body);
} catch { /* statistik får aldrig störa sidan */ }
}
stat('view', 'page/portfolio');
// --- FILTER LOGIK ---
// MULTI-select: flera ar + manader samtidigt. 'all' = samtligt.
let selectedYears = new Set(['all']);
@@ -358,6 +373,7 @@ const uniqueMonths = [...new Map(allMonths.map(item => [item.name, item])).value
visaMeny(false);
const url = urlForSize(size);
if (!url) { alert('Den storleken saknas for den har bilden.'); return; }
stat('download', statsItem(visibleItems[currentImageIndex]?.dataset.src || ''));
if (size === 'orig') {
// Losenordet sparas bara for fliken, aldrig i localStorage.
const sparat = sessionStorage.getItem('dlpw');
@@ -413,6 +429,7 @@ const uniqueMonths = [...new Map(allMonths.map(item => [item.name, item])).value
visaMeny(false);
lbImg.src = item.dataset.src || '';
stat('open', statsItem(item.dataset.src || ''));
if(lbDate) lbDate.innerText = item.dataset.date || '';
if(lbModel) lbModel.innerText = item.dataset.model || '';
+9
View File
@@ -53,6 +53,15 @@ import WaveBackground from '../components/WaveBackground.astro';
</ul>
</section>
<section class="space-y-3">
<h2 class="text-2xl font-bold text-white">Anonymous portfolio statistics</h2>
<p>
To see which photos people like, the portfolio counts how many times each photo is opened or downloaded, per day.
Only the count is stored, on my own server in Sweden. No cookies, no IP address, no browser details and nothing
that could identify you. This happens without consent because nothing about you is collected.
</p>
</section>
<section class="space-y-3">
<h2 class="text-2xl font-bold text-white">Photo backup app (Google)</h2>
<p>