<?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[Hardal - Medium]]></title>
        <description><![CDATA[Hardal is server-side and first-party measurement platform for cookieless, server-to-server gateway and more user privacy. And we share our product and industry knowledge. - Medium]]></description>
        <link>https://medium.com/usehardal?source=rss----cad02c24240d---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Hardal - Medium</title>
            <link>https://medium.com/usehardal?source=rss----cad02c24240d---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 09:45:00 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/usehardal" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How we know AI agent traffic from real users]]></title>
            <link>https://medium.com/usehardal/how-we-know-ai-agent-traffic-from-real-users-7061a6c097ce?source=rss----cad02c24240d---4</link>
            <guid isPermaLink="false">https://medium.com/p/7061a6c097ce</guid>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[hardal]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Mert Enercan]]></dc:creator>
            <pubDate>Mon, 22 Jun 2026 11:16:08 GMT</pubDate>
            <atom:updated>2026-06-22T11:16:06.759Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Your analytics dashboard says 50,000 page views yesterday. Cool. How many were actual humans, and how many were a bot farm in Virginia, or an AI crawler doing a vibe check on your </em><em>/pricing page?</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*VbBKiCKnkApviN55" /></figure><h3>The problem nobody talks about at standup</h3><p>Traffic spikes feel great until you realize half the “visitors” never had eyeballs on your site. Bots, monitors, scrapers, and now AI agents crawl public pages constantly — often from cloud subnets that look nothing like a person on a couch with an iPhone.</p><p>The hard question isn’t “did someone hit this URL?” It’s:</p><ul><li>Was it a <strong>real user</strong>?</li><li>Was it <strong>some bot</strong>?</li><li>Was it an <strong>AI agent</strong> specifically?</li></ul><p>We built a pipeline to answer that. Not with vibes — with a funnel. Real users get silently ignored. Bots get classified. AI bots get labeled. Everything lands in analytics where you can actually chart it.</p><p><strong>Want this on your site without wiring it yourself?</strong> <a href="https://usehardal.com/waitlist?utm_source=linkedin&amp;utm_medium=referral&amp;utm_campaign=june_ai_visibility&amp;utm_content=merto">Join the Hardal AI Visibility beta waitlist</a> — first-party, server-side visibility into which AI agents are hitting your pages.</p><h3>The front door: POST /agent-events</h3><p>This isn’t a firehose for every page view. It’s a narrow pipe: your edge layer or SDK sends a JSON payload when it spots automated traffic worth logging.</p><p><strong>Headers</strong></p><ul><li>tenant-id — which customer’s data warehouse this belongs to</li></ul><p><strong>Body</strong></p><p>FieldWhat it ispathThe URL that got hitipClient IPuserAgentThe classic Mozilla/5.0 (compatible; SomeBot/1.0) stringeventTimeWhen it happenedsourceIdWhich tracker or source fired the event</p><p>Everything that follows runs through a stack of middleware before the handler even touches the payload.</p><h3>Gate 1: Are you even a bot?</h3><p>First filter: <strong>automated traffic detection</strong>.</p><p>Normal Chrome, Safari, Firefox user agents? <strong>Rejected.</strong> Not with a loud error — with a silent <strong>204 No Content</strong>. Gone. Poof.</p><p>Real users don’t belong in this pipeline. We don’t waste cycles logging them or yelling about it.</p><p>Only traffic that already smells automated gets through.</p><blockquote><em>If your grandma is browsing on Safari, she never touches our bot database. That’s the point.</em></blockquote><h3>Gate 2: Is that IP actually bot infrastructure?</h3><p>Second filter: <strong>IP allowlist</strong>.</p><p>The ip in the body gets checked against a curated allowlist of known web crawler and bot datacenter IPs — maintained and refreshed on our side, with caching so lookups stay fast.</p><p>Random home broadband claiming to be Googlebot? <strong>Also ghosted</strong> — 204 again.</p><p>This keeps the dataset honest. We’re not trying to log every bot <em>claim</em> on the internet. We want traffic that plausibly came from bot-shaped infrastructure.</p><h3>Gate 3: OK, you’re a bot on a bot IP — but which bot?</h3><p>Now the handler does two things:</p><ol><li><strong>Classify</strong> the user agent string</li><li><strong>Store</strong> the result in our analytics store</li></ol><p>Every request that makes it here is already labeled <strong>bot</strong>. That’s the baseline — you passed the gates, you’re automated.</p><p>Then we layer on more signal.</p><h3>Crawler vibes</h3><p>If the UA string contains words like crawl, spider, slurp, or indexer, we add a <strong>crawler</strong> label.</p><p>Classic SEO bot energy. Helpful for segmentation even before we name the specific agent.</p><h3>Signature matching — the heavy lifting</h3><p>We don’t guess from one regex. We run the user agent through <strong>multiple signature catalogs</strong> in parallel — substring matches, regex patterns, and curated bot hint lists we keep up to date.</p><p>Each catalog can return a possible match with a confidence score. We pick the <strong>best match</strong> — longest and most specific wins when signatures overlap.</p><h3>The AI distinction</h3><p>Here’s where “bot” becomes “AI bot.”</p><p>Certain categories from the signature catalogs get flagged as AI-related:</p><ul><li><strong>AI Agent</strong></li><li><strong>AI Assistant</strong></li><li><strong>AI Data Scraper</strong></li><li><strong>AI Search Crawler</strong></li></ul><p>When the best match lands in one of those buckets, we add an <strong>ai</strong> label and store metadata:</p><ul><li><strong>platform</strong> — who built it</li><li><strong>agent</strong> — the specific bot name</li><li><strong>aiAgentCategory</strong> — what kind of AI traffic it is</li></ul><p>So you’re not just counting “bot hits.” You’re counting <strong>“PerplexityBot scraped </strong><strong>/blog at 3am”</strong> vs <strong>“Googlebot indexed </strong><strong>/blog at 3am”</strong> vs <strong>“some random uptime monitor pinged </strong><strong>/health.”</strong></p><p>That’s the difference between a vanity metric and something you can actually explain in a board meeting.</p><h3>What gets stored</h3><p>Each accepted event becomes a row in our analytics pipeline:</p><ul><li>Page path and timestamp</li><li>is_bot / is_ai flags</li><li>Agent name, platform, and category</li><li>Tenant and source ID</li></ul><p>That’s what you chart: AI crawler traffic over time, which pages AI agents love, whether your /docs section is getting scraped more than your homepage — that kind of thing.</p><blockquote><strong><em>See it in a dashboard, not a SQL console.</em></strong><em> We’re opening early access to </em><strong><em>AI Visibility</em></strong><em> on Hardal — the same first-party, server-side signal, packaged for teams who’d rather know </em>which<em> AI agents visited </em><em>/pricing than guess from a traffic spike.<br></em><a href="https://usehardal.com/waitlist?utm_source=blog_merto_1&amp;utm_medium=referral&amp;utm_campaign=june_ai_visibility&amp;utm_content=merto"><strong><em>Join the waitlist →</em></strong></a></blockquote><h3>The whole flow</h3><pre>Request comes in<br>       │<br>       ▼<br>  tenant-id valid? ──no──► error<br>       │ yes<br>       ▼<br>  userAgent a bot? ──no──► 204 (real user, ignored)<br>       │ yes<br>       ▼<br>  IP on bot allowlist? ──no──► 204 (sketchy bot claim, ignored)<br>       │ yes<br>       ▼<br>  Classify UA across signature catalogs<br>       │<br>       ▼<br>  Tag: bot + maybe crawler + maybe AI<br>       │<br>       ▼<br>  Write to analytics → return labels in JSON</pre><p>Three gates. Multiple signature catalogs. One analytics table. Zero confused grandmas in the bot report.</p><h3>TL;DR</h3><p><strong>Real users</strong> → filtered out silently at the bot gate. They never pollute the dataset.</p><p><strong>Fake bots / random IPs</strong> → filtered at the IP gate. Also silent.</p><p><strong>Actual bots on known infra</strong> → classified, named, and tagged — including whether they’re AI-related.</p><p>We’re not trying to catch every bot on earth. We’re building a <strong>clean signal layer</strong> for automated traffic that matters — with enough detail to tell your CEO that yes, traffic is up, but 40% of it is AI crawlers, not customers.</p><h3>Get early access</h3><p><a href="https://usehardal.com/waitlist?utm_source=blog_merto_1&amp;utm_medium=referral&amp;utm_campaign=june_ai_visibility&amp;utm_content=merto"><strong>Hardal AI Visibility</strong></a> is in beta. See which AI agents visit your site using first-party, server-side data — no spam, just early-access updates.</p><p><a href="https://usehardal.com/waitlist?utm_source=blog_merto_1&amp;utm_medium=referral&amp;utm_campaign=june_ai_visibility&amp;utm_content=merto"><strong>Join the waitlist</strong></a></p><p><em>This pipeline powers agent detection behind the scenes at </em><a href="https://usehardal.com/"><em>Hardal</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7061a6c097ce" width="1" height="1" alt=""><hr><p><a href="https://medium.com/usehardal/how-we-know-ai-agent-traffic-from-real-users-7061a6c097ce">How we know AI agent traffic from real users</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[Chrome’s New Console Warning About Third-Party Cookies]]></title>
            <link>https://medium.com/usehardal/chromes-new-console-warning-about-third-party-cookies-de2e63ffb52a?source=rss----cad02c24240d---4</link>
            <guid isPermaLink="false">https://medium.com/p/de2e63ffb52a</guid>
            <category><![CDATA[third-party-cookie]]></category>
            <category><![CDATA[first-party-data]]></category>
            <category><![CDATA[first-party-cookie]]></category>
            <category><![CDATA[analytics]]></category>
            <dc:creator><![CDATA[Mert Enercan]]></dc:creator>
            <pubDate>Fri, 28 Mar 2025 13:21:11 GMT</pubDate>
            <atom:updated>2025-03-28T13:21:11.141Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello, mighty internet!</p><p>If you’ve been checking your browser’s DevTools lately, you might have noticed a new warning message popping up in the console:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*BXe4H8nu3ooZOSKYO1EsOQ.png" /></figure><p>Alongside this message, there’s also a <strong>cookie icon</strong> (🟤) that, when clicked, opens the <strong>Privacy and security </strong>section in DevTools — giving users a quick way to inspect cookie usage on their website.</p><p>So, what’s this all about? Let’s break it down.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/767/1*afB_EbvUv71NnYY2QO6-kA.png" /></figure><h3>What Are Third-Party Cookies?</h3><p>Third-party cookies are cookies set by domains other than the one the user is currently visiting. They’re commonly used for cross-site tracking, advertising, and analytics.</p><p>For example:</p><ul><li>You’re on example.com</li><li>A third-party script from tracker.com sets a cookie</li><li>That’s a <strong>third-party cookie</strong></li></ul><p>These cookies have been <strong>a cornerstone of web advertising and tracking for over two decades</strong>, but they also raise significant <strong>privacy concerns</strong>.</p><h3>Why Is Chrome Moving Away From Them?</h3><p>In an effort to create a <strong>more private web</strong>, Chrome has announced that it will <strong>phase out third-party cookies</strong> and instead introduce <strong>Privacy Sandbox</strong> technologies like:</p><ul><li><a href="https://developers.google.com/privacy-sandbox/cookies/related-website-sets">Related Website Sets </a>(Former First-Party Sets)</li><li><a href="https://developers.google.com/privacy-sandbox/private-advertising/protected-audience">Protected Audience API</a></li><li><a href="https://developers.google.com/privacy-sandbox/private-advertising/topics">Topics API</a></li><li>and more..</li></ul><p>This change puts <strong>control back in the hands of the user</strong>, allowing them to <strong>opt-out</strong> of cross-site tracking mechanisms.</p><h3>This is important for you</h3><p>If your website or application depends on any of the following, <strong>this change will have a direct impact</strong> on your functionality, data accuracy, and user experience:</p><ul><li><strong>Third-Party Tracking</strong><br> If you use third-party scripts (e.g., ad networks, analytics platforms, social media embeds) that set cookies across multiple domains, those cookies will no longer work as expected. You’ll lose the ability to track users across sessions or websites.</li><li><strong>Ad Personalization</strong><br> Personalized ad campaigns that rely on third-party identifiers (e.g., cookies set by ad tech platforms) will become less effective or even non-functional. This may lead to reduced ad performance and lower revenue.</li><li><strong>Cross-Site Login or Session Management</strong><br> If your login system depends on a central auth domain (e.g., auth.example.com) setting cookies that are read by other domains (e.g., shop.example.com), these sessions might break without first-party alternatives like token-based auth or same-site cookies.</li></ul><p>By identifying where your systems rely on third-party cookie behavior, you can <strong>start planning a migration strategy</strong> — whether that’s moving to <strong>first-party storage</strong>, rethinking your <strong>auth flow</strong>, or integrating with new <strong>Privacy Sandbox APIs</strong>.</p><h3>Conclusion</h3><p>Chrome’s warning is more than just a heads-up — it’s a signal that the web is evolving toward a more privacy-respecting future. As a developer, this is your opportunity to <strong>review, adapt, and modernize</strong> how your site or services handle user data. By auditing third-party dependencies now and exploring alternatives like the Privacy Sandbox APIs, you can stay ahead of breaking changes and build trust with your users.</p><p>One of the key shifts is the <strong>need to rely on first-party domains</strong> instead of third-party ones. This is because:</p><ul><li><strong>Third-party cookies will be blocked</strong>, making any cross-site tracking or session logic unreliable.</li><li><strong>First-party storage (cookies or localStorage)</strong> ensures data remains accessible within your domain context.</li><li><strong>Security and privacy standards</strong> are increasingly favoring first-party models to reduce tracking across the web.</li></ul><p>By moving to a first-party approach, you gain <strong>more control</strong>, <strong>longer-term stability</strong>, and <strong>compliance with upcoming browser policies</strong>.</p><p><strong>The sooner you prepare, the smoother the transition will be.</strong></p><p>Untill next time,</p><p>cya.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=de2e63ffb52a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/usehardal/chromes-new-console-warning-about-third-party-cookies-de2e63ffb52a">Chrome’s New Console Warning About Third-Party Cookies</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[122 Milyon Satır Analytics Datasını Nasıl Türkiye’ye Getirdik?]]></title>
            <link>https://medium.com/usehardal/122-milyon-sat%C4%B1r-analytics-datas%C4%B1n%C4%B1-nas%C4%B1l-t%C3%BCrkiyeye-getirdik-58cf10dbc58a?source=rss----cad02c24240d---4</link>
            <guid isPermaLink="false">https://medium.com/p/58cf10dbc58a</guid>
            <category><![CDATA[clickhouse]]></category>
            <category><![CDATA[analytics]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[data-transfer]]></category>
            <category><![CDATA[hardal]]></category>
            <dc:creator><![CDATA[Mert Enercan]]></dc:creator>
            <pubDate>Wed, 26 Feb 2025 12:49:59 GMT</pubDate>
            <atom:updated>2025-02-26T12:49:59.676Z</atom:updated>
            <content:encoded><![CDATA[<p>Selam!</p><p>Yakın zaman içerisinde <strong>Google Cloud — EU</strong> sunucularından, KVKK Yurt Dışı Veri Aktarım politikalarınca Hardal’ın Türkiye sunucuları için kullandığı <strong>Huawei Cloud — Istanbul</strong> sunucularına transfer ettiğimiz <strong>122 Milyon</strong> satır analytics datasının transfer sürecinden bahsedeceğim.</p><p><strong>Özetle:</strong></p><p>Tablo yapılarımızı değerlendirerek iki seçenek arasından karar verdik ve sunucular arası transferi, <strong>ClickHouse</strong>’un yerel tablo transfer fonksiyonunu kullanarak gerçekleştirdik. Bu süreç yaklaşık 24 saat sürdü ve akıl sağlığımızdan bir miktar götürdü.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*ZUO4JRmgvUA_EDr4qWlgqQ.png" /></figure><p>Transfer sürecinden önce mevcut tablo yapımızdan ve önümüzdeki seçeneklerden bahsetmem gerek:</p><h3>Tablo Yapımız</h3><p>Sunucularımızda veritabanı olarak ClickHouse’un <strong>MergeTree Engine</strong> tablolarını kullanıyoruz. Toplamda dört tablomuz bulunuyor: Analytics, Config, Telemetry ve iki adet optimize edilmiş <strong>Materialized View</strong>. ClickHouse’u tercih etmemizin en önemli nedenlerinden biri, aşağıda PostgreSQL ile yapılan karşılaştırmada da görebileceğiniz performans farkı. 👇<a href="https://clickhouse.com/comparison/postgresql">Detaylar burada</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/1*X2sX3_52CVRlvVy6NsVDQA.png" /></figure><p>Tüm event verileri ham (raw) biçimde <strong>analytics</strong> tablosunda saklanıyor. Daha verimli okuma işlemleri için, bu ham veriyi iki ayrı tabloya aktardığımız bir optimizasyon sürecimiz var. Yani <strong>analytics</strong> tablosuna gelen her veri, otomatik olarak belirttiğim iki <strong>Materialized View</strong> tablosuna formatlanarak yazılıyor.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x7rFq71t7a2qZpQ42CAD-g.png" /></figure><h3>Transfer Süreci</h3><p>Gelelim zurnanın zort dediği yere. Transfer süreci.</p><p>Aslında bu süreç genellikle sorunsuz ilerliyor, ancak konu 120 milyon gibi devasa bir veri hacmi olunca işler biraz karmaşık hale geliyor. Bu noktada önümüzde iki seçenek vardı:</p><p>1 — Mevcut dataları exportlayıp (CSV ya da native sql) yeni sunucu içine manual aktarmak</p><p>2 — Clickhouse’un native transfer fonksiyonlarını kullanıp otomatik bir şekilde sürecin tamamlanmasını beklemek</p><p>İlk olarak birinci yöntemi denedik. Ancak verinin büyüklüğü nedeniyle manuel dışa aktarma yönteminin sonucunu ancak çocuklarımızın görebileceğini fark edince, ikinci seçeneğe yönelmeye karar verdik.</p><p>Bu noktada tablo yapımızın büyük avantajını gördük. <strong>Materialized View</strong> tabloları, <strong>analytics</strong> tablosunu otomatik olarak inheritlediği için, aslında yalnızca <strong>analytics</strong> tablosunu transfer etmek, tüm tabloların otomatik olarak doldurulmasını sağlayacaktı.</p><p>Plan harikaydı, ve hemen aksiyon almaya başladık.</p><blockquote>INSERT INTO remote(‘destination_ip:port’, ‘default.table_name’, ‘username’, ‘password’)<br>SELECT * FROM target_table_name ;</blockquote><p>Bu yöntemi kullanarak işlemi başlattık. İşlemin %1’inin tamamlanması yaklaşık 5 dakika sürdü. Basit bir matematikle hesapladığımızda (5 × 100), işlemin yaklaşık 500 dakika (~8 saat) içinde tamamlanacağını öngördük.</p><blockquote>Gece yatarken bırakırız, sabah olur işte.</blockquote><p>Tabiki de öyle olmadı :D</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*7KixFt4tkO8rQk-0hojVYQ.png" /></figure><p>Google Cloud’un tarayıcı tabanlı SSH bağlantısı bu kadar uzun süren işlemleri desteklemiyordu ve sık sık <strong>timeout</strong> hatası alıyorduk. Ancak asıl sorun bu değildi. Zamanla yarışıyorduk — her geçen saniye <strong>analytics</strong> tablosuna binlerce yeni satır ekleniyor ve bu da transfer sürecinin giderek uzaması anlamına geliyordu.</p><p>Üst üste yaşadığımız 3–4 başarısız denemenin (fazladan 24 saat kayıp) ardından artık daha sağlam bir yöntem deneme zamanı gelmişti. Bu yüzden, <strong>tarayıcı tabanlı SSH yerine doğrudan kendi terminalimizden SSH bağlantısı kurarak</strong> süreci yeniden başlattık.</p><h3>Neden Kendi Terminalimizden SSH Bağlantısı Daha Sağlıklı?</h3><ul><li>Google Cloud’un <strong>tarayıcı tabanlı SSH</strong> bağlantıları, belirli bir süre işlem yapılmadığında <strong>otomatik olarak kapanır (timeout)</strong>. Uzun süren işlemler için bu büyük bir dezavantajdır.</li><li><strong>Lokal terminal üzerinden yapılan SSH bağlantıları</strong>, timeout sınırlarına takılmadan kesintisiz çalışabilir.</li><li>Tarayıcıdan yapılan SSH bağlantıları <strong>ağ kesintilerine ve sekme kapanmalarına karşı daha hassastır</strong>.</li><li>Lokal terminalden bağlandığımızda, ağ dalgalanmalarına rağmen bağlantıyı sürdürebiliriz.</li><li><strong>tmux veya screen</strong> gibi araçlar kullanarak bağlantıyı kopsa bile işlemi arka planda çalıştırabiliriz.</li><li>Tarayıcı kapansa bile süreç devam eder.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/569/1*IsN8HRo0xnrv2NAb5K3ugA.png" /></figure><p>12 saatin sonunda transferin %50’si tamamlanmıştı ve artık <strong>timeout</strong> problemi yaşamıyorduk. Süreç sorunsuz ilerliyordu.</p><p>Ancak, <strong>“Kaçırdığımız 24 saat içinde ne kadar veri eklenmiş olabilir ki?”</strong> sorusunu fazlasıyla hafife aldık.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/728/1*1rzZcV2Lty66Ouje0-pRRQ.png" /></figure><p>Ve zafer! 🎉 Yaklaşık <strong>24 saat</strong> sonunda, tüm verileri <strong>Google Cloud’un Avrupa sunucularından</strong> <strong>Huawei Cloud’un Türkiye sunucularına</strong> başarıyla taşıdık. Bu süreç boyunca yaşadığımız tüm zorluklara rağmen, sonunda transferi tamamlamış olmanın haklı gururunu yaşadık. 🚀</p><p>Bize de on numara bir anı kalmış oldu.</p><p>Daha <strong>optimize</strong> bir çözüm mümkün müydü? <strong>Tabii ki.</strong><br>Sonuca ulaştık mı? <strong>Kesinlikle.</strong></p><p>🎯 <strong>Mission completed.</strong> 🚀</p><p>Sevgiler ve saygılar</p><p>by.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=58cf10dbc58a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/usehardal/122-milyon-sat%C4%B1r-analytics-datas%C4%B1n%C4%B1-nas%C4%B1l-t%C3%BCrkiyeye-getirdik-58cf10dbc58a">122 Milyon Satır Analytics Datasını Nasıl Türkiye’ye Getirdik?</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 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----cad02c24240d---4</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----cad02c24240d---4</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[Server-side GTM With Azure App Service]]></title>
            <link>https://medium.com/usehardal/server-side-gtm-with-azure-app-service-02047bc59bba?source=rss----cad02c24240d---4</link>
            <guid isPermaLink="false">https://medium.com/p/02047bc59bba</guid>
            <category><![CDATA[google-tag-manager]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[usehardal]]></category>
            <category><![CDATA[gtm-server-side]]></category>
            <category><![CDATA[cloud]]></category>
            <dc:creator><![CDATA[Mert Enercan]]></dc:creator>
            <pubDate>Fri, 18 Oct 2024 10:58:59 GMT</pubDate>
            <atom:updated>2024-10-18T10:58:59.126Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello, everyone!</p><p>Explore implementing server-side Google Tag Manager using Azure App Service, using Hardal for improved performance, better data accuracy, and enhanced user privacy.</p><p><strong>TL:DR<br></strong>We create a container registry and a <a href="https://azure.microsoft.com/en-us/products/container-apps">container app</a> on Azure. After that, we map the container app to our desired custom domain. You can accomplish this with a single click on <a href="https://usehardal.com/"><em>Hardal</em></a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mwJlIyzXsU9b0N1qj2zQXQ.png" /><figcaption>Your Server-side GTM Container is one-click away!</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WKXTK56cQrIsWug2mzaBow.png" /></figure><h3>The Plan</h3><ul><li>Create a server-side GTM and obtain a configuration key</li><li>Set up a server-side GTM <a href="https://azure.microsoft.com/en-us/products/container-registry">container registry</a> on Azure.</li><li>Create a container app on Azure that runs the server-side GTM registry.</li><li>Map a custom domain to the server-side GTM container app.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/0*xwk2Mg_63QGSHDzs.png" /></figure><p>As always, let’s start with the basics of server-side GTM infrastructure. This diagram is from the official <a href="https://developers.google.com/tag-platform/tag-manager/server-side/manual-setup-guide">Google documentation</a>. I won’t go into the details of how it works, but it’s essential to understand the framework of what we are doing.</p><h3><strong>Deployment Details</strong></h3><p>We need to focus on two important topics when deploying our container:</p><ol><li>We need to set the Ingress value to &quot;enabled&quot; to access our Container App with a domain.</li><li>We need two container apps: one for the preview server and one for the tagging server. Environment values vary depending on the container type.</li></ol><p>Preview Server Environment Variables</p><ul><li>CONTAINER_CONFIG=&#39;&lt;config string&gt;&#39;</li><li>RUN_AS_PREVIEW_SERVER=true</li></ul><p>Tagging Server Environment Variables</p><ul><li>CONTAINER_CONFIG=&#39;&lt;config string&gt;&#39;</li><li>PREVIEW_SERVER_URL=&#39;&lt;HTTPS preview server url&gt;&#39;</li></ul><h3><strong>DNS Mapping</strong></h3><p>For the final step, we need to configure our domain to point to the container app. By selecting “Managed Certificate,” we need to add two DNS records to our domain.</p><pre>Type: CNAME<br>Name: www or {subdomain}<br>Value: &lt;DNS VALUE THAT AZURE PROVIDES&gt;<br><br>Type: TXT<br>Name: asuid.www or asuid.{subdomain}<br>Value: &lt;DNS VALUE THAT AZURE PROVIDES&gt;</pre><p>After a short delay, our container will be accessible via our custom domain!</p><p>With everything set up, you’re now ready to leverage server-side GTM on Microsoft Azure with your custom domain. This setup not only enhances your tracking capabilities but also ensures better performance and flexibility. Happy tracking!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=02047bc59bba" width="1" height="1" alt=""><hr><p><a href="https://medium.com/usehardal/server-side-gtm-with-azure-app-service-02047bc59bba">Server-side GTM With Azure App Service</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[Server-side GTM With Yandex Cloud]]></title>
            <link>https://medium.com/usehardal/server-side-gtm-with-yandex-cloud-7480d8657885?source=rss----cad02c24240d---4</link>
            <guid isPermaLink="false">https://medium.com/p/7480d8657885</guid>
            <category><![CDATA[google-tag-manager]]></category>
            <category><![CDATA[gtm-server-side]]></category>
            <category><![CDATA[yandex-cloud]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[usehardal]]></category>
            <dc:creator><![CDATA[Mert Enercan]]></dc:creator>
            <pubDate>Fri, 18 Oct 2024 10:58:28 GMT</pubDate>
            <atom:updated>2024-10-18T10:58:27.975Z</atom:updated>
            <content:encoded><![CDATA[<p>Greetings, internet!<br>Since Server-Side GTM can operate as a simple Docker image, we’ve decided to expand our cloud provider options to include Yandex Cloud, in addition to Azure, GCP, and AWS. Today, I’d like to share how we made this happen!</p><p>First, let’s dive into how the <a href="https://developers.google.com/tag-platform/tag-manager/server-side/manual-setup-guide">Manual Setup</a> works with Server-Side Google Tag Manager. I’ll be using some helper images from the official Google Docs after listing what we need in bullet points.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zCyrqKvof2QYFclwqKzmZA.png" /><figcaption>Your Server-side GTM Container is one-click away!</figcaption></figure><h3>What we need</h3><ul><li>Server-side GTM Container, obviously xd <em>(if you don’t have one, make it happen with </em><a href="https://usehardal.com/"><em>Hardal</em></a><em> for </em><strong><em>free</em></strong><em>)</em></li><li>Custom Domain</li><li>Yandex Cloud account</li></ul><p>With these ingredients and a bit of Hardal magic, we’re able to deploy our server-side Google Tag Manager on Yandex Cloud.</p><h3><strong>Structure of Server-side Google Tag Manager</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/758/0*xwk2Mg_63QGSHDzs.png" /></figure><p>This diagram essentially shows how it works. You’re already familiar with how Web GTM operates, but now it’s time to move it to the server that Hardal provides on Yandex Cloud.</p><h3>Flowchart</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FR0kPYUYxLfwgB5mYp6W4w.png" /></figure><p>Let’s start with the first step: creating a Serverless Container on Yandex Cloud that runs the Server-Side Google Tag Manager image. To accomplish this, we’ve created a <a href="https://yandex.cloud/en/docs/container-registry/">Container Registry</a> for the sGTM image. Now, we’re ready to create our Serverless Container.</p><p><em>Remember, we need Preview Server and Tagging Server</em></p><p>For the preview server, we ran the sGTM registry with the RUN_AS_PREVIEW_SERVER=true variable.</p><p>After successfully deploying the Preview Server image, we’re now ready to map a custom URL to the container. While Yandex Cloud doesn’t provide a direct way to manage domains for your containers, there’s no such thing as “impossible.” So, we found a workaround to make it happen.</p><h3><strong>Solution</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/0*zgRxvfB0BstyWDnR" /></figure><p>The plan was to create an <a href="https://yandex.cloud/en/docs/api-gateway/">API Gateway</a> and integrate it with the sGTM container. Instead of mapping the custom domain directly to the container, we mapped it to the API Gateway and connected the container to the gateway. After generating a Let’s Encrypt certificate for our custom domain, we were nearly at the final result. It was time to map our domain to the API Gateway.</p><p>The tricky part is that you can connect the domain <a href="http://www.example.com/"><strong>www.example.com</strong></a>, but not <strong>example.com</strong>. This is due to how CNAME records are processed by DNS hosting. To resolve this, we created an ANAME DNS record on <a href="https://yandex.cloud/en/docs/dns/concepts/resource-record#aname">Yandex Cloud DNS.</a></p><p>With the configurations provided below, our API Gateway is now ready to use with a custom domain and serverless container. 🎊</p><pre>/{proxy+}:<br>    x-yc-apigateway-any-method:<br>      x-yc-apigateway-integration:<br>        type: serverless_containers<br>        container_id: containerID<br>        service_account_id: serviceAccountID</pre><p>Now we have the sGTM Preview Server with a custom domain working on Yandex Cloud. For the Tagging Server, we follow the same process, but instead of using the RUN_AS_PREVIEW_SERVER=true variable, we need to use the PREVIEW_SERVER_URL=&#39;&lt;HTTPS preview server URL&gt;&#39; variable for the registry deployment.</p><p>Until next time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7480d8657885" width="1" height="1" alt=""><hr><p><a href="https://medium.com/usehardal/server-side-gtm-with-yandex-cloud-7480d8657885">Server-side GTM With Yandex Cloud</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[Server-side GTM With Huawei]]></title>
            <link>https://medium.com/usehardal/server-side-gtm-with-huawei-a94905dad35b?source=rss----cad02c24240d---4</link>
            <guid isPermaLink="false">https://medium.com/p/a94905dad35b</guid>
            <category><![CDATA[server-side]]></category>
            <category><![CDATA[google-tag-manager]]></category>
            <category><![CDATA[huawei-cloud]]></category>
            <category><![CDATA[usehardal]]></category>
            <dc:creator><![CDATA[Mert Enercan]]></dc:creator>
            <pubDate>Fri, 18 Oct 2024 10:58:06 GMT</pubDate>
            <atom:updated>2024-10-18T10:58:06.815Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello everyone!</p><p>Let’s explore implementing server-side Google Tag Manager using Huawei Cloud Turkey, using <a href="https://usehardal.com/">Hardal</a> for improved performance, better data accuracy, and enhanced user privacy.</p><h3><strong>TLDR</strong></h3><p>We utilized <a href="https://www.huaweicloud.com/intl/tr-tr/product/cci.html">Cloud Container Instance</a> (CCI) to deploy the server-side GTM container image, configured <a href="https://www.huaweicloud.com/intl/tr-tr/product/elb.html">Elastic Load Balancer</a> (ELB) and CCI Service for each workload, and created a DNS record using the ELB public IP.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X1MIJHuNunGqWz8lZAcLHA.jpeg" /></figure><h3>The Plan</h3><p>At the end of the day, we require a total of two running containers for the server-side Google Tag Manager.</p><ul><li>One for Preview Server</li><li>One for Tagging Server</li></ul><p>For this project, we chose to utilize the Cloud Container Instance (CCI) service on Huawei Cloud. This service is designed to run containerized applications, which perfectly aligns with our requirements. For more detailed information on how server-side Google Tag Manager functions, please refer to the <a href="https://developers.google.com/tag-platform/tag-manager/server-side/manual-setup-guide">official documentation</a>.</p><p>Here is the full workflow:</p><p>1 — Import the Google Tag Manager image into Huawei Cloud’s <a href="https://www.huaweicloud.com/intl/tr-tr/product/swr.html">Software Repository for Container</a> (SWR).</p><p>2 — Set up a Preview Server CCI Workload using the imported SWR image.</p><p>3 — Configure Elastic Load Balancer (ELB) for the Preview Server workload</p><p>4 —Create a DNS record for the Preview Server.</p><p>5 — Deploy the Preview Server using CCI.</p><p>With these five steps, the preview server is successfully running on Huawei Cloud! We will repeat this process for our tagging server, with the only difference being that we will use the preview server’s URL as an environment variable in the tagging server’s image. Here’s the flowchart:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kc09v0pRpEw4Dq86CNwXDw.png" /></figure><h3><strong>Managing SSL Certificates</strong></h3><p>Managing SSL certificates for the custom domain was the most challenging part of the entire process. Fortunately, with <a href="https://certbot.eff.org/">Certbot </a>and <a href="https://letsencrypt.org/tr/">Let’s Encrypt</a>, we are able to generate free SSL certificates and store them in Huawei Cloud, allowing us to incorporate them into our CCI service configuration files.</p><p>In conclusion, the successful implementation of server-side Google Tag Manager on Huawei Cloud would not have been possible without the support of the Huawei team. Their assistance and expertise have been invaluable throughout this process. We are grateful for their guidance, which has significantly contributed to our project’s success. Thank you, Huawei team, for your continued support!</p><p>Until next time!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a94905dad35b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/usehardal/server-side-gtm-with-huawei-a94905dad35b">Server-side GTM With Huawei</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[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----cad02c24240d---4</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----cad02c24240d---4</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>
    </channel>
</rss>