SEO & AEO: everything from the PDF review (robots, sitemap, 404, meta/OG, JSON-LD, Swedish text, /tjanster, EXIF clean, alt texts, Admin@, Örebro) #1
@@ -222,6 +222,21 @@ const uniqueMonths = [...new Map(allMonths.map(item => [item.name, item])).value
|
|||||||
</style>
|
</style>
|
||||||
|
|
||||||
<script>
|
<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 ---
|
// --- FILTER LOGIK ---
|
||||||
// MULTI-select: flera ar + manader samtidigt. 'all' = samtligt.
|
// MULTI-select: flera ar + manader samtidigt. 'all' = samtligt.
|
||||||
let selectedYears = new Set(['all']);
|
let selectedYears = new Set(['all']);
|
||||||
@@ -358,6 +373,7 @@ const uniqueMonths = [...new Map(allMonths.map(item => [item.name, item])).value
|
|||||||
visaMeny(false);
|
visaMeny(false);
|
||||||
const url = urlForSize(size);
|
const url = urlForSize(size);
|
||||||
if (!url) { alert('Den storleken saknas for den har bilden.'); return; }
|
if (!url) { alert('Den storleken saknas for den har bilden.'); return; }
|
||||||
|
stat('download', statsItem(visibleItems[currentImageIndex]?.dataset.src || ''));
|
||||||
if (size === 'orig') {
|
if (size === 'orig') {
|
||||||
// Losenordet sparas bara for fliken, aldrig i localStorage.
|
// Losenordet sparas bara for fliken, aldrig i localStorage.
|
||||||
const sparat = sessionStorage.getItem('dlpw');
|
const sparat = sessionStorage.getItem('dlpw');
|
||||||
@@ -413,6 +429,7 @@ const uniqueMonths = [...new Map(allMonths.map(item => [item.name, item])).value
|
|||||||
visaMeny(false);
|
visaMeny(false);
|
||||||
|
|
||||||
lbImg.src = item.dataset.src || '';
|
lbImg.src = item.dataset.src || '';
|
||||||
|
stat('open', statsItem(item.dataset.src || ''));
|
||||||
|
|
||||||
if(lbDate) lbDate.innerText = item.dataset.date || '';
|
if(lbDate) lbDate.innerText = item.dataset.date || '';
|
||||||
if(lbModel) lbModel.innerText = item.dataset.model || '';
|
if(lbModel) lbModel.innerText = item.dataset.model || '';
|
||||||
|
|||||||
@@ -53,6 +53,15 @@ import WaveBackground from '../components/WaveBackground.astro';
|
|||||||
</ul>
|
</ul>
|
||||||
</section>
|
</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">
|
<section class="space-y-3">
|
||||||
<h2 class="text-2xl font-bold text-white">Photo backup app (Google)</h2>
|
<h2 class="text-2xl font-bold text-white">Photo backup app (Google)</h2>
|
||||||
<p>
|
<p>
|
||||||
|
|||||||
Reference in New Issue
Block a user