=== Futurecode KVKK Çerez Onayı ===
Contributors: futurecodetr
Tags: kvkk, cookie consent, cookie banner, consent mode, gdpr
Requires at least: 6.5
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.1
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

KVKK cookie consent for Turkish sites: equal accept / reject buttons, script blocking, Google Consent Mode v2, TR/EN policy templates, consent log.

== Description ==

**English**

KVKK Çerez Onayı ("KVKK cookie consent") asks your visitors for cookie consent the way the Turkish Personal Data Protection Authority's cookie guide describes it, and actually holds back analytics and advertising scripts until they agree. It works on any WordPress site; WooCommerce is not needed (and works fine when it is there).

**Banner and preferences**

* Four categories: **Essential** (always on, cannot be switched off), **Analytics**, **Marketing** and **Functional**. Optional categories start switched off.
* "Accept all", "Essential only" and "Manage preferences" have exactly the same colour, size and font — no dark patterns, no pre-ticked boxes, no cookie wall. Continuing to browse is not taken as consent.
* Preferences dialog with a switch per category, descriptions and a "Show cookies" list (name, provider, duration, purpose).
* A small round re-open button in the corner, a `[fckc_cerez_tercihleri]` shortcode and a menu link (`#fckc-tercihler`) let visitors change or withdraw consent at any time. Withdrawing consent deletes the cookies of the switched-off categories.
* Consent version: when your policy changes, raise the version and everybody is asked again. A choice is remembered for 180 days by default (adjustable), so visitors are not asked on every visit.

**Look**

* Bottom bar, corner box or centre window; background, text and button colours; corner radius; your theme's font or the system font.
* Live preview in the admin (banner, preferences and mobile), with a WCAG contrast check of your colours.
* Visitor side: one small CSS and one small JavaScript file, no jQuery, no external files. Keyboard friendly (focus trap in dialogs, Escape closes, visible focus), ARIA roles and labels for screen readers, mobile friendly.

**Script blocking**

* Scripts of **Google Analytics 4 (gtag.js), Google Tag Manager, Meta Pixel, Hotjar, Yandex Metrica, Microsoft Clarity, LinkedIn Insight Tag and TikTok Pixel** are recognised automatically — whether they are enqueued by a plugin or pasted into the theme, a page builder or a header plugin — and turned into `type="text/plain"` until the visitor allows their category. Each service can be switched off or moved to another category.
* Mark any other script yourself: `<script type="text/plain" data-fckc-category="analytics">…</script>`, or add simple "category | text" rules.
* When consent is given the scripts run **without a page reload**.
* YouTube, Vimeo and Google Maps frames get a placeholder ("This content is provided by YouTube… Allow and show").
* Tracker pixels in `<noscript>` are removed (without JavaScript nobody can consent).
* Nothing is written to your theme or database: switch blocking off and the page is exactly as before.

**Google Consent Mode v2**

* Defaults `ad_storage`, `analytics_storage`, `ad_user_data` and `ad_personalization` to "denied" at the very top of the page; on consent a `gtag('consent', 'update', …)` is sent (and a `fckc_consent_update` event in the dataLayer). Returning visitors get their saved choice before any Google tag loads.
* Basic mode (recommended, default): Google tags stay blocked until consent. Advanced mode: Google tags load at once with everything denied and send cookieless pings. Or switch Consent Mode off.

**Texts and templates**

* Default texts in Turkish and English follow the page language by themselves. Texts you type are registered with **Polylang** and **WPML** string translation; policy pages link to their translation in the visitor's language.
* Ready **Turkish and English templates** for the cookie policy and the KVKK privacy notice (aydınlatma metni), written for Law No. 6698 and the Board's cookie guide. On activation the plugin offers to create them as draft pages, filled with your company details. The `[fckc_cerez_listesi]` shortcode prints the categories and the cookie table.
* **The templates are not legal advice.** Check them against your own site and ask a lawyer when in doubt.

**Consent records**

* Every choice is recorded anonymously: a random id, date, consent version, categories, action (accept / reject / custom), language and a shortened browser name ("Chrome 141 · Windows"). IP addresses are not stored by default; you can choose a salted hash or a shortened address instead.
* Admin screen with filters (date, action, version, search), accept / reject / custom ratios, bulk delete and CSV export. Records older than the retention period (365 days by default) are deleted daily.

**Works with page caches**

