193 lines
30 KiB
HTML
193 lines
30 KiB
HTML
<!DOCTYPE html><html lang="en"> <head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script>window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}
|
||
gtag("consent","default",{ad_storage:"denied",analytics_storage:"denied",ad_user_data:"denied",ad_personalization:"denied",wait_for_update:500,region:["AT","BE","BG","HR","CY","CZ","DK","EE","FI","FR","DE","GR","HU","IE","IT","LV","LT","LU","MT","NL","PL","PT","RO","SK","SI","ES","SE","IS","LI","NO","GB"]});
|
||
gtag("consent","default",{ad_storage:"granted",analytics_storage:"granted",ad_user_data:"granted",ad_personalization:"granted"});
|
||
window._hsp=window._hsp||[];
|
||
window._hsp.push(["addPrivacyConsentListener",function(consent){var cat=consent&&consent.categories;var analytics=!!(cat&&cat.analytics);var ads=!!(cat&&cat.advertisement);gtag("consent","update",{analytics_storage:analytics?"granted":"denied",ad_storage:ads?"granted":"denied",ad_user_data:ads?"granted":"denied",ad_personalization:ads?"granted":"denied"});}]);</script><script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer',"GTM-TX44QHS2");</script><script>window.disableHubSpotCookieBanner=true;</script><!-- If you POST via Forms API, disable HubSpot “Collect data from website forms” (Settings → Marketing → Forms → Non-HubSpot Forms) or you’ll get duplicate submissions from tracking. --><script type="text/javascript" id="hs-script-loader" async defer src="https://js-na2.hs-scripts.com/243729089.js"></script><title>You own all the risk for AI Code | Heinrich Hartmann | Herald Blog</title><meta name="description" content="AI changes how we write code, but not who is responsible. Heinrich Hartmann explains why AI engineering needs more tests and design rigor."><link rel="canonical" href="https://herald.dev/blog/i-dont-care-if-ai-wrote-the-code-you-own-it/"><!-- Open Graph --><meta property="og:type" content="website"><meta property="og:site_name" content="Herald"><meta property="og:title" content="You own all the risk for AI Code | Heinrich Hartmann | Herald Blog"><meta property="og:description" content="AI changes how we write code, but not who is responsible. Heinrich Hartmann explains why AI engineering needs more tests and design rigor."><meta property="og:url" content="https://herald.dev/blog/i-dont-care-if-ai-wrote-the-code-you-own-it/"><meta property="og:image" content="https://herald.dev/og-default.png"><meta property="og:image:width" content="1200"><meta property="og:image:height" content="630"><!-- Twitter / X --><meta name="twitter:card" content="summary_large_image"><meta name="twitter:title" content="You own all the risk for AI Code | Heinrich Hartmann | Herald Blog"><meta name="twitter:description" content="AI changes how we write code, but not who is responsible. Heinrich Hartmann explains why AI engineering needs more tests and design rigor."><meta name="twitter:image" content="https://herald.dev/og-default.png"><link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png"><link rel="icon" href="/favicon.svg" type="image/svg+xml" sizes="any"><link rel="icon" href="/favicon.ico"><link rel="apple-touch-icon" href="/apple-touch-icon.png"><link rel="manifest" href="/site.webmanifest"><meta name="theme-color" content="#F2F3F5" media="(prefers-color-scheme: light)"><meta name="theme-color" content="#0B0E1C" media="(prefers-color-scheme: dark)"><link rel="preconnect" href="https://fonts.googleapis.com"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin><link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet"><link rel="stylesheet" href="/_astro/Footer.D35d5Zyb.css">
|
||
<style>.breadcrumb:where(.astro-mrlui5p2){display:flex;align-items:center;gap:var(--sp-2);font-family:var(--font-mono);font-size:var(--text-xs);color:var(--text-tertiary);margin-bottom:var(--sp-5)}.breadcrumb:where(.astro-mrlui5p2) a:where(.astro-mrlui5p2){color:var(--text-tertiary);transition:color var(--duration-fast) var(--ease-default)}.breadcrumb:where(.astro-mrlui5p2) a:where(.astro-mrlui5p2):hover{color:var(--text-secondary)}.breadcrumb-sep:where(.astro-mrlui5p2){color:var(--border-default)}
|
||
</style>
|
||
<link rel="stylesheet" href="/_astro/_slug_@_@astro.yKHTB8D6.css">
|
||
<style>#hs_show_banner_button,#hs-hud-cookie-settings,#hs-cookie-settings-link,#hs-banner-parent{display:none!important}.consent-banner:where(.astro-2effgw6e){position:fixed;z-index:3000;bottom:var(--sp-6);right:var(--sp-6);width:min(100% - var(--sp-8),22rem);pointer-events:none;opacity:0;transform:translateY(var(--sp-4));transition:opacity var(--duration-mid) var(--ease-default),transform var(--duration-mid) var(--ease-default)}.consent-banner:where(.astro-2effgw6e)[data-visible=true]{pointer-events:auto;opacity:1;transform:translateY(0)}.consent-banner-panel:where(.astro-2effgw6e){background:var(--surface-overlay);border:1px solid var(--border-default);border-radius:var(--radius-md);box-shadow:0 2px 8px #00000014;padding:var(--sp-5);display:flex;flex-direction:column;gap:var(--sp-3)}.consent-banner-eyebrow:where(.astro-2effgw6e){font-family:var(--font-mono);font-size:var(--text-xs);line-height:var(--lh-xs);letter-spacing:.12em;text-transform:uppercase;color:var(--text-secondary)}.consent-banner-title:where(.astro-2effgw6e){font-size:var(--text-sm);line-height:var(--lh-sm);font-weight:600;color:var(--text-primary)}.consent-banner-desc:where(.astro-2effgw6e){font-size:var(--text-sm);line-height:var(--lh-sm);color:var(--text-secondary)}.consent-banner-inline-link:where(.astro-2effgw6e){color:inherit;text-decoration:underline;text-decoration-color:var(--border-default);text-underline-offset:2px;transition:color var(--duration-fast) var(--ease-default)}.consent-banner-inline-link:where(.astro-2effgw6e):hover{color:var(--text-primary)}.consent-banner-actions:where(.astro-2effgw6e){display:flex;flex-wrap:wrap;gap:var(--sp-2);margin-top:var(--sp-1)}.consent-banner-btn:where(.astro-2effgw6e){flex:1 1 auto;justify-content:center;min-width:6.5rem}.consent-banner-btn:where(.astro-2effgw6e):focus-visible{outline:3px solid var(--brand-cta-ring);outline-offset:2px}@media(max-width:768px){.consent-banner:where(.astro-2effgw6e){bottom:0;right:0;left:0;width:auto;transform:translateY(100%)}.consent-banner:where(.astro-2effgw6e)[data-visible=true]{transform:translateY(0)}.consent-banner-panel:where(.astro-2effgw6e){border-radius:var(--radius-md) var(--radius-md) 0 0;border-bottom:none;padding:var(--sp-4) var(--sp-5) var(--sp-5)}.consent-banner-actions:where(.astro-2effgw6e){flex-direction:column}.consent-banner-btn:where(.astro-2effgw6e){width:100%}}
|
||
</style><script type="module" src="/_astro/page.CIKwc7qe.js"></script></head> <body> <noscript> <iframe src="https://www.googletagmanager.com/ns.html?id=GTM-TX44QHS2" height="0" width="0" style="display:none;visibility:hidden" title="Google Tag Manager"></iframe> </noscript> <header class="nav astro-dmqpwcec"> <div class="nav-inner container astro-dmqpwcec"> <a href="/" class="nav-logo astro-dmqpwcec" aria-label="Herald"> <picture class="astro-dmqpwcec"> <source srcset="/brand/Herald_Lockup_White.svg" media="(prefers-color-scheme: dark)" class="astro-dmqpwcec"> <img src="/brand/Herald_Lockup_Black.svg" alt="Herald" height="20" class="astro-dmqpwcec"> </picture> </a> <nav aria-label="Main navigation" class="astro-dmqpwcec"> <ul class="nav-links astro-dmqpwcec"> <li class="astro-dmqpwcec"> <a href="/product" class="nav-link astro-dmqpwcec">Product</a> </li><li class="astro-dmqpwcec"> <a href="/pricing" class="nav-link astro-dmqpwcec">Pricing</a> </li><li class="astro-dmqpwcec"> <a href="/about" class="nav-link astro-dmqpwcec">About</a> </li><li class="astro-dmqpwcec"> <a href="/platform" class="nav-link astro-dmqpwcec">Platform</a> </li><li class="astro-dmqpwcec"> <a href="/docs/" class="nav-link astro-dmqpwcec">Docs</a> </li> </ul> </nav> <div class="nav-ctas astro-dmqpwcec"> <a href="/contact" class="hero-text-link nav-secondary-cta astro-dmqpwcec" data-cta-location="nav_secondary"> Book a Demo </a> <a href="/try" class="btn btn-primary nav-cta astro-dmqpwcec" data-cta-location="nav"> Try for Free </a> </div> <button class="hamburger astro-dmqpwcec" aria-label="Toggle menu" aria-expanded="false" aria-controls="mobile-menu"> <span class="astro-dmqpwcec"></span> <span class="astro-dmqpwcec"></span> <span class="astro-dmqpwcec"></span> </button> </div> <div class="mobile-menu astro-dmqpwcec" id="mobile-menu" hidden> <ul class="mobile-links astro-dmqpwcec"> <li class="astro-dmqpwcec"> <a href="/product" class="mobile-link astro-dmqpwcec">Product</a> </li><li class="astro-dmqpwcec"> <a href="/pricing" class="mobile-link astro-dmqpwcec">Pricing</a> </li><li class="astro-dmqpwcec"> <a href="/about" class="mobile-link astro-dmqpwcec">About</a> </li><li class="astro-dmqpwcec"> <a href="/platform" class="mobile-link astro-dmqpwcec">Platform</a> </li><li class="astro-dmqpwcec"> <a href="/docs/" class="mobile-link astro-dmqpwcec">Docs</a> </li> </ul> <a href="/try" class="btn btn-primary mobile-cta astro-dmqpwcec" data-cta-location="nav_mobile"> Try for Free </a> <a href="/contact" class="hero-text-link mobile-secondary-cta astro-dmqpwcec" data-cta-location="nav_mobile_secondary"> Book a Demo </a> </div> </header> <script type="module">const e=document.querySelector(".hamburger"),i=document.getElementById("mobile-menu");e?.addEventListener("click",()=>{const t=e.getAttribute("aria-expanded")==="true";e.setAttribute("aria-expanded",String(!t)),e.classList.toggle("is-open",!t),t?i?.setAttribute("hidden",""):i?.removeAttribute("hidden")});</script> <main class="astro-4sn4zg3r"> <article class="astro-4sn4zg3r"> <!-- Post header --> <header class="post-header astro-4sn4zg3r"> <div class="post-header-inner container-narrow astro-4sn4zg3r"> <nav class="breadcrumb astro-mrlui5p2" aria-label="Breadcrumb"> <a href="/blog" class="astro-mrlui5p2">Blog</a> </nav> <h1 class="post-title astro-4sn4zg3r">I Don’t Care if AI Wrote the Code. You Own It.</h1> <p class="post-excerpt astro-4sn4zg3r">SREcon Chair Heinrich Hartmann on why the age of AI-assisted engineering demands a radical return to design rigor.</p> <div class="post-meta astro-4sn4zg3r"> <div class="meta-line meta-line--authors astro-4sn4zg3r"> <span class="meta-author astro-4sn4zg3r"> <img src="https://cdn.sanity.io/images/b3uvbvvc/production/9bcd3886060c22273870f55ed0342c5e6ac92fd2-700x467.jpg?rect=117,0,467,467&w=56&h=56&fit=crop" alt="Peter Farago" class="author-avatar astro-4sn4zg3r" loading="lazy"> <span class="meta-author-text astro-4sn4zg3r"> <span class="author-name astro-4sn4zg3r">Peter Farago</span> <span class="meta-sep astro-4sn4zg3r">·</span> <span class="author-role astro-4sn4zg3r">VP Marketing</span> </span> </span> </div> <div class="meta-line astro-4sn4zg3r"> <time datetime="2026-04-07T07:24:00.000Z" class="meta-date astro-4sn4zg3r"> April 7, 2026 </time> </div> </div> </div> </header> <!-- Main image --> <div class="post-hero-shell astro-4sn4zg3r"> <div class="post-hero-image astro-4sn4zg3r"> <img src="https://cdn.sanity.io/images/b3uvbvvc/production/ba00ac2c8e07ef58b8d93557867e1847f17c4630-1536x1024.png?rect=0,109,1536,806&w=1200&h=630&fit=crop" alt="I Don’t Care if AI Wrote the Code. You Own It." loading="eager" class="astro-4sn4zg3r"> </div> </div> <!-- Series banner --> <!-- Body --> <div class="post-body container-narrow astro-4sn4zg3r"> <div class="prose astro-4sn4zg3r"><p><a href="https://www.linkedin.com/in/heinrich-hartmann-b524a076/" target="_blank" rel="noopener noreferrer">Heinrich Hartmann</a> has generated more code in the past two months than in any period of time he can remember. He also hasn’t written more than five lines of it himself.</p><p>During a sabbatical from his role as a Senior Principal SRE, Heinrich went deep on a side project that featured a lot of AI-assisted development. He built a typesetting system on top of MkDocs, patched a Terraform provider via Claude Code to manage conference mailing lists, and wired up integrations that would have taken weeks by hand. The output was real. The code just wasn’t written by hand.</p><p>Code like this is also increasingly getting pushed to production environments. His response: "I don't care who typed the code. You own the code. You are employed for your judgment and your expertise, and you can delegate the doing, but you cannot delegate the ownership or the accountability."</p><p>What AI changes is how fast you can do the parts you're accountable for — the architecture, the validation, the design decisions that determine whether the code holds up.</p><h3><strong>The Abstraction Shift</strong></h3><p>Heinrich describes his AI-assisted workflow like managing a small team: "You basically have three junior programmers, who all have PhDs. But it's their first day." They're fast. They're super capable. And they have no context about your codebase, your conventions, or your business.</p><p>So you manage them the way a good tech lead manages any team. You write ADRs (architecture decision records, the short documents that capture design rationale and constraints so decisions survive beyond the person who made them). You write style guides. You break work into scoped tasks. You define testing requirements. And then you review everything that comes back.</p><p>"I'm not doing anything differently than I would with a team," Heinrich says, "but I'm moving up the abstraction chain. I'm now more of an orchestrator and a manager than I am an executor and a coder."</p><p>If AI shifts engineering toward orchestration, the artifacts that support orchestration become the infrastructure that determines code quality. Not the AI model. Not the prompting technique. The context you feed it.</p><h3><strong>More Code, More Review</strong></h3><p>The productivity gains are real, but so is the cost.</p><p>"I'm never sure what the hell this next model is going to do with my code," Heinrich says. "I'm really tired of debugging stuff that used to work. It was working 20 commits ago, and now it's no longer working. So now I have to guide the language model through a tedious debugging session."</p><p>AI generates code faster than any individual can. But every line still needs to be owned by someone who understands what it does, why it's there, and what breaks if it changes. Volume goes up while familiarity goes down. And the review burden lands entirely on the human.</p><p>Anyone working heavily with AI tools has felt a version of this: AI reduces the cost of production but increases the cost of review, coordination, and decision-making. Each task is faster. The total cognitive load is not lower. It's redistributed toward judgment work, evaluating output you didn't create, which is a fundamentally different kind of effort than creating it yourself.</p><p>Heinrich's response wasn't to slow down. It was to invest more in validation. For one project, a typesetting system of moderate complexity, he wrote 85 integration tests. "Usually I would carefully code this kind of stuff without writing any tests, because I can get it to 'good enough' with half the effort, and it holds up for a long time. But now I’m no longer writing the code, integration tests have become very cheap. And because I don’t trust the code as much, I now need the validation."</p><p>The math is worth sitting with. Before AI, he wrote very few tests for stand-alone side-projects because the code was his and he understood it intimately. With AI, he writes 85 tests, because it’s cheap and effective at meeting the quality bar. Ownership didn't get easier. The effort just moved from writing to reviewing.</p><h3><strong>Design Compounds. Code Doesn't.</strong></h3><p>As AI can handle more of the low-level implementation, engineers are shifting their skillset upward: architecture, system design, understanding how components interact under load and over time.</p><p>John Ousterhout, the Stanford professor behind <em>A Philosophy of Software Design</em>, has argued in recent conversations with the Pragmatic Engineer that this makes design more important at every level of seniority, not just for staff engineers. When a model can generate a function in seconds, the value is in knowing which function to build, how it fits the broader system, and what it implies for future maintainability.</p><p>Heinrich's practice reflects this. His ADRs aren't busywork. They're the interface between his intent and the AI's execution. "You can onboard the model with the intentions from the ADRs. You have the integration test suite, and you're good to go." The decision records serve double duty: they capture design rationale for future human contributors and constrain AI behavior in the current session. Without them, each new model session starts from zero. With them, the work compounds.</p><p>Heinrich extends this to how ADRs get created in the first place: "You don't really produce ADRs by writing them. You produce them by giving the AI notes from a meeting and asking it to summarize and produce it. Or you give it a PDF from 10 years ago and say, scan the code base and summarize this as a style guide." The AI co-creates the documentation that then constrains its own future output. It's a feedback loop, and the engineer's job is to curate it.</p><h3><strong>AI Built It. You Own It.</strong></h3><p>Heinrich's argument about ownership extends naturally to how teams should be organized. He's a firm believer in the you-build-it-you-run-it model, and he sees AI making the case stronger.</p><p>"It should be you build it, you own it, you run it," he says. "This is more of a concern about performance and delivery speed than it is about reliability, because you create so much friction if you do the handover." When the person on call is also the same person who specified the intent, reviewed the AI output, wrote the ADRs, and defined the test suite, the accountability loop is tight. Break that loop with a handover to a separate operations team, and all the context that makes AI-generated code trustworthy gets lost in translation.</p><p>Heinrich extends this to SRE tooling more broadly: "The core value of any SRE product is more about productivity than reliability. Everybody will get to ‘good enough’ with whatever tools you give them. If you have a build-it-run-it culture, every developer will figure out how to do that reliably enough pretty soon. A great SRE tool just gets you there a lot faster."</p><p>This reframes the question. It's not "does AI make our systems more reliable?" It's "does AI help the people who own those systems reach reliability faster?" The accountability stays with the human. AI's job is to shorten the path.</p><p>"The constants are the tasks and accountability. They stay the same," Heinrich says. "It's just a question of which levels you're automating. The human part will be judgment and high-level architecture. You can delegate the execution, but you cannot delegate the ownership."</p><p></p><p><em>Heinrich Hartmann is a Senior Principal SRE, host of the CASE Podcast, Chair of SREcon EMEA 2025, and organizer of</em><a href="https://signalsconf.io/" target="_blank" rel="noopener noreferrer"> Signals Berlin 2026</a><em>, a single-track conference on reliability in the age of AI (Berlin, September 2026). Read more at his </em><a href="https://heinrichhartmann.com/" target="_blank" rel="noopener noreferrer">personal blog</a><em>.</em></p></div> </div> <!-- Author bio --> <footer class="post-footer container-narrow astro-4sn4zg3r"> <div class="author-bios astro-4sn4zg3r"> <div class="author-bio-card astro-4sn4zg3r"> <img src="https://cdn.sanity.io/images/b3uvbvvc/production/9bcd3886060c22273870f55ed0342c5e6ac92fd2-700x467.jpg?rect=117,0,467,467&w=80&h=80&fit=crop" alt="Peter Farago" class="bio-avatar astro-4sn4zg3r"> <div class="bio-content astro-4sn4zg3r"> <div class="bio-header astro-4sn4zg3r"> <span class="bio-name astro-4sn4zg3r">Peter Farago</span> <span class="bio-role astro-4sn4zg3r">VP Marketing</span> <div class="bio-links astro-4sn4zg3r"> <a href="https://x.com/peter_farago" target="_blank" rel="noopener noreferrer" class="bio-link astro-4sn4zg3r">
|
||
X / Twitter
|
||
</a> <a href="https://www.linkedin.com/in/peterfarago/" target="_blank" rel="noopener noreferrer" class="bio-link astro-4sn4zg3r">
|
||
LinkedIn
|
||
</a> </div> </div> <p class="bio-text astro-4sn4zg3r">Peter has led marketing for several Silicon Valley startups. He co-founded Flurry Analytics, acquired by Yahoo, was CMO for Acompli, acquired by Microsoft. He was founding VP Marketing at HackerOne, led marketing for a global franchise at Electronic Arts and was VP of Growth & Monetization for Yahoo. Peter earned an MBA from the Wharton School and a B.S. from UC Berkeley.</p> </div> </div> </div> <div class="back-link astro-4sn4zg3r"> <a href="/blog" class="astro-4sn4zg3r">← All posts</a> </div> </footer> </article> </main> <footer class="footer astro-sz7xmlte"> <div class="footer-main container astro-sz7xmlte"> <div class="footer-brand astro-sz7xmlte"> <a href="/" aria-label="Herald" class="astro-sz7xmlte"> <picture class="astro-sz7xmlte"> <source srcset="/brand/Herald_Lockup_White.svg" media="(prefers-color-scheme: dark)" class="astro-sz7xmlte"> <img src="/brand/Herald_Lockup_Black.svg" alt="Herald" height="24" class="astro-sz7xmlte"> </picture> </a> <p class="footer-tagline astro-sz7xmlte">Toil Less. Build More. Love Work.</p> <p class="footer-copy astro-sz7xmlte">© 2026 RunLLM, Inc. All rights reserved.</p> </div> <div class="footer-cols astro-sz7xmlte"> <div class="footer-col astro-sz7xmlte"> <span class="footer-col-label astro-sz7xmlte">Company</span> <ul class="astro-sz7xmlte"> <li class="astro-sz7xmlte"><a href="/product" class="footer-link astro-sz7xmlte">Product</a></li><li class="astro-sz7xmlte"><a href="/pricing" class="footer-link astro-sz7xmlte">Pricing</a></li><li class="astro-sz7xmlte"><a href="/about" class="footer-link astro-sz7xmlte">About</a></li><li class="astro-sz7xmlte"><a href="/platform" class="footer-link astro-sz7xmlte">Platform</a></li><li class="astro-sz7xmlte"><a href="/docs/" class="footer-link astro-sz7xmlte">Docs</a></li> <li class="astro-sz7xmlte"> <a href="https://trust.herald.dev" class="footer-link astro-sz7xmlte" target="_blank" rel="noopener noreferrer">
|
||
Trust
|
||
</a> </li> <li class="astro-sz7xmlte"><a href="/blog" class="footer-link astro-sz7xmlte">Blog</a></li> </ul> </div> <div class="footer-col astro-sz7xmlte"> <span class="footer-col-label astro-sz7xmlte">Contact</span> <ul class="astro-sz7xmlte"> <li class="astro-sz7xmlte"> <a href="mailto:sales@herald.dev" class="footer-link astro-sz7xmlte">sales@herald.dev</a> </li> <li class="astro-sz7xmlte"> <a href="https://app.herald.dev" class="footer-link footer-link-cta astro-sz7xmlte" target="_blank" rel="noopener noreferrer"> Try it now →
|
||
</a> </li> <li class="astro-sz7xmlte"> <a href="/contact" class="footer-link footer-link-cta astro-sz7xmlte" data-cta-location="footer"> Book a Demo →
|
||
</a> </li> </ul> </div> <div class="footer-col astro-sz7xmlte"> <span class="footer-col-label astro-sz7xmlte">Legal</span> <ul class="astro-sz7xmlte"> <li class="astro-sz7xmlte"><a href="/legal/privacy" class="footer-link astro-sz7xmlte">Privacy Policy</a></li> <li class="astro-sz7xmlte"><a href="/legal/terms" class="footer-link astro-sz7xmlte">Terms of Service</a></li> <li class="astro-sz7xmlte"> <button type="button" class="footer-link footer-consent-link astro-sz7xmlte" data-open-consent>
|
||
Cookie preferences
|
||
</button> </li> </ul> </div> </div> </div> </footer> <div id="herald-consent-banner" class="consent-banner astro-2effgw6e" role="dialog" aria-modal="true" aria-labelledby="consent-banner-title" aria-describedby="consent-banner-desc" aria-hidden="true" inert data-visible="false"> <div class="consent-banner-panel astro-2effgw6e"> <p class="consent-banner-eyebrow astro-2effgw6e">Privacy</p> <p id="consent-banner-title" class="consent-banner-title astro-2effgw6e">Cookie preferences</p> <p id="consent-banner-desc" class="consent-banner-desc astro-2effgw6e"> Herald uses cookies for analytics and marketing. You can accept or decline non-essential
|
||
cookies. See our <a href="/legal/privacy" class="consent-banner-inline-link astro-2effgw6e">Privacy Policy</a> for
|
||
details.
|
||
</p> <div class="consent-banner-actions astro-2effgw6e"> <button type="button" class="btn btn-primary consent-banner-btn astro-2effgw6e" data-consent-action="accept">
|
||
Accept
|
||
</button> <button type="button" class="btn btn-ghost consent-banner-btn astro-2effgw6e" data-consent-action="decline">
|
||
Decline
|
||
</button> </div> </div> </div> <script>(function(){
|
||
var STORAGE_KEY="herald-consent-v1";
|
||
var HUBSPOT_COOKIE_UI_SELECTORS=["#hs_show_banner_button","#hs-hud-cookie-settings","#hs-cookie-settings-link","#hs-banner-parent"];
|
||
|
||
function removeHubSpotCookieUi() {
|
||
HUBSPOT_COOKIE_UI_SELECTORS.forEach(function(sel) {
|
||
document.querySelectorAll(sel).forEach(function(el) {
|
||
el.remove();
|
||
});
|
||
});
|
||
}
|
||
|
||
function watchHubSpotCookieUi() {
|
||
removeHubSpotCookieUi();
|
||
if (!window.MutationObserver || !document.body) return;
|
||
var observer = new MutationObserver(removeHubSpotCookieUi);
|
||
observer.observe(document.body, { childList: true, subtree: true });
|
||
}
|
||
|
||
function updateGoogleConsent(analytics, advertisement) {
|
||
if (typeof gtag !== 'function') return;
|
||
var state = function(v) { return v ? 'granted' : 'denied'; };
|
||
gtag('consent', 'update', {
|
||
analytics_storage: state(analytics),
|
||
ad_storage: state(advertisement),
|
||
ad_user_data: state(advertisement),
|
||
ad_personalization: state(advertisement),
|
||
});
|
||
}
|
||
|
||
function updateHubSpotConsent(analytics, advertisement) {
|
||
window._hsp = window._hsp || [];
|
||
window._hsp.push(['setHubSpotConsent', {
|
||
analytics: !!analytics,
|
||
advertisement: !!advertisement,
|
||
functionality: true,
|
||
}]);
|
||
}
|
||
|
||
window.applySiteConsent = function(choices) {
|
||
var analytics = !!choices.analytics;
|
||
var advertisement = !!choices.advertisement;
|
||
try {
|
||
localStorage.setItem(STORAGE_KEY, JSON.stringify({
|
||
analytics: analytics,
|
||
advertisement: advertisement,
|
||
ts: Date.now(),
|
||
}));
|
||
} catch (e) {}
|
||
updateGoogleConsent(analytics, advertisement);
|
||
updateHubSpotConsent(analytics, advertisement);
|
||
document.dispatchEvent(new CustomEvent('herald:consent-update', {
|
||
detail: { analytics: analytics, advertisement: advertisement },
|
||
}));
|
||
};
|
||
|
||
window.openSiteConsentBanner = function() {
|
||
var banner = document.getElementById('herald-consent-banner');
|
||
if (!banner) return;
|
||
banner.removeAttribute('inert');
|
||
banner.setAttribute('aria-hidden', 'false');
|
||
banner.dataset.visible = 'true';
|
||
var acceptBtn = banner.querySelector('[data-consent-action="accept"]');
|
||
if (acceptBtn && typeof acceptBtn.focus === 'function') acceptBtn.focus();
|
||
};
|
||
|
||
window.closeSiteConsentBanner = function() {
|
||
var banner = document.getElementById('herald-consent-banner');
|
||
if (!banner) return;
|
||
banner.dataset.visible = 'false';
|
||
banner.setAttribute('aria-hidden', 'true');
|
||
banner.setAttribute('inert', '');
|
||
};
|
||
|
||
function readStoredConsent() {
|
||
try {
|
||
var raw = localStorage.getItem(STORAGE_KEY);
|
||
if (!raw) return null;
|
||
var parsed = JSON.parse(raw);
|
||
if (typeof parsed.analytics !== 'boolean') return null;
|
||
if (typeof parsed.advertisement !== 'boolean') return null;
|
||
return parsed;
|
||
} catch (e) {
|
||
return null;
|
||
}
|
||
}
|
||
|
||
function initConsent() {
|
||
var stored = readStoredConsent();
|
||
if (stored) {
|
||
window.applySiteConsent(stored);
|
||
return;
|
||
}
|
||
window.openSiteConsentBanner();
|
||
}
|
||
|
||
if (document.readyState === 'loading') {
|
||
document.addEventListener('DOMContentLoaded', function() {
|
||
watchHubSpotCookieUi();
|
||
initConsent();
|
||
});
|
||
} else {
|
||
watchHubSpotCookieUi();
|
||
initConsent();
|
||
}
|
||
|
||
document.addEventListener('click', function(e) {
|
||
var trigger = e.target && e.target.closest ? e.target.closest('[data-open-consent]') : null;
|
||
if (!trigger) return;
|
||
e.preventDefault();
|
||
window.openSiteConsentBanner();
|
||
});
|
||
})();</script> <script>
|
||
(function () {
|
||
var banner = document.getElementById('herald-consent-banner');
|
||
if (!banner) return;
|
||
|
||
banner.addEventListener('click', function (e) {
|
||
var btn = e.target && e.target.closest ? e.target.closest('[data-consent-action]') : null;
|
||
if (!btn) return;
|
||
|
||
var action = btn.getAttribute('data-consent-action');
|
||
if (action === 'accept') {
|
||
window.applySiteConsent({ analytics: true, advertisement: true });
|
||
} else if (action === 'decline') {
|
||
window.applySiteConsent({ analytics: false, advertisement: false });
|
||
} else {
|
||
return;
|
||
}
|
||
|
||
window.closeSiteConsentBanner();
|
||
});
|
||
})();
|
||
</script> <script>(function(){
|
||
window.dataLayer=window.dataLayer||[];
|
||
window.pushSiteAnalyticsEvent=window.pushSiteAnalyticsEvent||function(eventName,params){
|
||
window.dataLayer.push(Object.assign({event:eventName},params||{}));
|
||
};
|
||
document.addEventListener('click',function(e){
|
||
var link=e.target&&e.target.closest?e.target.closest('a[href^="mailto:"]'):null;
|
||
if(!link)return;
|
||
var href=(link.getAttribute('href')||'').replace(/^mailto:/i,'').split(/[?#]/)[0].trim().toLowerCase();
|
||
if(href!=="sales@herald.dev")return;
|
||
window.pushSiteAnalyticsEvent("sales_email_click",{
|
||
link_text:(link.textContent||'').trim(),
|
||
link_href:link.getAttribute('href')||'',
|
||
page_location:window.location.href,
|
||
page_path:window.location.pathname
|
||
});
|
||
},true);
|
||
document.addEventListener('click',function(e){
|
||
var link=e.target&&e.target.closest?e.target.closest('a[data-cta-location]'):null;
|
||
if(!link)return;
|
||
var ctaLocation=link.getAttribute('data-cta-location');
|
||
if(!ctaLocation)return;
|
||
var params={
|
||
cta_text:(link.textContent||'').replace(/\s+/g,' ').trim(),
|
||
cta_location:ctaLocation,
|
||
cta_destination:link.getAttribute('href')||'',
|
||
page_location:window.location.href,
|
||
page_path:window.location.pathname
|
||
};
|
||
var pricingTier=link.getAttribute('data-pricing-tier');
|
||
if(pricingTier)params.pricing_tier=pricingTier;
|
||
window.pushSiteAnalyticsEvent("cta_click",params);
|
||
},true);
|
||
})();</script></body></html> |