<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Berkay Demirbas on Medium]]></title>
        <description><![CDATA[Stories by Berkay Demirbas on Medium]]></description>
        <link>https://medium.com/@raufsamestone?source=rss-ca5ac70eca80------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*5zqOxMye_P5wkUNKOdRO3g.jpeg</url>
            <title>Stories by Berkay Demirbas on Medium</title>
            <link>https://medium.com/@raufsamestone?source=rss-ca5ac70eca80------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 14:19:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@raufsamestone/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Log your commits or not]]></title>
            <link>https://raufsamestone.medium.com/log-your-commits-or-not-a432b589e206?source=rss-ca5ac70eca80------2</link>
            <guid isPermaLink="false">https://medium.com/p/a432b589e206</guid>
            <category><![CDATA[logging]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[bunjs]]></category>
            <dc:creator><![CDATA[Berkay Demirbas]]></dc:creator>
            <pubDate>Tue, 16 Sep 2025 06:36:08 GMT</pubDate>
            <atom:updated>2025-09-16T06:36:08.560Z</atom:updated>
            <content:encoded><![CDATA[<p>I built a simple terminal-based logging tool for quick log entries.</p><p>Github Link: <a href="https://github.com/raufsamestone/logger">https://github.com/raufsamestone/logger</a></p><h4>Why?</h4><p>You might be thinking:</p><p>“Why would I need this? GitHub already logs commits!”</p><p>Well, yes… and no. Sure, GitHub keeps a history of commits, but do you really want to dig through raw commit messages every time you just need a quick changelog about what broke at 2 AM?</p><p>Also, your own debugging notes or random thoughts that don’t belong in a commit message.</p><p>When using <strong>Oh My Zsh</strong> with aliases, git commits become super convenient with shortcuts like <em>gs</em>, <em>gm</em>, etc.</p><p>Examples:</p><pre>alias c=&quot;clear&quot;<br>alias gs=&quot;git status&quot;<br>alias ga=&quot;git add .&quot;</pre><p>So: if I can push git commits using these aliases, why not also log them locally? This way, I could track commits for changelogs or debugging.</p><p>So, I built a simple terminal-based logger with by Bun.js.</p><h3>Getting Started</h3><p>I recommend using this project with an alias. For example:</p><pre>alias log=&quot;cd &lt;yourpath&gt;/logger &amp;&amp; (bun run server &amp;) &amp;&amp; sleep 0.5 &amp;&amp; bun run cli&quot;</pre><p>Now you can use just typing &quot;<strong>log</strong>&quot; on your terminal.</p><h3>Usage</h3><h4>Create a new log</h4><p>log new “your log”</p><h4>List all logs</h4><p>log list</p><h4>Search Logs</h4><p>log list — search “keyword”</p><h4>Export to Markdown</h4><p>log export</p><p>Then, you can use this alias with git like:</p><pre>git commit -m &quot;$msg&quot; &amp;&amp; log new &quot;$msg&quot;</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a432b589e206" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Web Analytics’te Sampling Bias]]></title>
            <link>https://raufsamestone.medium.com/web-analyticste-sampling-bias-c013eed483fc?source=rss-ca5ac70eca80------2</link>
            <guid isPermaLink="false">https://medium.com/p/c013eed483fc</guid>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[web-analytics]]></category>
            <category><![CDATA[web]]></category>
            <category><![CDATA[sampling]]></category>
            <dc:creator><![CDATA[Berkay Demirbas]]></dc:creator>
            <pubDate>Tue, 19 Aug 2025 08:16:29 GMT</pubDate>
            <atom:updated>2025-08-19T08:16:29.060Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X0vIbaCLe8cYbgUkwoke5A.png" /><figcaption>Sample Example from Clickhouse&#39;s SQL</figcaption></figure><p>Web ya da mobile uygulama analytics araçları çoğunlukla sampling kullanır. Pazarlamacılar çoğu zaman bu verilere can-ı gönülden güveniyor. Sampling, verinin tamamını kullanmak yerine, bir kısmını alıp işlemektir. Aggregate edilmiş ve kompleks segmentasyon query’lerinde performans yönetimi için gayet idealdir. Fakat %20’lik bir sample bile analizinizi tamamen değiştirebilir.</p><p>Eğer bir şirketin karar verici pozisyonundaysanız, sample veriyi (Analytics toolarındaki rapor ve dashboard’lar) sadece günlük kontrolleriniz, iş akışlarınız ve genel gidişatı gözlemlemek için kullanmalısınız.</p><p>Ancak büyük montanlı harcamalar, detaylı analizler için ise gerçek, yani ham veri üzerine yoğunlaşmalısınız.</p><p>&quot;Ne SQL’u falan abi, datacı mıyım ben?&quot; derseniz, kaybedersiniz. Elinizi kirletiverin, ucundan açık, bir şey olmaz. :)</p><p>Örnek olarak ClickHouse’tan full dataset ile çektiğim veriyi inceleyelim: 0.20&#39;lik sample veri ile ham veri arasındaki fark.</p><p>Ham Veri</p><ul><li>Toplam kullanıcı sayısı: 361002</li><li>Toplam sipariş: 12348</li><li>Toplam ciro: ₺20,342,197.52</li><li><strong>Dönüşüm oranı (Conversion Rate): 3.42%</strong></li><li><strong>Query süresi: 23 dakika</strong></li></ul><p>İşte sampling burada devreye giriyor. Her bu analizler için bu kadar uzun ve maliyetli bir query beklemektense, sampling metodları kullanarak verinin tamamı yerine, bir kısmı üzerinden analizi yapmaya çalışıyoruz.</p><p>Sampling (%20)</p><ul><li>Toplam kullanıcı sayısı: 79366</li><li>Toplam sipariş: 2558</li><li>Toplam ciro: ₺4,163,277.14</li><li><strong>Dönüşüm oranı (Conversion Rate): 3.22%</strong></li><li><strong>Query süresi: 3 dakika</strong></li></ul><p>Eğer analizlerinizde tek baktığınız KPI (Metric) Conversion Rate ise, geçmiş olsun. Oran olarak bir öncekine yakın olsa bile, toplam cirodaki kaybınız (tam olarak ₺16,178,920.38) çok fazla.</p><h4>Peki ama neden?</h4><p>Aslında basit. Bir markette sadece süt ürünlerinin fiyatlarını toplarsanız, sadece süt ürünlerinin fiyatını öğrenirsiniz. Her reyondan birer-ikişer ürün sayarsanız da bu sefer rastgele aldığınız ürünlerin fiyatlarını öğrenirsiniz. Ama marketin genel fiyat seviyesini anlamak istiyorsanız, tüm reyonları kapsayan dengeli bir sepet yapmanız gerekir.</p><p>İşte ölçümlemede de durum tam olarak böyledir: doğru resmi görmek için resmin tamamını görmelisiniz.</p><p>Mesela bu:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gqlzynZMyUiZxDkT.jpg" /><figcaption>Arnolfini Portrait, Jan van Eyck <a href="https://artsandculture.google.com/asset/portrait-of-giovanni-arnolfini-and-his-wife-0001/1wESsXmIEyCSSg?hl=tr">https://artsandculture.google.com/asset/portrait-of-giovanni-arnolfini-and-his-wife-0001/1wESsXmIEyCSSg?hl=tr</a></figcaption></figure><h4>Özet</h4><p>Günlük analizlerinizde sampling, karar verici noktasındaki analizleriniz için ham veri kullanın.</p><p>İyi akşamlar.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c013eed483fc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Built an Effect Pedal Analytics Logger]]></title>
            <link>https://raufsamestone.medium.com/how-i-built-an-effect-pedal-analytics-logger-0e4bc0c92f1d?source=rss-ca5ac70eca80------2</link>
            <guid isPermaLink="false">https://medium.com/p/0e4bc0c92f1d</guid>
            <category><![CDATA[effect-pedals]]></category>
            <category><![CDATA[guitar]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[analytics]]></category>
            <dc:creator><![CDATA[Berkay Demirbas]]></dc:creator>
            <pubDate>Sun, 25 May 2025 10:03:35 GMT</pubDate>
            <atom:updated>2025-05-25T10:03:35.259Z</atom:updated>
            <content:encoded><![CDATA[<p>Can you analyze the pedal tone and volume switches and then recall your previous pedal knob settings? <br>The answer is: Probably, yes.</p><h3>But, why?</h3><p>Before diving in, let me explain why I wanted to build this nerdy project.</p><p>When you’re using analog pedals, managing your pedalboard layout, transition timing, and tone consistency — especially without a digital processor — can become exhausting.</p><p>Most of the time, we rely on handwritten notes, stickers, or bits of electrical tape on the pedals to recall previous tones.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*PPwhWsUrzJDAJt0l.jpg" /><figcaption>From Reddit: <a href="https://www.reddit.com/r/Bass/comments/38d1dc/a_trick_for_marking_pedal_settings_from_ler/">https://www.reddit.com/r/Bass/comments/38d1dc/a_trick_for_marking_pedal_settings_from_ler/</a></figcaption></figure><p>And even there is a literally label pack for this <a href="https://www.pedallabels.com/">Pedal Labels.</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*6KuPE3eU8XMKhbuE.jpg" /><figcaption>Pedal Label from <a href="https://www.pedallabels.com/">https://www.pedallabels.com/</a></figcaption></figure><p>So the whole idea is that next time I plug in my analog pedals, the analytics logs tell me:</p><blockquote>“Hey, you’re using that same fuzz-heavy tone from last week.”</blockquote><h3>How?</h3><p>What if I could automatically detect these tones, name them, and store them in a database — based on pedal layout and transition patterns?</p><p>My first idea was to embed an transistor directly inside the pedal. But that would only give me input/output signal tracking — not actual tone data.</p><p>So I pivoted.</p><p>What if I could analyze real-time sound waves directly and detect clear tonal transitions from the audio itself for the knob and tone settings?</p><h3>How Does It Work?</h3><ul><li>Analyze an audio file (or real-time mic/sound input)</li><li>Save previously detected tones</li><li>Detect when pedal transitions likely occur</li><li>Log these transitions with timestamps and estimated types (e.g., distortion, reverb, modulation, volumes)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jPBFBOHt6KnA1SWCVF_kLw.jpeg" /><figcaption>Capturing and logging pedal outputs. Using Python for this.</figcaption></figure><p>I’m now able to spot when a tone gets “brighter,” “muddier,” or suddenly changes — indicating a pedal switch with a high chance of distortion, delay, or modulation being triggered and memorize previous settings on pedal instead of taking pic of pedalboard.</p><h3>Step 1: Capture the Sound</h3><p>To get started, I needed a way to listen to real-time audio from my guitar amp or pedal chain.</p><p>Here’s how I approached it:<br> • I used Python as the base for flexibility and quick prototyping.<br> • For capturing audio, I used libraries like: <em>pyaudio</em> or <em>sounddevice</em><br> • <em>scipy</em> and <em>numpy</em> → for signal processing<br> • <em>matplotlib</em> → for visualizing frequency changes</p><p>Example setup:</p><pre>import sounddevice as sd<br>import numpy as np<br><br>def callback(indata, frames, time, status):<br>    audio_data = np.linalg.norm(indata)<br>    print(audio_data)  # basic test to detect input changes<br><br>sd.InputStream(callback=callback, channels=1).start()</pre><h3>Step 2: Analyze the Sound for Transitions</h3><p>Pedal transitions usually result in:<br> • Sudden volume changes (RMS envelope)<br> • A shift in tone brightness (spectral centroid)<br> • A noticeable change in frequency content (spectral flux)</p><p>So I started tracking these over time. When one or more changed significantly, it was likely a pedal was switched.</p><p>Each time a significant change occurred, I logged with:<br> • Timestamp<br> • Change values (volume, brightness, etc.)<br> • Optional label (e.g., “possible distortion on”)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Zi9CjOqeSpZh_BcNoZHTRA.png" /><figcaption>Here is how detecting pedal sound changes</figcaption></figure><h3>Step 3: Save and Reuse Tone Profiles</h3><p>So I built a small database (can be JSON, SQLite, or PostgreSQL) that stores:<br> • Time-based logs of transitions<br> • Tone profiles based on frequency features<br> • Reusable “presets” based on real recordings</p><p>Example log:</p><pre>    {<br>      &quot;id&quot;: 1,<br>      &quot;timestamp&quot;: 0.13931972789115646,<br>      &quot;timestamp_formatted&quot;: &quot;00:00.139&quot;,<br>      &quot;type&quot;: &quot;spectral&quot;,<br>      &quot;magnitude&quot;: 4.345155156929049,<br>      &quot;pitch&quot;: null<br>    },<br>    {<br>      &quot;id&quot;: 2,<br>      &quot;timestamp&quot;: 6.6873469387755105,<br>      &quot;timestamp_formatted&quot;: &quot;00:06.687&quot;,<br>      &quot;type&quot;: &quot;amplitude&quot;,<br>      &quot;magnitude&quot;: 2.270969311425227,<br>      &quot;pitch&quot;: null<br>    },</pre><h4>Results:</h4><p>No need to check pedal knob settings and tones manually with duck tape or take pictures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rjURDcr2RSvwrdsluZhDdQ.jpeg" /><figcaption><em>This is a POC for how pedal outputs are logged in my backyard.</em></figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0e4bc0c92f1d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How We Built Our Custom URL Shortener: A Short Story of hard.al]]></title>
            <link>https://medium.com/usehardal/how-we-built-our-custom-url-shortener-a-short-story-of-hard-al-dc5a65698a2c?source=rss-ca5ac70eca80------2</link>
            <guid isPermaLink="false">https://medium.com/p/dc5a65698a2c</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[url-shorteners]]></category>
            <category><![CDATA[marketing-analytics]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Berkay Demirbas]]></dc:creator>
            <pubDate>Tue, 11 Feb 2025 07:54:31 GMT</pubDate>
            <atom:updated>2026-02-10T09:14:27.873Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ekQP3r_12LCccq9w8IwYDA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PXqgFzDOqD7OlumLcc9otw.png" /><figcaption>With a customized short URL like <strong>hard.al</strong> (Hardal’s), we can track and manage our campaigns, social media, and even offer engagements using telemetry data.</figcaption></figure><p>As a co-founder of <a href="https://usehardal.com/">Hardal</a>, I’m always happy to build in-house developments and geek out on things like generating harmonic sounds from our servers (Yes. <a href="https://harmony.hard.al/">https://harmony.hard.al</a>) or building internal care tools like auto-generated OG post images for our marketing team.</p><p>Now, we built our own custom URL shortener to manage and control our URLs for social media, decks, offers, and more...</p><h3>Why Build a Custom URL Shortener?</h3><p>Before diving into the technical details, let’s address the obvious question: <em>Why build a custom solution when there are plenty of URL shorteners available?</em></p><p>Here’s why:</p><ol><li><strong>Control:</strong> We needed full control over our redirect logic and data collection. Ready-to-use paid tools do not offer this flexibility — they are solely focused on redirecting to a page.</li><li><strong>Analytics</strong>: Built-in analytics and campaign tracking capabilities using telemtery data.</li><li><strong>Performance</strong>: Lightning-fast redirects with minimal overhead</li></ol><h3>Technical Architecture</h3><p>Our solution is built on these core technologies:</p><ul><li><a href="https://bun.sh/"><strong>Bun.js</strong></a>: for the fast all-in-one JS runtime</li><li><strong>Our cloud VM</strong>: for hosting and deploy</li><li><strong>JSON-based URL Mapping</strong>: Ultra simple yet effective URL storage</li></ul><h3>The URL Structure</h3><p>We store our shortened URLs in a structured JSON format that looks like this:</p><pre>{<br>  &quot;demo&quot;: {<br>    &quot;url&quot;: &quot;usehardal.com/demo&quot;,<br>    &quot;campaign&quot;: &quot;Demo Request&quot;,<br>    &quot;source&quot;: &quot;Linkedin&quot;,<br>    &quot;meta&quot;: {<br>      &quot;description&quot;: &quot;&quot;,<br>      &quot;tags&quot;: [&quot;demo&quot;]<br>    }<br>  }<br>}</pre><p>This structure allows us to:</p><ul><li>Track campaign sources</li><li>Categorize links with tags</li><li>Add metadata for analytics</li><li>Monitor traffic patterns</li></ul><h3>Core features of project</h3><h4>1. Telemetry Collection</h4><p>Our system automatically collects:</p><ul><li>User Agent information</li><li>Referrer data</li><li>Click timestamps</li><li>Campaign parameters</li></ul><pre>const payload = {<br>  userAgent,<br>  hashDigest,<br>  params,<br>  referer,<br>  eventToken,<br>  details<br>};</pre><h4>Analytics (Yes, of course is privacy-first)</h4><p>We implement privacy-focused analytics by:</p><ul><li>Hashing IP addresses</li><li>Anonymizing user data</li><li>Collecting only essential metrics</li></ul><pre>const hasher = new Bun.CryptoHasher(&quot;sha256&quot;);<br>hasher.update(ip + userAgent);<br>const hashDigest = hasher.digest(&quot;hex&quot;);</pre><h4>Efficient Redirects</h4><p>The redirect logic is straightforward and efficient:</p><pre>async function getLongUrlWithFallback(shortUrl: string): Promise&lt;string&gt; {<br>  try {<br>    const urlDetails = urlMap[shortUrl];<br>    if (!urlDetails) {<br>      throw new Error(&quot;URL not found in the map&quot;);<br>    }<br>    return urlDetails.url;<br>  } catch (error) {<br>    throw new Error(&quot;Failed to retrieve the long URL&quot;);<br>  }<br>}</pre><p>Building <strong>hard.al</strong>, our self-owned URL shortening system, to serve both technical and marketing needs. Fast redirects, built-in analytics, and marketing features power our stack. 🌭</p><p><em>Want to learn more about us? Visit </em><a href="https://usehardal.com/"><em>usehardal.com</em></a><em> or reach out to us on </em><a href="https://www.linkedin.com/company/usehardal/"><em>LinkedIn</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=dc5a65698a2c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/usehardal/how-we-built-our-custom-url-shortener-a-short-story-of-hard-al-dc5a65698a2c">How We Built Our Custom URL Shortener: A Short Story of hard.al</a> was originally published in <a href="https://medium.com/usehardal">Hardal</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Next.js Middleware + Hardal ile Pazarlama ve Analytics Altyapısı Oluşturmak]]></title>
            <link>https://medium.com/usehardal/next-js-middleware-hardal-ile-pazarlama-ve-analytics-altyap%C4%B1s%C4%B1-olu%C5%9Fturmak-6f82c0cc851a?source=rss-ca5ac70eca80------2</link>
            <guid isPermaLink="false">https://medium.com/p/6f82c0cc851a</guid>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[middleware]]></category>
            <category><![CDATA[marketing]]></category>
            <category><![CDATA[data-analytics]]></category>
            <dc:creator><![CDATA[Berkay Demirbas]]></dc:creator>
            <pubDate>Wed, 05 Feb 2025 11:18:47 GMT</pubDate>
            <atom:updated>2025-02-05T11:18:47.007Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FU1OZQcnTCyVU5Rw8u1K8Q.png" /></figure><h3>Middleware Nedir ve Neden Önemlidir?</h3><p>Next.js <a href="https://nextjs.org/docs/app/building-your-application/routing/middleware">Middleware</a>, uygulamanızın her bir sayfa isteği arasına girebilen güçlü bir ara katmandır. Yani bir bekçi gibi davranarak, sayfa yüklenmeden önce istekleri yanı sunucu requestlerini yakalar ve gerekli işlemleri (manipülasyonları) gerçekleştirir.</p><p>Bu özellik, özellikle analytics, çerez yönetimi ve birinci parti veri toplama stratejileri için kritik öneme sahiptir.</p><h3>Hardal nedir?</h3><p><a href="https://usehardal.com/?utm_source=medium-berkay">Hardal</a>, kısaca web ve mobil uygulamalarda sunucu taraflı veri ölçümlemesi için ihtiyaç olan altyapıyı uçtan uca sağlar.</p><p>Örneğin hem <strong>Google Analytics</strong> hem de <strong>Adjust</strong> gibi MMP kullanıyorsunuz. Hepsi için ayrı ayrı SDK/JS eklemek yerine, daha tutarlı, güvenli, çerezsiz, kontrollü ve gizlilik odaklı veri toplaması için bu pazarlama araçlarını kendi sunucularınızdan besleyebildiğiniz senaryolara ihtiyacınız olabiliyor. Hardal da işte tam burada size bu ihtiyacınız olan sunucuyu hazır olarak sağlıyor.</p><p>Bunu yaparken de KVKK ve GDPR gibi regülasyonlarla uyumlu hale gelmek adına data governance* yönetimi yapıyor. Otomatik PII verisi hashlemek ya da redacte etmek (gizlemek) gibi.</p><p>*<strong><em>Data governance (veri yönetişimi),</em></strong><em> bir organizasyonun verilerini nasıl yöneteceğini, koruyacağını, paylaşacağını ve kullanacağını belirleyen kurallar, politikalar, süreçler ve standartların bütünüdür</em><strong><em>.</em></strong></p><h3>Middleware’in Temel Özellikleri</h3><h4><strong>İstek Önceleme </strong>(Request Interception):</h4><p>İstek önceleme, middleware’in en temel özelliklerinden biridir. Sayfa render edilmeden önce gelen isteği yakalayıp işlem yapabilmeyi sağlar.</p><pre>// middleware.ts<br>export function middleware(request: NextRequest) {<br>  // İstek daha sayfaya ulaşmadan önce çalışır<br>  console.log(&#39;Sayfa yüklenmeden önce çalışan kod&#39;)<br>  <br>  // İsteğin URL&#39;ini kontrol edebiliriz<br>  const url = request.nextUrl.pathname<br>  <br>  // İstek başlıklarını okuyabiliriz<br>  const userAgent = request.headers.get(&#39;user-agent&#39;)<br>  const language = request.headers.get(&#39;accept-language&#39;)<br>  <br>  // Kullanıcı oturum durumunu kontrol edebiliriz<br>  const sessionToken = request.cookies.get(&#39;session_token&#39;)<br><br>  // Tüm bu işlemler sayfa render edilmeden önce gerçekleşir<br>  return NextResponse.next()<br>}</pre><h4>Kullanım Örnekleri:</h4><ul><li>Sayfa yüklenmeden önce kullanıcı doğrulama</li><li>Bot trafiğini filtreleme</li><li>İstek loglaması</li><li>Performans metriklerini toplama</li></ul><h3>2. Global Erişim (Global Access)</h3><p>Middleware, uygulamanızın tüm sayfalarında veya belirli sayfa gruplarında otomatik olarak çalışabilir.</p><pre>// middleware.ts<br>export function middleware(request: NextRequest) {<br>  const response = NextResponse.next()<br><br>  // Tüm sayfalarda çalışan kod<br>  console.log(&#39;Her sayfada çalışan middleware&#39;)<br><br>  return response<br>}<br><br>// Hangi sayfalarda çalışacağını belirleyen konfigürasyon<br>export const config = {<br>  matcher: [<br>    // Ana sayfa hariç tüm sayfalar<br>    &#39;/((?!api|_next/static|_next/image|favicon.ico).*)&#39;,<br>    <br>    // Sadece belirli sayfalar<br>    &#39;/dashboard/:path*&#39;,<br>    &#39;/profile/:path*&#39;,<br>    <br>    // Dinamik rotalar<br>    &#39;/products/:id*&#39;<br>  ]<br>}</pre><p><strong>Özelleştirilmiş Sayfa Grupları:</strong></p><pre>// Farklı sayfa grupları için farklı middleware&#39;ler<br>export function middleware(request: NextRequest) {<br>  const response = NextResponse.next()<br>  const path = request.nextUrl.pathname<br><br>  // Admin sayfaları için özel işlemler<br>  if (path.startsWith(&#39;/admin&#39;)) {<br>    return handleAdminPages(request)<br>  }<br><br>  // Ürün sayfaları için özel işlemler<br>  if (path.startsWith(&#39;/products&#39;)) {<br>    return handleProductPages(request)<br>  }<br><br>  // Blog sayfaları için özel işlemler<br>  if (path.startsWith(&#39;/blog&#39;)) {<br>    return handleBlogPages(request)<br>  }<br><br>  return response<br>}</pre><h3>3. Response Modifikasyonu (Response Modification)</h3><p>Middleware, sunucudan gelen yanıtı değiştirebilir ve başlıkları güncelleyebilir.</p><pre>// middleware.ts<br>export function middleware(request: NextRequest) {<br>  // Temel yanıtı oluştur<br>  const response = NextResponse.next()<br><br>  // Yanıt başlıklarını güncelle<br>  response.headers.set(&#39;x-custom-header&#39;, &#39;özel-değer&#39;)<br>  response.headers.set(&#39;Cache-Control&#39;, &#39;public, max-age=3600&#39;)<br>  <br>  // Güvenlik başlıkları ekle<br>  response.headers.set(&#39;X-Frame-Options&#39;, &#39;DENY&#39;)<br>  response.headers.set(&#39;X-Content-Type-Options&#39;, &#39;nosniff&#39;)<br>  response.headers.set(&#39;Referrer-Policy&#39;, &#39;strict-origin-when-cross-origin&#39;)<br><br>  // Çerez ekle veya güncelle<br>  response.cookies.set(&#39;last-visit&#39;, new Date().toISOString(), {<br>    httpOnly: true,<br>    secure: process.env.NODE_ENV === &#39;production&#39;<br>  })<br><br>  // Yanıt gövdesini değiştirme (rewrite durumlarında)<br>  if (request.nextUrl.pathname === &#39;/eski-sayfa&#39;) {<br>    return NextResponse.rewrite(new URL(&#39;/yeni-sayfa&#39;, request.url))<br>  }<br><br>  return response<br>}</pre><p><strong>Gelişmiş Modifikasyon Örneği:</strong></p><p>Bu kısım da doğrudan pazarlama ve analytics altyapınız için ihtiyacını olacak olan örnek.</p><pre>export function middleware(request: NextRequest) {<br>  const response = NextResponse.next()<br><br>  // A/B testi için içerik varyasyonu<br>  const testGroup = request.cookies.get(&#39;ab-test-group&#39;)?.value<br>  if (testGroup === &#39;B&#39;) {<br>    response.headers.set(&#39;x-show-new-design&#39;, &#39;true&#39;)<br>  }<br><br>  // Dil tercihi bazlı içerik modifikasyonu<br>  const userLanguage = request.headers.get(&#39;accept-language&#39;)<br>  if (userLanguage?.includes(&#39;tr&#39;)) {<br>    response.headers.set(&#39;x-preferred-language&#39;, &#39;tr&#39;)<br>  }<br><br>  // Cihaz tipine göre içerik optimizasyonu<br>  const userAgent = request.headers.get(&#39;user-agent&#39;) || &#39;&#39;<br>  if (userAgent.includes(&#39;Mobile&#39;)) {<br>    response.headers.set(&#39;x-device-type&#39;, &#39;mobile&#39;)<br>  }<br><br>  return response<br>}</pre><h3>4. Yönlendirme Kontrolü (Routing Control)</h3><p>Middleware, kullanıcıları farklı sayfalara yönlendirebilir veya mevcut rotaları yeniden yazabilir.</p><pre>// middleware.ts<br>export function middleware(request: NextRequest) {<br>  // URL&#39;den ülke kodunu al<br>  const country = request.geo?.country || &#39;TR&#39;<br>  <br>  // Kullanıcı oturum durumunu kontrol et<br>  const isLoggedIn = request.cookies.has(&#39;session_token&#39;)<br><br>  // Ülkeye özel yönlendirme<br>  if (request.nextUrl.pathname === &#39;/shop&#39; &amp;&amp; country !== &#39;TR&#39;) {<br>    return NextResponse.redirect(new URL(`/shop/${country.toLowerCase()}`, request.url))<br>  }<br><br>  // Oturum kontrolü ve yönlendirme<br>  if (request.nextUrl.pathname.startsWith(&#39;/dashboard&#39;) &amp;&amp; !isLoggedIn) {<br>    return NextResponse.redirect(new URL(&#39;/login&#39;, request.url))<br>  }<br><br>  // A/B testi için sayfa yeniden yazma<br>  if (request.nextUrl.pathname === &#39;/pricing&#39;) {<br>    const testGroup = request.cookies.get(&#39;ab-test-group&#39;)?.value<br>    if (testGroup === &#39;B&#39;) {<br>      return NextResponse.rewrite(new URL(&#39;/pricing-test-b&#39;, request.url))<br>    }<br>  }<br><br>  return NextResponse.next()<br>}</pre><p>Next.js Middleware, birinci parti veri toplama ve çerez yönetimi için güçlü bir altyapı sunar. <strong>Hardal</strong> ile birlikte kullanarak:</p><ul><li>Kullanıcı gizliliğini koruyabilir</li><li>Değerli kullanıcı verilerini toplayabilir</li><li>GDPR, KVKK ve diğer düzenlemelere uyum sağlayabilir</li><li>Kendi analytics sisteminizi oluşturabilirsiniz</li><li><a href="https://usehardal.com/">Hardal</a> gibi platformlarla da dogrudan server-side ve first-party olarak Next JS ortamınızda bu sistemleri kurabilirsiniz.</li></ul><p><em>⚠️ </em><strong><em>Not</em></strong><em>: Tüm bu implementasyonlar, projenizin özel gereksinimlerine ve yasal düzenlemelere göre uyarlanmalıdır.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6f82c0cc851a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/usehardal/next-js-middleware-hardal-ile-pazarlama-ve-analytics-altyap%C4%B1s%C4%B1-olu%C5%9Fturmak-6f82c0cc851a">Next.js Middleware + Hardal ile Pazarlama ve Analytics Altyapısı Oluşturmak</a> was originally published in <a href="https://medium.com/usehardal">Hardal</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Neden durduk yere open-source todo uygulaması yazdım?]]></title>
            <link>https://raufsamestone.medium.com/neden-durduk-yere-open-source-todo-uygulamas%C4%B1-yazd%C4%B1m-ed211cccd70d?source=rss-ca5ac70eca80------2</link>
            <guid isPermaLink="false">https://medium.com/p/ed211cccd70d</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[to-do-list]]></category>
            <category><![CDATA[obsidian]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[notion]]></category>
            <dc:creator><![CDATA[Berkay Demirbas]]></dc:creator>
            <pubDate>Tue, 14 Jan 2025 18:22:26 GMT</pubDate>
            <atom:updated>2025-01-14T21:13:37.575Z</atom:updated>
            <content:encoded><![CDATA[<h3>Neden durduk yere open-source todo uygulaması geliştirdim?</h3><p>Hepimiz bir şekilde <em>todo list</em> ya da <em>takvim/planner </em>uygulamaları kullanıyoruz. Oldukça uzun bir süre popüler, underground, open-source demeden tüm uygulamaları denedim, ancak teknik co-founder ve geliştirici olarak kendime yeni bir tane yazmaya karar verdim. Çünkü neden olmasın?</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FPc53CjECnW4%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DPc53CjECnW4&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FPc53CjECnW4%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/523d345025d1609b6e9e08e42b6ce21c/href">https://medium.com/media/523d345025d1609b6e9e08e42b6ce21c/href</a></iframe><h3>Her şeyden önce: Gizlilik</h3><p>En temel motivasyonum, iş ya da özel hayatıma ait planlarımı yazdığım bir yerin gizli olmasına dair takıntım var. En azından üçüncü kişilerle paylaşılmadığının garantisi olmasını isterim.</p><p>Şu ana kadar kullandığım tüm uygulamalar GCP, AWS ya da belli başlı cloud providerlarda barınıyor. Bu iyi. Ancak uygulama içindeki SDK’lar, pluginler, Marketing &amp; Analytics scriptleri oldukça fazla veri topluyor ya da bu verileri bir şekilde bu şirketler first-party olarak toplamadıkları için, doğrudan bu platformlara (üçüncü taraf) göndermiş oluyorlar.</p><p>Örnek:</p><figure><img alt="Tıklama eventlerinin fütursuzca ve güvensiz şekilde marketing platformlarına nasıl gönderilebileceği." src="https://cdn-images-1.medium.com/max/1024/1*v7pHCwHN4Y-A3sKCsGvgtg.png" /><figcaption>Tıklama eventlerinin fütursuzca ve güvensiz şekilde marketing platformlarına nasıl gönderilebileceği.</figcaption></figure><p>Evet, bu örnek biraz ekstrem ve paranoyakça. Ancak event tıklamalarındaki element verilerinin, bu platformlara gönderilebilmemesi için de hiç bir sebep yok. Yoksa kim ne yapsın benim köpeğimin şampuanını?</p><blockquote>Dolayısıyla yazacağım uygulama kesinlikle kendime ait bir veritabanı olmalı.</blockquote><h3>Mucize tool: Kağıt ve Kalem</h3><p>Kağıt kalem ile geleneksel not tutmayı ve planlamayı seviyorum, dolayısıyla el yazımın kötü olmasından dolayı hiç bir işe yaramıyor.</p><h4>Ivy Lee Metodu</h4><p>Tüm bu geleneksel iş yapış alışkanlıklarımda kullandığım yöntemin <a href="https://jamesclear.com/ivy-lee">Ivy Lee methodu</a> olduğunu farkettim. Birebir aynısı. Sistem özetle şöyle işliyor.</p><ul><li>Kendinize günlük en fazla 6 (evet, altı) ana task verin.</li><li>Görevler önem sırasına göre listelenmeli</li><li>Bitiremediğiniz taskları her zaman bir gün sonrasına atın.</li></ul><p>Ive Lee Methodu da aslında sadece bundan ibaret. Önce boş bir şablon hazırlıyorsunuz, Şekil A.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gjaV0jRavCEiLG7Ww2P4dQ.png" /><figcaption>Şekil A</figcaption></figure><p>Daha sonra da taskları önem sırasına göre listeleyip, bitmeyenleri de bir sonraki güne alıyorsunuz, Şekil B.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/937/1*SEiZ5npZZUQVUYFLRDZejw.png" /><figcaption>Şekil B</figcaption></figure><ul><li>Diğer motivasyonum ise çok fazla cihaz kullanıyorum. Dolayısıyla hepsinin senkronize (cross-device) çalışabilmesi lazım. Bu da OK.</li><li>Genelde plaint texte satır satır ve haftalık olarak (Week 1, Week 2…) şeklinde yazdığımı farkettim. Yani tüm sistem haftalık olmalıydı.</li><li><a href="https://www.amazon.com/Deep-Work-Focused-Success-Distracted/dp/1455586692"><strong>Deep Work</strong></a> ve <a href="https://stoic.im/"><strong>The Stoic Mind</strong></a> kitapları iş takip ve üretkenlik açısından beni en çok etkileyen kitaplar. Dolayısıyla tüm sistemi dikkat dağıtıcı tüm öğelerden arındırarak yapmalıydım. Taskların reminderı, ek sub taskları vs olmamalıydı.</li></ul><h3>Mevcut toolların sorunu neydi be nankör kedi?</h3><p>Uzunca bir süredir Obsidian’ından Apple Notes’una kadar tüm kullanım alışkanlıklarıma bakalım:</p><h4>Obsidian</h4><p>Tam olarak advanced ve markdown formatında not tutmak için mükemmel. Open-source.</p><p>Buradaki en büyük sorun Apple Cloud ile kullanıldığında, Vault’larda cihazlar arası senkronizasyon kayıyor ve dosyaları overwrite edebiliyor.</p><h4>Notion</h4><p>Database yapısı harika. Templateler ile güzel bir proje oluşturulabilir. Şirket için kullanıma da gayet uygun. Burası da Cron’u satın aldıklarından sonra takvim bağlantılarıyla, yeni adıyla Notion Calendar birlikte asla sistematik çalışmıyor. Yani basit bir haftalık planlama için, Google Calendar bağlantısı + Notion Database + Todo Template ve sürüsüne column (kolon) ve properties kurmak zorundasınız.</p><p>Ya da doğrudan hazır olanlardan seçebilirsiniz ama bunlar da biraz basit.</p><ul><li><a href="https://www.notion.com/templates/category/weekly-planner">Notion Weekly Planner Templates</a></li></ul><p>Ayrıca bir şeylerin Kanban ya da Tablo görünümünde yapılabiliyor oluşu, onu üretken kılmaz.</p><h4>Apple Notes</h4><p>Amatörü eğlendirir diye düşünmeyin, Reminder ve Calendar ile birlikte harika çalışıyor. Şaka şaka, reminder, calendar ve notes arasında bağlantı kurabilmek için Shortcuts ya da automation yapmanız gerekiyor.</p><ul><li><a href="https://support.apple.com/en-us/118442"><em>Use Notes on your iPhone, iPad, and iPod touch</em></a></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1010/1*aHVBW-OXOxx3s8L52Uoxwg.png" /><figcaption>Apple Productivity Tools</figcaption></figure><h4>Google Tasks</h4><p>Bu gerçekten de amatörü eğlendirir. Google Calendar ile uyumluluğu, hızlı task açma/kapama özellikleri şahane.</p><p>Fakat en büyük problemi: Search yok. Evet, tasklarda arama yapılmıyor. Ve insan gerçekten hayret ediyor.</p><p>Yani temelde bir search engine şirketinin productivity toolunda böylesine basit bir feature, -eminim bir bildikleri olduğunan eklenmemiştir — oldukça ironik.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/677/1*v-gY2RZGH6G3OTudxYQCTA.png" /><figcaption>Google Tasks Search</figcaption></figure><ul><li><a href="https://support.google.com/tasks/answer/7675772?hl=en">Google Tasks</a></li></ul><h4>Tweek.so</h4><p>Bu tam olarak aradığım şeydi, fakat burada da taskların altındaki subtask yapılanması işleri bozdu.</p><blockquote>Çünkü subtasklar işe yaramaz, overwhelming yaratır.</blockquote><p>Tasklar basit ve yapılacak işi belirlemeli. Versionlama, subtask, milestone yapmak istesem zaten <a href="https://git-scm.com/">Git</a> ile de yapabilirdim. Aynı durum Apple Notes için de geçerli.</p><p>Bu yüzden Next JS, Supabase ve ShadCN kullanarak tüm problemlerime çözüm sunan bir weekly planner/ajanda ve günlük task karışımı bir open-source uygulama ortaya çıktı: <strong>Eggenda 🍳</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*US40nQSnFilS3ypv.png" /><figcaption>Eggenda 🍳</figcaption></figure><p>En temel özellikler:</p><ul><li>Open-source</li><li>Task havuzundan haftalık planlarınıza göre dağılım yapabiliyorsunuz</li><li>Tamamlanmamış taskları bir sonraki güne atayabiliyorsunuz.</li><li>Mobil için PWA odaklı tasarım (Cihazlar arası kullanım)</li><li>Keyboard friendly</li><li>Taska doğrudan URL yapıştırdığınızda, websitenin başlığını otomatik task başlığına dönüştürüyor. <em>Bu en çok ihtiyacım olan şeydi. Nedense Pocket gibi read it later uygulamalarında bu tam olarak olmuyordu.</em></li></ul><h3>Bu yaklaşıma ‘Dikey Hiyerarşi’ adını verebiliriz:</h3><p>Nihayetinde geleneksel todo uygulamalarından farklı olarak, <strong>subtask</strong> yapısı yerine <strong>yorum bazlı</strong> bir sistem tercih ettim. Bu yaklaşım:</p><ul><li>Görevleri parçalamak yerine bütünsel görmeyi sağlıyor</li><li>Overwhelm/burnout olma riskini azaltıyor</li><li>Geleneksel kağıt-kalem + dikey yorum deneyimi</li><li><a href="https://github.com/raufsamestone/eggenda">Github Linki</a></li><li>LinkedIn → <a href="https://linkedin.com/in/raufsamestone">linkedin.com/in/raufsamestone</a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ed211cccd70d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[YouTube’da sponsorlu içerikler gerçekten etkili mi?]]></title>
            <link>https://raufsamestone.medium.com/youtubeda-sponsorlu-i%C3%A7erikler-ger%C3%A7ekten-etkili-mi-0086b254ad20?source=rss-ca5ac70eca80------2</link>
            <guid isPermaLink="false">https://medium.com/p/0086b254ad20</guid>
            <category><![CDATA[youtube]]></category>
            <category><![CDATA[measurement]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[youtube-marketing]]></category>
            <category><![CDATA[affiliate-marketing]]></category>
            <dc:creator><![CDATA[Berkay Demirbas]]></dc:creator>
            <pubDate>Wed, 21 Aug 2024 12:52:44 GMT</pubDate>
            <atom:updated>2024-08-21T19:04:54.104Z</atom:updated>
            <content:encoded><![CDATA[<p>Premium account olsanız da, izlediğiniz içeriklerde içerik sahipleri çeşitli markalarla affiliate reklam anlaşması yaparak, içeriklerinin belirli bir bölümünü bu markaların tanıtımına ayırıyorlar.</p><p>Her ne kadar reklam görmemek ve diğer özellikleri kullanmak için ücretli üyeliğe geçsek de, alınan hizmet doğrudan hizmet sağlayıcı değil, içerik üreticileri olduğu için Google bu modele izin veriyor.</p><blockquote>YouTube creators may include paid product placements or endorsements as part of their content only if they comply with our advertising policies and any applicable legal and regulatory obligations.</blockquote><p>Kaynak: <a href="https://support.google.com/youtube/answer/154235?hl=en">Google</a></p><h4>Mr Beast ve Fake Progress Bar Metodu</h4><p>Dünyada en çok YouTube abonesi olan kanallardan MrBeast, sponsorlu içeriklerindeki geri dönüşüm oranı o kadar düşük ki, bunu fake bir progress bar kullanarak içerik tüketicilerinin reklamı geçmemesini amaçlıyor.</p><p>Şu şekilde işliyor, reklam ilk başladığında X birim hızında %50&#39;ye ulaşırken, kalan yarısı X/2 hızında ilerliyor. Psikolojik olarak da, reklamın geri kalan kısmı için “Reklamı Geç” demek anlamsızlaşıyor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*BtE4KlS4v37q9e7MOpGuSQ.png" /><figcaption>Mr Beast Progress Bar Source: <a href="https://www.sportskeeda.com/us/streamers/news-x-user-accuses-mrbeast-using-fake-progress-bar-trick-viewers-skipping-ads-youtube-videos">sportskeeda</a></figcaption></figure><p>Konumuza dönelim.</p><p>İçerik üreticileri ve reklam verenlerin nasıl bir kazan-kazan durumu sağladığını basitçe açıklayabiliriz: affiliate marketing.</p><p>Reklam veren ile içerik üreticisi arasında yapılan bir anlaşma ile belirli bir dönemdeki kampanya için sağlanan indirim kodu, özel teklifler vb. devreye giriyor.</p><h3>Peki, Affiliate Marketing YouTube’ta ne kadar etkili?</h3><p>İşler burada bıraz karışıyor.</p><p>Genelde içerik üreticileri, reklamverenlerle kendi YouTube Analytics Dashboard’larını paylaşarak, ortalama ne kadar izlenme aldıklarını, hangi bölgelerden, hangi cinsiyet dağılımıyla ne kadar kez izlendiğine göre, reklamverenlere bir teklif sunuyorlar.</p><p>Fakat reklamverenlerle içerik üreticileri arasında yapılan bu anlaşmanın ölçümlenmesi, yani karşılıklı yaptıkları yatırımın geri dönüş oranının hesaplanması, en az offline pazarlama ölçümlenmesi kadar kompleks bir durum. Marketing Mix Modeling’deki gibi yaklaşımlar, Weibull olasılık dağılım analizi, multi-touch, time-series gibi bir ürünü gördükten ne kadar süre sonra o ürünü satın almaya yöneldiğiniz gibi marketing tasarımları çıkarılmalı.</p><p>Reklamveren sadece marka bilinirliği artsın da istiyor olabilir, ancak ölçümleyemedikten ya da bunu doğru kitleye ulaştıramadıktan sonra bunun artık hiçbir faydası yok, çünkü artık 1930&#39;larda yaşamıyoruz.</p><p>Bir billboardun (OOH) gözlemlenebilen bir attribution’u ölçmenin ne kadar zor olduğunu şimdi anlattırmayın bana. Şaka şaka, sonra anlatırım. Ama fikir olması açısından şu şekilde tahminleniyor:</p><p>OOH (Out-Of-Home) reklamlarının etkisini tahmin etmek için Marketing Mix Modelleme (MMM) kullanarak, satışlar gibi bir bağımlı değişkeni, OOH reklam harcamaları dahil çeşitli bağımsız değişkenlerle açıklayan bir regresyon modeli kurarız ve OOH reklam harcamalarının bu satışlar üzerindeki etkisini bu şekilde belirleyebiliriz.</p><blockquote>Basic OOH for MMM:<br>- Y = Dependent variable (e.g., Sales, Revenue, etc.)<br>- α\alphaα = Intercept<br>- βi\beta_iβi​ = Coefficients for each independent variable<br>- XiX_iXi​ = Independent variables (e.g., Advertising Spend, Media Spend, etc.)</blockquote><p>Y=α+β1​X1​+β2​X2​+β3​X3​+…+βn​Xn​</p><p>Yani diyor ki, bir TV reklamını izlediğinizde, sezonsallık, gecikme etkileri (Lag Effects) gibi faktörler devreye girer ve performans ölçümü, bir sonraki dönemdeki tüketici satın alma davranışları veya KPI’lar bu verilere göre belirlenir. Aynı durum dijital reklamlarda da geçerlidir; ancak, gecikme süresi daha düşük, ölçülebilirlik ve etkileşim daha yüksektir. Ancak ikisi de aynı amaca hizmet eder; <strong>targeting</strong>.</p><h3>YouTube Türkiye’de Durum Nasıl?</h3><p>Türkiye’de en çok izlenen kanalları listeledim ve rastgele seçtiğim <a href="https://www.youtube.com/channel/UCv6jcPwFujuTIwFQ11jt1Yw">Barış Özcan</a> kanalında, sponsorlu içeriklerin olduğu videoların tamamını veri seti olarak kullanarak bir analiz çalışması yaptım.</p><p>Normalde, kanal sahibi tarafından <strong>sponsorlu</strong> olarak tanımlanmış tüm videoların analytics verisini çıkarmak gerekiyordu. Ancak, Barış Özcan sponsorlu içeriklerini “<strong>Bu içerik sponsorludur</strong>” diye işaretlemediği için, video açıklamasında Affiliate Link olan videolarını scrape ederek veriyi çıkarmak zorunda kaldım.</p><p>Çünkü genelde bu linklerde yasal yükümlülüğünü Google tarafından yerine getirmek yerine, manuel olarak “iş birliği” ibaresi yer alıyordu.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/907/1*4bWjHtHjQzxlmR_fTu85Mg.png" /></figure><p>Videoları exportlamak için de <strong>ChannelID</strong>’ye ihtiyacımız olacak, bu da YouTube’daki kanal sayfalarının URL’lerinde önceden yer alıyordu, ancak şimdi kanallar kendi kullanıcı isimlerini yazdıklarından dolayı bunu da kendi API’ları aracılığıyla <strong>ytInitialData </strong>ile<strong> </strong>client-side’tan tarayıcı içinden çekebiliyorsunuz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jTldmoQeOcjG9nNRuNe3qw.png" /></figure><p>Bu veri seti için kullandığım sorgu parametreleri:</p><ul><li>isPaidPromotion — <em>Bunu kullanamıyoruz, işaretlenmediği için.</em><br>- View Count<br>- Relevance Time<br>- Donations<br>- Sponsorship Gifts<br>- Ve en önemli metrik olarak <strong>Most Replayed</strong></li></ul><p>Kanal ID’sini ve YouTube Data API v3 kullanarak bu videoların analytics verilerine ulaşabilirsiniz. Detayları <a href="https://developers.google.com/youtube/v3">burada</a>.</p><p>Son 3 video için analytics verisini bu şekilde exportlayıp, her bir video için en çok replay edilen sekans aralıklarını da bu yöntemle <strong>Intensity Score</strong> çıkardım.</p><pre>def plot_replayed_scenes(data):<br>    markers = data[&quot;items&quot;][0][&quot;mostReplayed&quot;][&quot;markers&quot;]<br><br><br>    sorted_markers = sorted(markers, key=lambda x: x[&quot;startMillis&quot;])<br><br>    top_5_markers = sorted_markers[:5]<br><br>    formatted_ranges = []<br>    for marker in top_5_markers:<br>        start_time_sec = marker[&quot;startMillis&quot;] / 1000<br>        end_time_sec = (marker[&quot;startMillis&quot;] + 10000) / 1000<br>        formatted_range = f&quot;{format_time(start_time_sec)} - {format_time(end_time_sec)}&quot;<br>        formatted_ranges.append(formatted_range)<br><br>    print(&quot;Top 5 Most Replayed Time Ranges:&quot;)<br>    for idx, range_str in enumerate(formatted_ranges):<br>        print(f&quot;{idx + 1}. {range_str}&quot;)<br><br>    start_times = [marker[&quot;startMillis&quot;] / 1000 for marker in sorted_markers]<br>    intensities = [marker[&quot;intensityScoreNormalized&quot;] for marker in sorted_markers]<br><br>    plt.figure(figsize=(14, 6))<br>    plt.plot(start_times, intensities, marker=&#39;o&#39;, linestyle=&#39;-&#39;, color=&#39;b&#39;, label=&#39;Intensity Score&#39;)<br>    plt.title(&#39;Most Replayed Scenes Intensity&#39;)<br>    plt.xlabel(&#39;Time (seconds)&#39;)<br>    plt.ylabel(&#39;Intensity Score (normalized)&#39;)<br>    plt.grid(True)<br>    plt.legend()<br>    plt.tight_layout()<br>    plt.show()</pre><p>Temel amacımız, en çok pik yapan iki “most replayed” sekansını anomali ile bulup bir intensity score çıkarmak ve bu aralıklarda sponsorlu reklam içeriği olup olmadığını belirlemektir.</p><p>Gelelim videolarımıza.</p><h4>1. Video: 2024&#39;ÜN EN GELİŞMİŞ İNSANSI ROBOTLARI</h4><p>YouTube URL: <a href="https://www.youtube.com/watch?v=dqpr4o8Z4bM">https://www.youtube.com/watch?v=dqpr4o8Z4bM</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*OWiKiv9G7rxTUf9s5xS_xw.png" /></figure><h4>3. Video: Kendinizi Dondurup Geleceğe Yolculuk Yapabilir misiniz?</h4><p>YouTube URL: <a href="https://www.youtube.com/watch?v=fUzZSU9wBCM">https://www.youtube.com/watch?v=fUzZSU9wBCM</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*orO0I-uu3WLt2KxNbP0PsQ.png" /></figure><h4>3. Video: Bu gezegende uzaylı yaşam mı keşfedildi? — K2–18b</h4><p>YouTube URL: <a href="https://www.youtube.com/watch?v=giGKlpuXdwo">https://www.youtube.com/watch?v=giGKlpuXdwo</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*U_mfKBWZWpfBT-lL2R6x2Q.png" /></figure><h4>Sonuç</h4><p>Bu iki sekans aralığı, bize izleyicilerin en çok tekrar ettiği yerleri veriyor ve bu sonuçlardan sponsorlu içerik kısımlarının en çok ileri sarıldığı kısmı çıkarım yapabiliriz.</p><h4>Kanıt</h4><p>Tüm en düşün aralıklardaki reklamlar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T-4Em5TbKZgkfBTF04O9Wg.png" /></figure><p>Dijital kanallardaki reklam ölçümlenebilirliği ne kadar kesin olmazsa, o kadar manipülasyona açık bir strateji endüstriyi gereksiz yere şişirir.</p><p>Google Ads Video reklamlarından bahsetmiyorum.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3KIkIWxQRneAtpZ_oLxk5w.png" /></figure><p>Reklam görmemek için ücret ödediğiniz bir platformda yine de promosyonlu içerik olarak reklam izliyoruz. Bunu filtrelemek adına, normalde bu videoların <strong>Includes paid promotion</strong> olarak etiketlenmesi gerekiyor, bu şekilde bu videoları es geçebilıyorsunuz. Ancak Türkiye’deki çoğu YouTuber, videolarında sponsorlu içerik olduğunu işaretlemiyor. Bunun nedeni, Google’ın bu videolardan belirli bir prosedür uygulamasıdır.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/562/1*qsyQ134mXzXPZjF3xnhJqg.png" /></figure><blockquote>You may include paid product placements, endorsements, sponsorships, or other content that requires disclosure to viewers in your videos. You have to let us know if you include any of those by <a href="https://support.google.com/youtube/answer/154235?sjid=16318820666667976124-EU#notify">selecting the paid promotion box</a> in your video details.</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=0086b254ad20" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Server-side Google Tag Manager (sGTM) | Kurulum Süreci ve Maliyet Optimizasyonu]]></title>
            <link>https://medium.com/usehardal/server-side-google-tag-manager-ve-sunucu-maliyetleri-95f56f90d51d?source=rss-ca5ac70eca80------2</link>
            <guid isPermaLink="false">https://medium.com/p/95f56f90d51d</guid>
            <category><![CDATA[server-side-tagging]]></category>
            <category><![CDATA[google-tag-manager]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[google-cloud-run]]></category>
            <category><![CDATA[measurement]]></category>
            <dc:creator><![CDATA[Berkay Demirbas]]></dc:creator>
            <pubDate>Wed, 08 May 2024 11:22:35 GMT</pubDate>
            <atom:updated>2024-05-08T11:37:34.498Z</atom:updated>
            <content:encoded><![CDATA[<p>Web sitesinizde ya da mobil uygulamanızda, mevcut kullandığınız Google Tag Manager için, herhangi bir sunucu kurulumu yapmadıysanız, büyük ihtimalle Google Tag Manager’ı client (istemci) taraflı kullanıyorsunuz. Eğer Google Tag Manager’ı, kendi sunucunuz üzerinden çalıştırırsanız (sGTM), daha fazla kullanıcı/kendi şirket verilerinizin güvenliğini sağlamış olursunuz.</p><p>Özellikle <strong>KVKK</strong> regülasyonları ve Google’ın <strong>Privacy Sandbox</strong> manifestosu kapsamında, Chrome tarayıcılarında <strong>2025&#39;in ilk çeyreğine ertelenen</strong> <a href="https://developers.google.com/privacy-sandbox/blog/cookie-countdown-2023oct"><strong>3. taraf çerezlerindeki eskitmesine</strong></a> dair dijital pazarlamada web ve mobil app ölçümlemesinde atılması gereken ilk adımlardan birini de atmış olursunuz.</p><p>Bu postta, normal kullandığımız Google Tag Manager’dan, sunucu taraflı Google Tag Manager’a neden geçmemiz gerektiğini, geçiş yaparken nelere dikkat etmeniz gerektiğini ve tüm sGTM kurulumu ve sonrasında bu işin sunucu maliyet optimizasyonunu aktarmaya çalışacağım.</p><h3>Server-side Google Tag Manager Nedir?</h3><p><em>Sunucu tarafı etiketleme, uygulamanızı cihazlar arasında kullanmak için Google Etiket Yöneticisi’ni kullanmanın yeni bir yoludur. Sunucu kapsayıcıları, alışık olduğunuz etiket, tetikleyici ve değişken modelini kullanır. Ayrıca, kullanıcı etkinliğini nerede olursa olsun ölçmenizi sağlayan yeni araçlar da sunar. </em><a href="https://developers.google.com/tag-platform/tag-manager/server-side/intro?hl=tr"><em>Kaynak: Google</em></a></p><h3>Peki zaten normalini ücretsiz kullanıyorken, neden server-side Google Tag Manager’a geçmeliyim?</h3><p><em>Sunucu tarafı etiketleme, ölçüm etiketi araçlarını web sitenizden veya uygulamanızdan Google Cloud Platform’daki (GCP) ya da </em><a href="https://developers.google.com/tag-platform/tag-manager/server-side/manual-setup-guide?hl=tr"><em>başka bir platformdaki</em></a><em> bir sunucu tarafı işleme containerına taşımanıza olanak tanır. Sunucu tarafı etiketleme, istemci tarafı etiketlere kıyasla birkaç avantaj sunar:</em></p><ul><li><strong><em>İyileştirilmiş performans:</em></strong><em> Web sitenizde veya uygulamanızda daha az ölçüm etiketi olması, istemci tarafında daha az kod çalıştırılacağı anlamına gelir.</em></li><li><strong><em>Daha iyi güvenlik:</em></strong><em> Ziyaretçi verileri, müşteri tarafından yönetilen bir sunucu tarafı ortamında toplanıp dağıtıldığında daha iyi korunur ve daha güvenlidir. Veriler bir bulut örneğine gönderilir. Burada veriler işlenip diğer etiketler tarafından yönlendirilir. </em><a href="https://developers.google.com/tag-platform/tag-manager/server-side/intro?hl=tr"><em>Kaynak: Google</em></a></li></ul><p>Daha da basitleştirmek gerekirse, mevcut kullanığımız Google Tag Manager’ı, Google sunucuları yerine kendi bilgisayarımızdan çalıştırmış oluyoruz ve bu yöntemle birlikte, Google Tag Manager üzerinde çalışan third-party pazarlama etiketleri de dahil olarak kullanılabilecek verileri, doğrudan sizin sunucunuz üzerinden <strong>%100 kontrol</strong> altına almış oluyorsunuz.</p><p>Sunucu-taraflı Google Tag Manager kullanmanın bir diğer artı yönü de, Google Tag Manager’ı kendi alan adınız üzerinden kullanmak.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PcwGfrdsRghpkWpIRzdiyw.png" /><figcaption>Google Tag Manager’ı kendi alan adınız üzerinden kullanmanın örneği</figcaption></figure><p>Bu sayede, <strong>ad-blocker </strong>kullanan kullanıcılarda da Google Tag Manager’ı çalıştırmış olursunuz ve daha kesin veriye sahip bir dijital pazarlama ölçümlemesi kurgulayabilirsiniz.</p><p>Özetle:</p><ol><li>Web siteniz ve varsa mobil uygulamanızda, analiz ve performans verilerinde <strong>%100 kontrol sahibi</strong> olursunuz. Tüm kullanıcı ve şirket hassas verileri, gizlilik odaklı olarak güvenli bir şekilde pazarlama stratejilerinizde kullanabilmenize olanak sağlar. Bu, KVKK ve GDPR için son derece önemli.</li><li>Google Tag Manager’ı kendi alan adınız altında kullanarak mevcut tüm pazarlama etiketlerinizi birinci parti bağlamında kullanmış olursunuz. Bu özellik, Google’ın 2025 yılı başında <strong>üçüncü taraf çerezlerini kademeli olarak azaltacağı için</strong> oldukça kritik.</li><li>Google Analytics 4&#39;ün<strong> Cookieless Ping</strong> (<a href="https://developers.google.com/tag-platform/tag-manager/server-side/consent-mode?hl=tr#advanced-consent-mode">Çerezsiz Ping</a>) özelliğini de etkinleştirmiş olursunuz. Bu da Consent Mode kurulumu sonrasında yaşanan veri kaybını, GA4 veya BigQuery üzerinden gözlemlenebilir hale getirir. Aynı zamanda <strong>ad-blocker kullanan kullanıcılarda</strong> da Google Tag Manager’ın yüklenmesini sağlar.</li></ol><p><em>Özellikle Google Tag Manager’ı, server-side olarak kullanırken, mevcutta kullandığınız </em><a href="https://developers.google.com/tag-platform/tag-manager/server-side/consent-mode?hl=tr"><strong><em>Kullanıcı Rıza Yönetimi Platformunuzla (Consent Management Platform)</em></strong></a><em> doğru entegrasyonu yapmanız gerekiyor. Çünkü sGTM, </em><strong><em>izinsiz veri toplamanın bir yöntemi değil,</em></strong><em> izinli/izinsiz kullanıcı verisini, %100 kontrol altına almanızı sağlar.</em></p><p>4. Google Tag Manager’da çalışan tüm etiketler, tarayıcı yerine sunucu üzerinden çalıştığı için, normal Google Tag Manager’ın yarattığı <strong>sayfa yükleme sorununu</strong> ortadan kaldıracaktır.</p><h3>Server-side Google Tag Manager’a nasıl geçebilirim?</h3><p>Burda şirket içi IT yapılandırmanızdan, pazarlama ve analytics hizmeti aldığınız ajansınıza kadar bir çok parametre vardır. En kolay ve uygun yöntemlerden biri, Google Cloud Run üzerinden bu implementasyonu yapmaktır.</p><p>Basitçe, Google Tag Manager üzerinden yeni bir server-side container açarak, hızlı kurulum desteğiyle birlikte, kendi Google Cloud hesabınızda bu kurulumu gerçekleştirebiliyorsunuz. Detaylı kurulum örneğine <a href="https://developers.google.com/tag-platform/tag-manager/server-side/cloud-run-setup-guide?hl=tr&amp;provisioning=manual">buradan</a> erişebilirsiniz.</p><p><strong>Ancak bu kurulumun, proxy desteği, alan adı ve DNS yapılandırması, IP maskeleme ve sunucu faturalandırmanızı büyük ölçüde etkileyecek bazı limitasyonları vardır.</strong></p><p>Bu limitasyonları ortadan kaldırmak için, <a href="https://developers.google.com/tag-platform/tag-manager/server-side/manual-setup-guide?hl=tr">Docker imaj ile birlikte manuel bir kurulum</a> yapmanız gerekiyor ki, esas konumuz burası olacak. Çünkü bu kurulum için, kendi Node.js sunucunuzun olması, günlük düzenli olarak bir destek gerektirecek sunucu istek sayılarını kontrol edebileceğiniz teknik destek sürecine ihtiyacınız olacaktır.</p><h3>Server-side Google Tag Manager’ın maliyeti nedir?</h3><p>Burda da, aynı şekilde ister GCP üzerinden, isterseniz de kendi sunucunuz üzerinden bu kurulumu yaparak, aylık sunucu maliyetinizi optimize edebilirsiniz.</p><h4>Google Cloud Platform (GCP):</h4><p>Bir e-ticaret websitesi ya da mobil uygulamanızdaki aylık <strong>5 milyonluk</strong> event hacminize göre örnek hesaplama tahmini yapacak olursak, aylık Google Cloud Run maliyetiniz, ortalama <strong>130 ABD Doları </strong>civarında olacaktır.</p><p>Google Cloud Run için <a href="https://developers.google.com/tag-platform/tag-manager/server-side/cloud-run-setup-guide?hl=tr&amp;provisioning=manual#cloud_run_calculator">örnek hesaplama</a> aracını kullanabilirsiniz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*H1RKOiDAl0EJdrtY7zMBVQ.png" /></figure><h4>Amazon Web Services (AWS):</h4><p>Google Tag Manager’ı Sunucu Taraflı olarak AWS üzerinde kullanmak isterseniz, detaylı rehberi <a href="https://aws.amazon.com/solutions/guidance/using-google-tag-manager-for-server-side-website-analytics-on-aws/">buradan</a> inceleyebilirsiniz.</p><p><em>Bu Rehberin çalıştırılması sırasında kullanılan AWS hizmetlerinin maliyeti sizin sorumluluğunuzdadır. Güncel olarak, &lt;Varsayılan AWS Bölgesi (Muhtemelen ABD Doğu (Kuzey Virginia))&gt;indeki varsayılan ayarlarla bu Rehberin çalıştırılması ayda yaklaşık olarak </em><strong><em>1.180,70 ABD Doları</em></strong><em> tutarındadır (günde 1 milyon kayıt).</em></p><p>Ancak buradaki kurulum biraz daha teknik yeterlilik istiyor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yftOe2S9rWoIWe0jAGWDuA.png" /><figcaption>sGTM, Google Tag Manager’ı Sunucu Taraflı AWS üzerindeki kurulum örneği</figcaption></figure><h3>Server-side Google Tag Manager sunucu maliyeti optimizasyonu</h3><p>Tüm bu kurulumlar tamamlandıktan sonra, sunucularınızdaki yoğunluğu, Load Balancer kullanarak, CDN üzerinden script yönetiminizi sağlayarak ve loglama özelliklerini kapatarak bir maliyet optimizasyonu — cost saving — yaratmanız mümkün.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qatBoPbPR22YmPEqbXPFgg.png" /><figcaption>sGTM kurulu olan bir sunucuda, optimizasyon yöntemleriyle elde edeceğiniz maliyet kıyaslaması</figcaption></figure><p>Bir diğer yöntem olarak da, Google Cloud’un kullanıcılara sunduğu bazı krediler ve belirli kullanımlar için öncede commit edebileceğiniz <a href="https://cloud.google.com/docs/cuds"><strong>Committed Use Discount</strong></a><strong>.</strong></p><p>CUD, ortalama kullanım durumunuza bağlı olarak size normalde <strong>%17 </strong>civarında indirimli olarak toplu satın alım fırsatı sunabiliyor.</p><h3>Gerçekten bu kadar teknik detaya ve zahmete gerek var mı?</h3><p>Daha da basit bir yöntem olarak, ister ajans ister marka tarafında olun <a href="https://usehardal.com/"><strong>Hardal</strong></a>, kullanarak tüm bu süreçleri ayrı bir hizmet olarak satın alabilir, kurulum tarafındaki teknik ve maliyetle uğraşmak zorunda kalmazsınız.</p><h4>Hardal kullanmak neden avantajlı?</h4><p><a href="https://usehardal.com/">Hardal</a>, server-side GTM hosting ve kurulum tarafında maliyet zorluklarını hedefleyen, etiketleme maliyetlerini azaltmak için gelişmiş algoritmaları ve cloud üzerindeki sunucu istekleri için tahminleme modeli kullanarak verimli bir şekilde çalışmasına olanak sağlar.</p><p>Örnek olarak, Google Cloud Run kullanarak sunuculardaki her bir sGTM containerı için auto-revision özelliği ile, site trafiğinize göre sunucu optimizasyonu mümkün hale geliyor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A4SGHR1DaFtW0AhbcIl2Tg.png" /><figcaption><a href="https://usehardal.com/optimizing-server-side-tagging-costs">Hardal auo-revision</a> özelliği ile otomatik deploy çıkararak maliyet optimizasyonu sağlar.</figcaption></figure><h4>Hardal yerine tüm kurulumu kendim yaparsam?</h4><p>Eğer sGTM kurulum sürecinde, Hardal yerine tüm süreci kendi GCP ya da AWS hesabınızla da yapsanız, hem kurulum tarafındaki teknik efor süreci hem de aylık sunucu maliyetiniz üzerinden bu şekilde karşılaştırabilirsiniz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*99A8wofkPx7YXb95Rh17ng.png" /><figcaption>sGTM kurulumunda Hardal VS kendi yapılandırmanız</figcaption></figure><p>Ek olarak, sGTM kullanmanın dijital pazarlama stratejinize sağlayacağı faydayı doğru eforlayabilmeniz adına:</p><ul><li>Kullanıcıların GEO Location bilgileri</li><li>Custom request headerlar</li><li>Sınırsız server-side API Gateway kullanımı</li><li>Custom alan adı üzerinden çalışma</li><li>7/24 sunucu takibi ve teknik desteği</li></ul><p>gibi ek geliştirme isteyen özellikleri de kullanma imkanınız olur.</p><p>Eğer:</p><ul><li><strong>First-party</strong> (Birinci taraf kullanıcı verisi) ve çerezsiz (<strong>cookieless</strong>) ölçümleme gibi yöntemleri kullanmak istiyorsanız,</li><li>Kullanıcı gizliliğine, <strong>KVKK</strong> ve rıza politikalarıyla birlikte etik pazarlamaya önem veriyorsanız,</li><li>Hassas şirket ve satış verilerininizi kullanarak advanced seviyede birinci taraf verilerinizle destekleyici performans pazarlama ve ölçümleme yapmak istiyorsanız</li></ul><p>Server-side Google Tag Manager (sGTM) kurulumunuzu <a href="https://usehardal.com/"><strong>Hardal</strong></a> üzerinden yaparak geçiş sürecinizi doğru yönetebilir, <strong>%70&#39;e kadar maliyet avantajı </strong>elde edebilirsiniz. 🌿</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TK438QT2pWUG1mlgASICyg.png" /><figcaption>Hardal, sGTM kurulum süresi ve sunucu maliyetine ek olarak server-side için gerekli olan en uygun paket ve özelliklerle birlikte hizmet verir.</figcaption></figure><p>Ücretsiz başlamak ve demo talebi oluşturmak için:<br><a href="https://usehardal.com/request-demo"><strong>https://usehardal.com/request-demo</strong></a></p><p>Reklamlar bitti.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=95f56f90d51d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/usehardal/server-side-google-tag-manager-ve-sunucu-maliyetleri-95f56f90d51d">Server-side Google Tag Manager (sGTM) | Kurulum Süreci ve Maliyet Optimizasyonu</a> was originally published in <a href="https://medium.com/usehardal">Hardal</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Optimizing Server-side Tagging Cost]]></title>
            <link>https://medium.com/usehardal/server-side-tagging-cost-b5cd984583b0?source=rss-ca5ac70eca80------2</link>
            <guid isPermaLink="false">https://medium.com/p/b5cd984583b0</guid>
            <category><![CDATA[google-tag-manager]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[google-cloud-run]]></category>
            <category><![CDATA[server-side-tagging]]></category>
            <category><![CDATA[cost-optimization]]></category>
            <dc:creator><![CDATA[Berkay Demirbas]]></dc:creator>
            <pubDate>Sun, 28 Apr 2024 11:30:36 GMT</pubDate>
            <atom:updated>2024-04-28T11:30:36.671Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’ve decided to move server-side tagging for enhanced data accuracy, more control, and more security while sending sensitive user or business data with privacy centric values, but you’re unsure about the costs involved and optimizing server-side tagging cloud cost, this is where you start.</p><blockquote>Server-side tagging is a new way to use Google Tag Manager to instrument your application across devices. Server containers use the same tag, trigger, and variable model that you’re used to, while also providing new tools that allow you to measure user activity wherever it happens. — <a href="https://developers.google.com/tag-platform/tag-manager/server-side/intro">Source: Google</a></blockquote><blockquote>The server runs in your own Google Cloud Platform project — or in a different environment of your choosing — and only you have access to the data in the server until you choose to send it elsewhere. You have full control over how that data is shaped, and where it is routed from the server. Tags are built using the sandboxed JavaScript technology. Permissions give you the visibility into what the tag can do, and policies allow you to set boundaries around the container. — <a href="https://developers.google.com/tag-platform/tag-manager/server-side/intro">Source: Google</a></blockquote><p>It’s quite like running Google Tag Manager on your own computer whether it has 512MB or 12GB of RAM on instances server costs are then determined by your traffic volume.</p><p>If you optimize and maintenance your tagging hosting setup, using autoscale features, or committing resources can further optimize your costs.</p><figure><img alt="Unoptimized server-side tagging cost vs actual server-side tagging cost" src="https://cdn-images-1.medium.com/max/1024/1*DSf78aUL_xWggcjMiunRwA.png" /><figcaption>Unoptimized server-side tagging cost vs your actual server-side tagging cost</figcaption></figure><p>Server-side tagging can be expensive or fairly priced due to several factors outlined in the provided sources.</p><h3><strong>Server-side Tagging Hosting Costs</strong></h3><p>Hosting a server-side container, especially on Google Cloud Platform (GCP), incurs monthly costs that can range from <strong>$240 to $300</strong>, up to <strong>$3000-$3500</strong> annually based on your web or app traffic.</p><h3>Example server-side tagging cost calculation</h3><p>Considering the hosting costs range from $240 to $300 per month, let’s take an average of $270 per month.</p><p>If we calculate the annual cost based on this average, it would be $270 x 12 months = <strong>$3240.</strong></p><h4>Google Cloud Platform (GCP):</h4><p>Google recommends having at least 3 servers in a production environment, with each server costing approximately $40 per month.</p><p>This would result in a minimum monthly cost of <strong>3 * $40 = $120</strong></p><p>For websites with higher traffic volumes and more tags, Google Cloud can autoscale to 5–6 servers, leading to monthly costs ranging from <strong>$240 to $300.</strong></p><p>Additional costs may arise if logging is not disabled when deploying server GTM, potentially adding around<strong> $100</strong> for 500.000 requests.</p><h4>Amazon Web Services:</h4><p>You can find the huge guidance for using Google Tag Manager for Server-Side website analytics on AWS, <a href="https://aws.amazon.com/solutions/guidance/using-google-tag-manager-for-server-side-website-analytics-on-aws/">here</a>.</p><p><em>You are responsible for the cost of the AWS services used while running this Guidance. As of , the cost for running this Guidance with the default settings in the &lt;Default AWS Region (Most likely will be US East (N. Virginia)) &gt; is approximately $1,180.70 per month for processing ( 1 mil records each day ).</em></p><p>Here is the <a href="https://github.com/aws-solutions-library-samples/guidance-for-using-google-tag-manager-for-server-side-website-analytics-on-aws/tree/main?tab=readme-ov-file#cost">source</a>.</p><h4><strong>Technical Complexity</strong></h4><p>Implementing server-side tagging requires a higher level of technical expertise compared to client-side tagging, potentially leading to increased costs associated with hiring skilled professionals or investing in training</p><ul><li><strong>Increased Requests:</strong> Server-side tagging costs can vary based on the number of requests sent, with higher request volumes potentially leading to higher expenses</li><li><strong>Optimization and Maintenance:</strong> Ensuring the smooth operation and optimization of server-side tagging containers requires ongoing maintenance, updates, and potentially additional costs for optimizing server configurations</li><li><strong>Implementation Costs:</strong> Moving from client-side to server-side tagging may incur additional expenses, such as hosting fees on platforms like Google Cloud Platform, AWS or Azure. These costs contribute to the overall implementation budget for server-side tagging. For instance, expenses may include consultations with various stakeholders such as project managers, digital marketing leads, IT for DNS configurations, cloud architects, and agency representatives. Additionally, allocating time for meetings, such as a x-hour(s) session with a product analysts, adds to the implementation costs.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*W4y_BfsKUtk1MQmd.png" /><figcaption>Example complex diagram of using <a href="https://aws.amazon.com/solutions/guidance/using-google-tag-manager-for-server-side-website-analytics-on-aws/">Google Tag Manager for Server-Side website analytics on AWS</a></figcaption></figure><p>So, the expenses associated with server-side tagging stem from hosting costs, technical complexity, increased requests, optimization and maintenance requirements, and the transition costs involved in moving from client-side tracking to server-side tagging.</p><h3>Usage</h3><ul><li><strong>Logging: </strong>In server-side tagging, data flows through an intermediary server before reaching analytics or marketing platforms, enhancing data security and control</li><li><strong>Performance:</strong> The performance of self-hosted server-side tagging can vary based on the requests per second (RPS) it can handle, impacting costs.</li></ul><h3>Maintenance?</h3><p>Yes, this is important part of setup and using server-side tagging hosting.</p><ul><li><strong>Security</strong>: Hosting server-side tagging on platforms like GCP provides security benefits, reducing potential security risks and offering more control over data handling.</li><li><strong>Revisions:</strong> Regular revisions and maintenance are essential to ensure smooth operation and data integrity, especially when transitioning from a test to a production environment.</li></ul><p>Setting up GTM server-side tagging involves creating a server container, choosing hosting options, and configuring the server. Usage focuses on data flow, performance, and security benefits. Maintenance includes security measures, updates, and transitioning to production.</p><h3>How to optimize server-side tagging cloud?</h3><p>This is also depending how you manage your server, but here some tricks to optimizing your server.</p><h4>Committed use discounts (CUDs)</h4><p>Committed use discounts (CUDs) provide discounted prices in exchange for your commitment to use a minimum level of resources for a specified term. The discounts are flexible, cover a wide range of resources, and are ideal for workloads with predictable resource needs.</p><p><em>For example, when you purchase Google Cloud committed use discounts, you commit to a consistent amount of usage for a one- or three-year period. With spend-based commitments, the usage is measured in dollars per hour and equivalent to your on-demand spend. You receive a discounted rate on the usage your commitment covers, but any usage over the committed amount is charged at the on-demand rate.</em> — Source: <a href="https://cloud.google.com/docs/cuds">Google</a></p><h4>Disabling Logs</h4><p>By default, information about every single request (e.g. request path, query parameters, etc) is logged. If your tagging server handles a lot of requests per month (e.g. greater than 1 million), those log messages may incur significant <a href="https://cloud.google.com/logging">logging charges</a>. To reduce or eliminate the logging charges, we recommend disabling the request logging.</p><p>You can get more details from Simo Ahava&#39;s Tips for Logging Server-side Tagging <a href="https://www.simoahava.com/analytics/tips-for-logging-server-side-tagging/">here</a>.</p><h4>Instance Updates</h4><p>Google Cloud run, by default scale each instances if you setting up max-instances for how much you will need to pay for resources.</p><p>However, you may choose to run fewer (or more) servers. Expected that autoscaling 2–10 servers will handle 35–350 requests per second, though the performance will vary with the number of tags, and what those tags do.</p><p>The problem with that, you have to develop and run Cloud Functions to alerting or updating this server-side instances if you want to run your server-side tagging server instances as dynamically, according your regular requests counting like GA4 total events, or any marketing tags on your client-side Google Tag Manager to trigger GET and POST requests.</p><p>Server-side tagging costs vary depend on your hosting/cloud provider choices, website/app traffic volumes, and additional features. You may running the all progress as a service like <a href="https://usehardal.com/"><strong>Hardal</strong></a>.</p><blockquote>Hardal is designed to server-side cost challenge, utilizing advanced algorithms for efficient tagging cost reduction and cloud log forecasting.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*57FZu2VRHgpjL_13JPlOIA.png" /><figcaption><a href="https://usehardal.com/optimizing-server-side-tagging-costs">Here is how Hardal can optimize server-side tagging cost using AutoRevision algorithm.</a></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/898/1*99A8wofkPx7YXb95Rh17ng.png" /></figure><p>If you want to use server-side tagging with Google Tag Manager and server-side callback endpoints to using Google Tag Manager on iOS and Android, simply you start using <a href="https://usehardal.com/">Hardal</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b5cd984583b0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/usehardal/server-side-tagging-cost-b5cd984583b0">Optimizing Server-side Tagging Cost</a> was originally published in <a href="https://medium.com/usehardal">Hardal</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to send an image from Unsplash to IPFS?]]></title>
            <link>https://raufsamestone.medium.com/how-to-send-an-image-from-unsplash-to-ipfs-7d2b831714f6?source=rss-ca5ac70eca80------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d2b831714f6</guid>
            <category><![CDATA[decentralization]]></category>
            <category><![CDATA[web3]]></category>
            <category><![CDATA[ipfs]]></category>
            <category><![CDATA[nextjs]]></category>
            <dc:creator><![CDATA[Berkay Demirbas]]></dc:creator>
            <pubDate>Mon, 28 Mar 2022 12:05:36 GMT</pubDate>
            <atom:updated>2022-03-28T12:11:52.893Z</atom:updated>
            <content:encoded><![CDATA[<p>I suggest you include the <strong>web3</strong> environment in your growth strategy. Therefore, you should use technical implementations decentralized networks like <a href="https://thegraph.com/explorer">subgraph</a> or <strong>IPFS</strong>.</p><p>In this guide, you’ll learn how to send image files to using <strong>ipfs-http-client</strong> and Nextjs</p><p>You can see the demo <a href="https://url-to-ipfs.netlify.app/">here</a> or jump to directly <a href="https://github.com/raufsamestone/url-to-ipfs">GitHub</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/880/0*IdtPTmMQKizwNbVr.jpg" /></figure><h3>Pre-requests</h3><ul><li>Node 15 &gt;</li></ul><h3>Getting started</h3><p>Create a simple next js app:</p><pre>npx create-next-app ipfs</pre><p>Add IPFS HTTP client library using yarn:</p><pre>yarn add ipfs-http-client</pre><p>Create a new constant for <strong>IPFS</strong> gateway. In this case, we will use <a href="https://docs.infura.io/infura">Infura</a> API.</p><pre>const client = create(&quot;https://ipfs.infura.io:5001/api/v0&quot;);</pre><p>Get a random image URL from <strong>Unsplash.</strong> You can see more detail in <a href="https://unsplash.com/documentation#get-a-random-photo">here</a><strong>.</strong></p><pre>async function getImage() {<br>fetch(https://source.unsplash.com/500x500/?beach).then((response) =&gt; {<br>let imageURL = response.url;<br>setImageURL(imageURL);<br>});<br>}</pre><p>Or you can use your own fetching solution like custom form data, Cloudinary etc.</p><p>Then upload your file to IPFS.</p><p>The critical thing is, you should fetch the <strong>image URL</strong> as a <strong>blob</strong> object.</p><pre>const blobFile = await fetch(imageURL).then((r) =&gt; r.blob());</pre><p>Create a new function as <strong>uploadFile</strong></p><pre>async function uploadFile() {<br>const blobFile = await fetch(imageURL).then((r) =&gt; r.blob());<br>try {<br>const added = await client.add(blobFile);<br>const url = https://ipfs.infura.io/ipfs/${added.path};<br>updateIPFSURL(url);<br>} catch (error) {<br>console.log(&quot;Error uploading file: &quot;, error);<br>}<br>}</pre><p>Finally, you are ready to fetch and image image object from URL and send to IPFS.</p><p>Clone the full repository <a href="https://github.com/raufsamestone/url-to-ipfs">here</a> and run;</p><pre>yarn dev</pre><p>You can see the more detailed cases about Web3 from Nader Dabit’s posts <a href="https://dev.to/edge-and-node/uploading-files-to-ipfs-from-a-web-application-50a">here</a>.</p><p>Thanks for reading. 👋 Don’t forget to subscribe me on <a href="https://raufsamestone.medium.com/subscribe">Medium</a> or <a href="https://dev.to/raufsamestone">Dev.to</a></p><p><em>Originally published at </em><a href="https://raufsamestone.com/unsplash-to-ipfs"><em>raufsamestone.com</em></a><em> on March 28, 2022.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d2b831714f6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>