The banner is drawn by JavaScript and the choice is kept in a cookie, so every visitor gets the same HTML and cached pages stay valid. Choices are recorded through a REST endpoint without a nonce (a nonce in a cached page goes stale); instead the endpoint accepts only a strict format, only from your own site, and at most 10 records per visitor and 600 per site each minute.

**Coming soon (Pro):** automatic cookie scanning, advanced reports and multisite management. Nothing in this plugin is locked or limited.

**Türkçe**

KVKK Çerez Onayı, ziyaretçilerinizden çerez onayını Kişisel Verileri Koruma Kurumunun çerez rehberinde anlatıldığı gibi alır ve analitik ile reklam betiklerini onay verilene kadar gerçekten durdurur. Her WordPress sitesinde çalışır; WooCommerce gerekmez (varsa da sorunsuz çalışır).

**Bant ve tercih penceresi**

* Dört kategori: **Zorunlu** (her zaman açık, kapatılamaz), **Analitik**, **Pazarlama** ve **İşlevsel**. İsteğe bağlı kategoriler kapalı başlar.
* "Tümünü kabul et", "Yalnız zorunlu" ve "Tercihleri düzenle" düğmeleri renk, büyüklük ve punto bakımından tamamen eşittir: karanlık desen, önceden işaretli kutu ya da çerez duvarı yoktur. Siteyi gezmeye devam etmek onay sayılmaz.
* Her kategori için anahtar, açıklama ve "Çerezleri göster" listesi (ad, sağlayıcı, süre, amaç) bulunan tercih penceresi.
* Köşedeki küçük yuvarlak düğme, `[fckc_cerez_tercihleri]` kısa kodu ve menü bağlantısı (`#fckc-tercihler`) ile ziyaretçi onayını istediği an değiştirir ya da geri alır. Onay geri alınınca kapatılan kategorilerin çerezleri silinir.
* Onay sürümü: politikanız değişince sürümü artırın, herkese yeniden sorulur. Tercih varsayılan olarak 180 gün hatırlanır (ayarlanabilir); ziyaretçiye her girişte sorulmaz.

**Görünüm**

* Alt bant, köşe kutu ya da orta pencere; zemin, metin ve düğme renkleri; köşe yarıçapı; temanın ya da sistemin yazı tipi.
* Yönetimde canlı önizleme (bant, tercihler ve mobil) ve renkleriniz için WCAG kontrast denetimi.
* Ziyaretçi tarafında tek küçük CSS ve tek küçük JavaScript dosyası; jQuery ve dış dosya yok. Klavyeyle tam kullanım (pencerelerde odak tuzağı, Escape ile kapatma, görünür odak), ekran okuyucular için ARIA rolleri ve etiketleri, mobil uyum.

**Betik engelleme**

* **Google Analytics 4 (gtag.js), Google Tag Manager, Meta Pixel, Hotjar, Yandex Metrica, Microsoft Clarity, LinkedIn Insight Tag ve TikTok Pixel** betikleri, bir eklentiyle eklenmiş ya da temaya, sayfa oluşturucuya veya başlık eklentisine yapıştırılmış olsun, kendiliğinden tanınır ve kategorisine izin verilene kadar `type="text/plain"` yapılır. Her servis kapatılabilir ya da başka kategoriye alınabilir.
* Diğer betikleri kendiniz işaretleyin: `<script type="text/plain" data-fckc-category="analytics">…</script>` ya da basit "kategori | metin" kuralları ekleyin.
* Onay verilince betikler **sayfa yenilenmeden** çalışır.
* YouTube, Vimeo ve Google Haritalar çerçeveleri için yer tutucu ("Bu içerik YouTube tarafından sunuluyor… İzin ver ve göster").
* `<noscript>` içindeki izleme pikselleri kaldırılır (JavaScript olmadan kimse onay veremez).
* Temanıza ve veritabanınıza hiçbir şey yazılmaz: engellemeyi kapatırsanız sayfa eskisinin aynısıdır.

**Google Onay Modu v2**

