feat(media-kit): refresh audience insights and sponsor links
This commit is contained in:
@@ -2,6 +2,8 @@ import type { Metadata } from "next";
|
|||||||
import { notFound } from "next/navigation";
|
import { notFound } from "next/navigation";
|
||||||
import { MediaKitContent } from "@/components/media-kit-content";
|
import { MediaKitContent } from "@/components/media-kit-content";
|
||||||
import type { MediaKitLocale } from "@/data/media-kit";
|
import type { MediaKitLocale } from "@/data/media-kit";
|
||||||
|
import { createPageMetadata } from "@/lib/seo";
|
||||||
|
import { getYouTubeChannelStats } from "@/lib/youtube-channel-stats";
|
||||||
|
|
||||||
type MediaKitPageProps = {
|
type MediaKitPageProps = {
|
||||||
params: Promise<{ locale: string }>;
|
params: Promise<{ locale: string }>;
|
||||||
@@ -13,25 +15,14 @@ export async function generateMetadata({
|
|||||||
const { locale } = await params;
|
const { locale } = await params;
|
||||||
const isTurkish = locale === "tr";
|
const isTurkish = locale === "tr";
|
||||||
|
|
||||||
return {
|
return createPageMetadata({
|
||||||
|
locale: isTurkish ? "tr" : "en",
|
||||||
title: isTurkish ? "Medya Kiti" : "Media Kit",
|
title: isTurkish ? "Medya Kiti" : "Media Kit",
|
||||||
description: isTurkish
|
description: isTurkish
|
||||||
? "Poyraz Avsever sponsorluk ve marka iş birlikleri medya kiti."
|
? "Poyraz Avsever sponsorluk ve marka iş birlikleri medya kiti."
|
||||||
: "Poyraz Avsever media kit for sponsorships and brand partnerships.",
|
: "Poyraz Avsever media kit for sponsorships and brand partnerships.",
|
||||||
robots: {
|
path: "/media-kit",
|
||||||
index: false,
|
});
|
||||||
follow: false,
|
|
||||||
nocache: true,
|
|
||||||
googleBot: {
|
|
||||||
index: false,
|
|
||||||
follow: false,
|
|
||||||
noimageindex: true,
|
|
||||||
},
|
|
||||||
},
|
|
||||||
alternates: {
|
|
||||||
canonical: null,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default async function MediaKitPage({ params }: MediaKitPageProps) {
|
export default async function MediaKitPage({ params }: MediaKitPageProps) {
|
||||||
@@ -41,5 +32,12 @@ export default async function MediaKitPage({ params }: MediaKitPageProps) {
|
|||||||
notFound();
|
notFound();
|
||||||
}
|
}
|
||||||
|
|
||||||
return <MediaKitContent locale={locale as MediaKitLocale} />;
|
const youtubeStats = await getYouTubeChannelStats();
|
||||||
|
|
||||||
|
return (
|
||||||
|
<MediaKitContent
|
||||||
|
locale={locale as MediaKitLocale}
|
||||||
|
youtubeStats={youtubeStats}
|
||||||
|
/>
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@ export default function robots(): MetadataRoute.Robots {
|
|||||||
{
|
{
|
||||||
userAgent: "*",
|
userAgent: "*",
|
||||||
allow: "/",
|
allow: "/",
|
||||||
disallow: ["/api/", "/_next/", "/media-kit", "/tr/media-kit", "/en/media-kit"],
|
disallow: ["/api/", "/_next/"],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
sitemap: `${SITE_URL}/sitemap.xml`,
|
sitemap: `${SITE_URL}/sitemap.xml`,
|
||||||
|
|||||||
@@ -26,6 +26,7 @@ const STATIC_ROUTES = [
|
|||||||
{ path: "/content", changeFrequency: "weekly", priority: 0.7 },
|
{ path: "/content", changeFrequency: "weekly", priority: 0.7 },
|
||||||
{ path: "/gallery", changeFrequency: "monthly", priority: 0.6 },
|
{ path: "/gallery", changeFrequency: "monthly", priority: 0.6 },
|
||||||
{ path: "/contact", changeFrequency: "yearly", priority: 0.5 },
|
{ path: "/contact", changeFrequency: "yearly", priority: 0.5 },
|
||||||
|
{ path: "/media-kit", changeFrequency: "monthly", priority: 0.6 },
|
||||||
{ path: "/links", changeFrequency: "monthly", priority: 0.4 },
|
{ path: "/links", changeFrequency: "monthly", priority: 0.4 },
|
||||||
{
|
{
|
||||||
path: "/animation-sources",
|
path: "/animation-sources",
|
||||||
|
|||||||
+452
-524
File diff suppressed because it is too large
Load Diff
+79
-64
@@ -14,28 +14,18 @@ export type MediaKitAudienceRow = {
|
|||||||
value: number;
|
value: number;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
export type MediaKitBreakdownRow = {
|
||||||
|
id: string;
|
||||||
|
label: Record<MediaKitLocale, string>;
|
||||||
|
value: number;
|
||||||
|
};
|
||||||
|
|
||||||
export const MEDIA_KIT_PERIOD = {
|
export const MEDIA_KIT_PERIOD = {
|
||||||
tr: "20 Haziran – 17 Temmuz 2026",
|
tr: "Ömür boyu",
|
||||||
en: "June 20 – July 17, 2026",
|
en: "Lifetime",
|
||||||
} satisfies Record<MediaKitLocale, string>;
|
} satisfies Record<MediaKitLocale, string>;
|
||||||
|
|
||||||
export const MEDIA_KIT_METRICS: MediaKitMetric[] = [
|
export const MEDIA_KIT_METRICS: MediaKitMetric[] = [
|
||||||
{
|
|
||||||
id: "subscribers",
|
|
||||||
label: {
|
|
||||||
tr: "YouTube abonesi",
|
|
||||||
en: "YouTube subscribers",
|
|
||||||
},
|
|
||||||
value: {
|
|
||||||
tr: "8 B+",
|
|
||||||
en: "8K+",
|
|
||||||
},
|
|
||||||
detail: {
|
|
||||||
tr: "Son 28 günde +715",
|
|
||||||
en: "+715 in the last 28 days",
|
|
||||||
},
|
|
||||||
icon: "mdi:account-multiple-outline",
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
id: "views",
|
id: "views",
|
||||||
label: {
|
label: {
|
||||||
@@ -43,12 +33,12 @@ export const MEDIA_KIT_METRICS: MediaKitMetric[] = [
|
|||||||
en: "Views",
|
en: "Views",
|
||||||
},
|
},
|
||||||
value: {
|
value: {
|
||||||
tr: "31,1 B",
|
tr: "788.422",
|
||||||
en: "31.1K",
|
en: "788,422",
|
||||||
},
|
},
|
||||||
detail: {
|
detail: {
|
||||||
tr: "Son 28 gün",
|
tr: "Ömür boyu",
|
||||||
en: "Last 28 days",
|
en: "Lifetime",
|
||||||
},
|
},
|
||||||
icon: "mdi:play-circle-outline",
|
icon: "mdi:play-circle-outline",
|
||||||
},
|
},
|
||||||
@@ -59,72 +49,97 @@ export const MEDIA_KIT_METRICS: MediaKitMetric[] = [
|
|||||||
en: "Watch time",
|
en: "Watch time",
|
||||||
},
|
},
|
||||||
value: {
|
value: {
|
||||||
tr: "2,0 B saat",
|
tr: "16,5 B saat",
|
||||||
en: "2.0K hours",
|
en: "16.5K hours",
|
||||||
},
|
},
|
||||||
detail: {
|
detail: {
|
||||||
tr: "≈ 3:52 / görüntüleme",
|
tr: "Ömür boyu",
|
||||||
en: "≈ 3:52 per view",
|
en: "Lifetime",
|
||||||
},
|
},
|
||||||
icon: "mdi:clock-outline",
|
icon: "mdi:clock-outline",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "monthly-audience",
|
id: "subscribers",
|
||||||
label: {
|
label: {
|
||||||
tr: "Aylık kitle",
|
tr: "Aboneler",
|
||||||
en: "Monthly audience",
|
en: "Subscribers",
|
||||||
},
|
},
|
||||||
value: {
|
value: {
|
||||||
tr: "15,3 B",
|
tr: "+9,3 B",
|
||||||
en: "15.3K",
|
en: "+9.3K",
|
||||||
},
|
},
|
||||||
detail: {
|
detail: {
|
||||||
tr: "Aktif izleyici",
|
tr: "Ömür boyu kazanılan",
|
||||||
en: "Active viewers",
|
en: "Gained lifetime",
|
||||||
},
|
},
|
||||||
icon: "mdi:chart-line",
|
icon: "mdi:account-multiple-outline",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "retention",
|
||||||
|
label: {
|
||||||
|
tr: "İzlemeye devam edenler",
|
||||||
|
en: "Stayed to watch",
|
||||||
|
},
|
||||||
|
value: {
|
||||||
|
tr: "%59,7",
|
||||||
|
en: "59.7%",
|
||||||
|
},
|
||||||
|
detail: {
|
||||||
|
tr: "%40,3 izlemeden geçti",
|
||||||
|
en: "40.3% swiped away",
|
||||||
|
},
|
||||||
|
icon: "mdi:eye-check-outline",
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
export const MEDIA_KIT_CONTENT_BREAKDOWN = [
|
export const MEDIA_KIT_DEVICES: MediaKitBreakdownRow[] = [
|
||||||
{
|
{
|
||||||
id: "videos",
|
id: "computer",
|
||||||
label: {
|
label: { tr: "Bilgisayar", en: "Computer" },
|
||||||
tr: "Uzun videolar",
|
value: 45.2,
|
||||||
en: "Long-form videos",
|
|
||||||
},
|
|
||||||
value: {
|
|
||||||
tr: "24,3 B",
|
|
||||||
en: "24.3K",
|
|
||||||
},
|
|
||||||
percentage: 78.4,
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "shorts",
|
id: "mobile",
|
||||||
label: {
|
label: { tr: "Cep telefonu", en: "Mobile phone" },
|
||||||
tr: "Shorts",
|
value: 38.8,
|
||||||
en: "Shorts",
|
|
||||||
},
|
|
||||||
value: {
|
|
||||||
tr: "6,7 B",
|
|
||||||
en: "6.7K",
|
|
||||||
},
|
|
||||||
percentage: 21.6,
|
|
||||||
},
|
},
|
||||||
] as const;
|
{ id: "tv", label: { tr: "TV", en: "TV" }, value: 11.2 },
|
||||||
|
{ id: "tablet", label: { tr: "Tablet", en: "Tablet" }, value: 4.7 },
|
||||||
|
];
|
||||||
|
|
||||||
|
export const MEDIA_KIT_LOCATIONS: MediaKitBreakdownRow[] = [
|
||||||
|
{ id: "turkey", label: { tr: "Türkiye", en: "Türkiye" }, value: 89.2 },
|
||||||
|
{
|
||||||
|
id: "azerbaijan",
|
||||||
|
label: { tr: "Azerbaycan", en: "Azerbaijan" },
|
||||||
|
value: 3,
|
||||||
|
},
|
||||||
|
{ id: "germany", label: { tr: "Almanya", en: "Germany" }, value: 1.1 },
|
||||||
|
{
|
||||||
|
id: "united-states",
|
||||||
|
label: { tr: "Amerika Birleşik Devletleri", en: "United States" },
|
||||||
|
value: 0.2,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: "netherlands",
|
||||||
|
label: { tr: "Hollanda", en: "Netherlands" },
|
||||||
|
value: 0.2,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
|
||||||
export const MEDIA_KIT_GENDER: MediaKitAudienceRow[] = [
|
export const MEDIA_KIT_GENDER: MediaKitAudienceRow[] = [
|
||||||
{ id: "male", label: "Erkek", value: 98 },
|
{ id: "female", label: "Kadın", value: 5.7 },
|
||||||
{ id: "female", label: "Kadın", value: 2 },
|
{ id: "male", label: "Erkek", value: 94.3 },
|
||||||
];
|
];
|
||||||
|
|
||||||
export const MEDIA_KIT_AGES: MediaKitAudienceRow[] = [
|
export const MEDIA_KIT_AGES: MediaKitAudienceRow[] = [
|
||||||
{ id: "18-24", label: "18–24", value: 21.9 },
|
{ id: "13-17", label: "13–17", value: 1.5 },
|
||||||
{ id: "25-34", label: "25–34", value: 46.1 },
|
{ id: "18-24", label: "18–24", value: 23.7 },
|
||||||
{ id: "35-44", label: "35–44", value: 20.8 },
|
{ id: "25-34", label: "25–34", value: 45.4 },
|
||||||
{ id: "45-54", label: "45–54", value: 9.8 },
|
{ id: "35-44", label: "35–44", value: 19.1 },
|
||||||
{ id: "55-64", label: "55–64", value: 1.2 },
|
{ id: "45-54", label: "45–54", value: 8.5 },
|
||||||
{ id: "65+", label: "65+", value: 0.1 },
|
{ id: "55-64", label: "55–64", value: 1.5 },
|
||||||
|
{ id: "65+", label: "65+", value: 0.3 },
|
||||||
];
|
];
|
||||||
|
|
||||||
export const MEDIA_KIT_TOPICS = [
|
export const MEDIA_KIT_TOPICS = [
|
||||||
|
|||||||
+6
-4
@@ -12,28 +12,30 @@ export const SPONSORS: Sponsor[] = [
|
|||||||
name: "Hostinger",
|
name: "Hostinger",
|
||||||
job: "Web Hosting",
|
job: "Web Hosting",
|
||||||
logo: "/sponsors/hostinger.png",
|
logo: "/sponsors/hostinger.png",
|
||||||
websiteUrl: "https://hostinger.com",
|
websiteUrl: "https://hostinger.com/poyraz",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "testsprite",
|
id: "testsprite",
|
||||||
name: "TestSprite",
|
name: "TestSprite",
|
||||||
job: "Yazılım Test Otomasyonu",
|
job: "Yazılım Test Otomasyonu",
|
||||||
logo: "/sponsors/testsprite.png",
|
logo: "/sponsors/testsprite.png",
|
||||||
websiteUrl: "https://testsprite.com",
|
websiteUrl: "https://www.testsprite.com/?via=poyraz",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "minimax",
|
id: "minimax",
|
||||||
name: "MiniMax",
|
name: "MiniMax",
|
||||||
job: "AI Video & Model Platformu",
|
job: "AI Video & Model Platformu",
|
||||||
logo: "/sponsors/minimax.png",
|
logo: "/sponsors/minimax.png",
|
||||||
websiteUrl: "https://www.minimax.io",
|
websiteUrl:
|
||||||
|
"https://platform.minimax.io/subscribe/coding-plan?code=7aH9b0Ya7c&source=link",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "higgsfield",
|
id: "higgsfield",
|
||||||
name: "Higgsfield",
|
name: "Higgsfield",
|
||||||
job: "AI Creative Suite",
|
job: "AI Creative Suite",
|
||||||
logo: "/sponsors/higgsfield.png",
|
logo: "/sponsors/higgsfield.png",
|
||||||
websiteUrl: "https://higgsfield.ai",
|
websiteUrl:
|
||||||
|
"https://higgsfield.ai/s/higgsfield-mcp-3-0-yt-poyrazavsever-lLvqMw",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: "hosting-dunyam",
|
id: "hosting-dunyam",
|
||||||
|
|||||||
@@ -0,0 +1,65 @@
|
|||||||
|
export type YouTubeChannelStats = {
|
||||||
|
subscribers: number | null;
|
||||||
|
views: number;
|
||||||
|
videos: number;
|
||||||
|
};
|
||||||
|
|
||||||
|
type YouTubeChannelsResponse = {
|
||||||
|
items?: Array<{
|
||||||
|
statistics?: {
|
||||||
|
hiddenSubscriberCount?: boolean;
|
||||||
|
subscriberCount?: string;
|
||||||
|
viewCount?: string;
|
||||||
|
videoCount?: string;
|
||||||
|
};
|
||||||
|
}>;
|
||||||
|
};
|
||||||
|
|
||||||
|
function parseCount(value: string | undefined) {
|
||||||
|
if (!value) return null;
|
||||||
|
const parsed = Number.parseInt(value, 10);
|
||||||
|
return Number.isFinite(parsed) ? parsed : null;
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function getYouTubeChannelStats(): Promise<YouTubeChannelStats | null> {
|
||||||
|
const apiKey = process.env.YOUTUBE_API_KEY?.trim();
|
||||||
|
if (!apiKey) return null;
|
||||||
|
|
||||||
|
const params = new URLSearchParams({
|
||||||
|
part: "statistics",
|
||||||
|
key: apiKey,
|
||||||
|
});
|
||||||
|
const channelId = process.env.YOUTUBE_CHANNEL_ID?.trim();
|
||||||
|
|
||||||
|
if (channelId) {
|
||||||
|
params.set("id", channelId);
|
||||||
|
} else {
|
||||||
|
params.set("forHandle", "@poyrazavsever");
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const response = await fetch(
|
||||||
|
`https://www.googleapis.com/youtube/v3/channels?${params.toString()}`,
|
||||||
|
{ next: { revalidate: 3600 } },
|
||||||
|
);
|
||||||
|
|
||||||
|
if (!response.ok) return null;
|
||||||
|
|
||||||
|
const data = (await response.json()) as YouTubeChannelsResponse;
|
||||||
|
const statistics = data.items?.[0]?.statistics;
|
||||||
|
const views = parseCount(statistics?.viewCount);
|
||||||
|
const videos = parseCount(statistics?.videoCount);
|
||||||
|
|
||||||
|
if (!statistics || views === null || videos === null) return null;
|
||||||
|
|
||||||
|
return {
|
||||||
|
subscribers: statistics.hiddenSubscriberCount
|
||||||
|
? null
|
||||||
|
: parseCount(statistics.subscriberCount),
|
||||||
|
views,
|
||||||
|
videos,
|
||||||
|
};
|
||||||
|
} catch {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user