* `ad_storage`, `analytics_storage`, `ad_user_data` ve `ad_personalization` sayfanın en başında "denied" olarak başlar; onay verilince `gtag('consent', 'update', …)` gönderilir (dataLayer'a `fckc_consent_update` olayı da düşer). Geri gelen ziyaretçinin kayıtlı tercihi Google etiketleri yüklenmeden iletilir.
* Temel mod (önerilen, varsayılan): Google etiketleri onaya kadar engelli kalır. Gelişmiş mod: Google etiketleri her şey "denied" durumdayken hemen yüklenir ve çerezsiz sinyal gönderir. İsterseniz Onay Modu kapatılabilir.

**Metinler ve şablonlar**

* Türkçe ve İngilizce varsayılan metinler sayfa diline kendiliğinden uyar. Yazdığınız metinler **Polylang** ve **WPML** dize çevirisine kaydedilir; politika sayfalarında ziyaretçinin dilindeki çeviriye bağlantı verilir.
* Çerez politikası ve KVKK aydınlatma metni için 6698 sayılı Kanun ve Kurul rehberine göre hazırlanmış **Türkçe ve İngilizce şablonlar**. Eklenti etkinleşince bunları şirket bilgilerinizle doldurulmuş taslak sayfa olarak oluşturmayı önerir. `[fckc_cerez_listesi]` kısa kodu kategorileri ve çerez tablosunu basar.
* **Şablonlar hukuki tavsiye değildir.** Kendi sitenize göre kontrol edin; tereddüt ederseniz bir hukukçuya danışın.

**Onay kayıtları**

* Her tercih anonim olarak kaydedilir: rastgele kimlik, tarih, onay sürümü, kategoriler, eylem (kabul / ret / özel), dil ve kısaltılmış tarayıcı adı ("Chrome 141 · Windows"). IP adresi varsayılan olarak saklanmaz; isterseniz tuzlanmış özet (hash) ya da kısaltılmış adres seçebilirsiniz.
* Süzgeçli yönetim ekranı (tarih, eylem, sürüm, arama), kabul / ret / özel oranları, toplu silme ve CSV dışa aktarma. Saklama süresini (varsayılan 365 gün) aşan kayıtlar her gün silinir.

**Sayfa önbelleğiyle uyumlu**

Bant JavaScript ile çizilir ve tercih çerezde tutulur; her ziyaretçi aynı HTML'i alır, önbellekteki sayfalar geçerli kalır. Tercihler nonce'suz bir REST uç noktasına kaydedilir (önbellekteki sayfada nonce bayatlar); bunun yerine uç nokta yalnız katı bir biçimi, yalnız kendi sitenizden ve dakikada ziyaretçi başına en çok 10, site genelinde en çok 600 kaydı kabul eder.

**Yakında (Pro):** otomatik çerez taraması, gelişmiş raporlar ve çoklu site yönetimi. Bu eklentide hiçbir özellik kilitli ya da sınırlı değildir.

= Legal sources / Hukuki kaynaklar =

The defaults, the banner behaviour and the templates were prepared from these sources. / Varsayılanlar, bant davranışı ve şablonlar şu kaynaklara göre hazırlandı:

* 6698 sayılı Kişisel Verilerin Korunması Kanunu (Law No. 6698 on the Protection of Personal Data), esp. art. 3, 4, 5, 9, 10, 11 and 13 — https://www.mevzuat.gov.tr/mevzuat?MevzuatNo=6698&MevzuatTur=1&MevzuatTertip=5
* Kişisel Verileri Koruma Kurumu, "Çerez Uygulamaları Hakkında Rehber" (Guide on Cookie Practices), KVKK Yayınları No: 69, Temmuz 2025 (first published June 2022) — https://kvkk.gov.tr/Icerik/7353/Cerez-Uygulamalari-Hakkinda-Rehber
* Aydınlatma Yükümlülüğünün Yerine Getirilmesinde Uyulacak Usul ve Esaslar Hakkında Tebliğ (Communiqué on the Duty to Inform), Resmî Gazete 10.03.2018, No. 30356
* Veri Sorumlusuna Başvuru Usul ve Esasları Hakkında Tebliğ (Communiqué on Applications to the Data Controller), Resmî Gazete 10.03.2018, No. 30356
* Kişisel Verileri Koruma Kurulu decision 27.02.2020, No. 2020/173 (explicit consent and notice on websites; summarised in the guide)
* 7499 sayılı Kanun, Resmî Gazete 12.03.2024, No. 32487 (new art. 9 of Law No. 6698 on transfers abroad, in force 01.06.2024) and Kişisel Verilerin Yurt Dışına Aktarılmasına İlişkin Usul ve Esaslar Hakkında Yönetmelik, Resmî Gazete 10.07.2024, No. 32598

What the plugin follows from the guide: consent before optional cookies are set, by an active act; "accept", "reject" and "preferences" with equal colour, size and font; optional categories off by default; no cookie wall; notice (link to the privacy notice) at the first visit, separate from consent; separate consent per purpose (category); easy withdrawal through a small icon in a corner; asking again periodically rather than on every visit; telling cookie name, purpose, duration and first / third party.

Rehberden uygulanan noktalar: isteğe bağlı çerezlerden önce aktif bir eylemle onay; renk, büyüklük ve punto bakımından eşit "kabul et", "reddet" ve "tercihler"; isteğe bağlı kategorilerin ilk anda kapalı gelmesi; çerez duvarı olmaması; ilk girişte açık rızadan ayrı aydınlatma (aydınlatma metni bağlantısı); her amaç (kategori) için ayrı onay; köşedeki küçük simgeyle kolay geri alma; her girişte değil, belirli aralıklarla yeniden sorma; çerez adı, amacı, süresi ve birinci / üçüncü taraf bilgisinin verilmesi.

== External services ==

This plugin does not connect to any external service and sends no data to Futurecode or to anybody else; there is no tracking or statistics. Consent records are stored only in your own WordPress database.

Google Consent Mode only passes signals ("granted" / "denied") to the Google tag that is already on your site (gtag.js or Google Tag Manager), inside the visitor's browser. The plugin itself does not load any Google file. Third-party scripts and embeds that you put on your site (Google, Meta, Hotjar, Yandex, Microsoft, LinkedIn, TikTok, YouTube, Vimeo, Google Maps) are only allowed to load after the visitor consents to their category; what they send is governed by those services' own terms.

The Futurecode logo on the settings screen is a file inside the plugin and links to https://futurecode.com.tr/ only when you click it. Nothing is shown on the visitor side.

**Türkçe:** Eklenti hiçbir dış servise bağlanmaz; Futurecode'a ya da başka birine veri göndermez, izleme ya da istatistik yoktur. Onay kayıtları yalnız kendi WordPress veritabanınızda tutulur. Google Onay Modu, ziyaretçinin tarayıcısında, sitenizde zaten bulunan Google etiketine ("granted" / "denied") sinyal verir; eklentinin kendisi Google'dan dosya yüklemez. Sitenize koyduğunuz üçüncü taraf betikler ve gömülü içerikler ancak ziyaretçi kategorisine onay verince yüklenir.

== Installation ==

1. Install and activate the plugin. It works at once with Turkish or English default texts.
2. Accept the offer to create the draft pages "Çerez Politikası" and "KVKK Aydınlatma Metni" (or do it later on *KVKK Çerez → Texts*), fill in the company details on the *Texts* tab, check the drafts and publish them.
3. Choose the position and colours on *Banner & look* and check the live preview.
4. On *Categories & scripts* check which trackers were found on your site and their categories, and choose the Consent Mode.
5. Optional: add a custom menu link with the URL `#fckc-tercihler`, or put `[fckc_cerez_tercihleri]` in the footer, so visitors can reopen their preferences.

**Türkçe:** Eklentiyi etkinleştirin. Taslak sayfa önerisini kabul edin (ya da sonra *Metinler* sekmesinden yapın), şirket bilgilerini girin, taslakları kontrol edip yayımlayın. *Bant ve görünüm*de konum ve renkleri seçin. *Kategoriler ve betikler*de sitede bulunan izleyicileri ve Onay Modu'nu kontrol edin. İsterseniz menüye `#fckc-tercihler` adresli bağlantı ekleyin.

== Frequently Asked Questions ==

= Bu eklenti beni KVKK'ya uygun hâle getirir mi? / Does this plugin make my site KVKK compliant? =

Tek başına hayır. Eklenti, Kurul rehberine uygun bir onay mekanizması ve teknik engelleme sağlar; metinleriniz, gerçekte kullandığınız çerezler, aktarımlarınız ve VERBİS gibi yükümlülükler size aittir. Şablonlar hukuki tavsiye değildir. / Not on its own. It gives you a consent mechanism and technical blocking that follow the Board's guide; your texts, the cookies you really use, your transfers and other duties remain yours. The templates are not legal advice.

= Analitik betiğim engellenmiyor. / My analytics script is not blocked. =

*Kategoriler ve betikler* sekmesinde servisin açık olduğuna bakın. Bilinmeyen bir servisse betiğe `type="text/plain" data-fckc-category="analytics"` ekleyin ya da "analytics | adres" biçiminde bir kural yazın. Sunucu tarafında sıkıştırma ya da birleştirme yapan bir eklenti betiği bir JS dosyasına taşıyorsa o betiği birleştirmeden hariç tutun. / Check that the service is on. For unknown services mark the script or add a rule. If an optimisation plugin moves inline scripts into a combined file, exclude the tracker from combining.

= Önbellek eklentimle çalışır mı? / Does it work with my cache plugin? =

Evet. Sunucu her ziyaretçiye aynı HTML'i gönderir; bant ve tercih tamamen tarayıcıda işlenir. Kayıt uç noktası nonce kullanmadığı için önbellekteki sayfalarda da çalışır. / Yes. The server sends the same HTML to everybody; the banner and the choice are handled in the browser, and the record endpoint does not use a nonce.

= Ziyaretçi onayını nasıl geri alır? / How does a visitor withdraw consent? =

Köşedeki çerez düğmesi, `[fckc_cerez_tercihleri]` kısa kodu ya da `#fckc-tercihler` menü bağlantısıyla tercih penceresini açıp kategorileri kapatır. Kapatılan kategorilerin çerezleri silinir ve sayfa yenilenir. / With the corner button, the shortcode or the menu link. Cookies of the switched-off categories are deleted and the page reloads.

= Google Onay Modu'nda temel mi gelişmiş mi seçmeliyim? / Basic or advanced Consent Mode? =

Temel mod, onaydan önce Google'a hiçbir şey göndermediği için önerilen ve varsayılan seçimdir. Gelişmiş mod, onaydan önce çerezsiz sinyaller gönderir; bu kararı hukuk danışmanınızla verin. / Basic sends nothing to Google before consent and is the default. Advanced sends cookieless pings before consent; decide it with your legal adviser.

= IP adresi saklanıyor mu? / Are IP addresses stored? =

Varsayılan olarak hayır. *Gelişmiş* sekmesinden tuzlanmış özet ya da kısaltılmış adres seçebilirsiniz. Hız sınırı için IP'nin geçici bir özeti iki dakika tutulur. / No by default. You can choose a salted hash or a shortened address. For the rate limit a temporary hash of the IP is kept for two minutes.

= Kaldırınca ne silinir? / What does uninstalling remove? =

Ayarlar, metinler, onay kayıtları tablosu, zamanlanmış temizlik ve geçici veriler. Şablonlardan oluşturduğunuz sayfalar sizin içeriğinizdir ve kalır. / Settings, texts, the consent records table, the scheduled cleanup and transients. Pages made from the templates are your content and stay.

== Screenshots ==

1. Banner & look with live preview. / Bant ve görünüm, canlı önizleme.
2. Consent records with ratios, filters, bulk delete and CSV. / Onay kayıtları.
3. Categories & scripts: recognised trackers, Consent Mode v2, cookie table. / Kategoriler ve betikler.
4. Texts, policy pages, consent version and data controller. / Metinler ve sayfalar.
5. Visitor banner on a desktop page with video placeholder. / Masaüstünde bant.
6. Preferences dialog. / Tercih penceresi.
7. Banner and preferences on a phone (390 px). / Telefonda bant ve tercihler.

== Changelog ==

= 1.0.1 =
* Fix: WooCommerce order attribution (sourcebuster.js) no longer writes its sbjs_* cookies before consent. Tracking starts on the next page load after the visitor allows analytics; withdrawing deletes the cookies. sbjs_* is listed in the cookie table under analytics.
* New: when the WP Consent API plugin is installed, the visitor's choice is passed on to it.
* Düzeltme: WooCommerce sipariş kaynağı izleme (sourcebuster.js) sbjs_* çerezlerini onaydan önce yazmıyor. Ziyaretçi analitik çerezlere izin verince bir sonraki sayfada izleme başlar; onay geri alınınca çerezler silinir. sbjs_* çerez tablosunda analitik altında listelenir.
* Yeni: WP Consent API eklentisi kuruluysa ziyaretçinin tercihi ona da bildirilir.

= 1.0.0 =
* First release: banner (bottom bar, corner box, centre window) and preferences dialog with essential, analytics, marketing and functional categories and equal buttons; re-open button, shortcode and menu link; consent version and lifetime; live preview with contrast check; automatic blocking of GA4, Google Tag Manager, Meta Pixel, Hotjar, Yandex Metrica, Microsoft Clarity, LinkedIn Insight Tag and TikTok Pixel (enqueued or pasted), manual marking and custom rules, scripts start without reload; YouTube / Vimeo / Google Maps placeholders; Google Consent Mode v2 (basic / advanced / off); Turkish and English texts and policy templates with draft pages; Polylang and WPML support; anonymous consent records with IP options, filters, ratios, bulk delete, CSV and retention cleanup; cache-friendly REST recording with rate limits.
