<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: SBD Marketing</title>
    <description>The latest articles on DEV Community by SBD Marketing (@sbdmarketing).</description>
    <link>https://dev.to/sbdmarketing</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4218171%2F05814fca-4585-4410-bb03-c7599db04631.png</url>
      <title>DEV Community: SBD Marketing</title>
      <link>https://dev.to/sbdmarketing</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sbdmarketing"/>
    <language>en</language>
    <item>
      <title>Estimating Sample Size Before Testing a Law Firm Contact Form</title>
      <dc:creator>SBD Marketing</dc:creator>
      <pubDate>Fri, 20 Nov 2026 23:26:54 +0000</pubDate>
      <link>https://dev.to/sbdmarketing/estimating-sample-size-before-testing-a-law-firm-contact-form-136i</link>
      <guid>https://dev.to/sbdmarketing/estimating-sample-size-before-testing-a-law-firm-contact-form-136i</guid>
      <description>&lt;p&gt;Law firm clients ask for A/B tests all the time. Shorten the contact form, change the button text, move the phone number. The request is reasonable, but on a typical criminal defense site the traffic to a single page is small, and the number of people who actually submit a form is smaller still. Run a test without checking the math first and you will likely end up calling a winner based on noise.&lt;/p&gt;

&lt;p&gt;A few minutes with a sample size estimate before the test starts saves weeks of pointless testing and an awkward conversation later. This post covers the inputs you need, a short script to do the arithmetic, and what to do when the answer says the test is not practical.&lt;/p&gt;

&lt;h2&gt;
  
  
  The inputs you need
&lt;/h2&gt;

&lt;p&gt;A standard sample size estimate for comparing two conversion rates needs four numbers:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;the baseline conversion rate of the page as it is now&lt;/li&gt;
&lt;li&gt;the smallest lift you care about detecting, called the minimum detectable effect&lt;/li&gt;
&lt;li&gt;the significance level, usually 0.05&lt;/li&gt;
&lt;li&gt;the statistical power, usually 0.8&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Get the baseline from real data. For a contact form, that is form submissions divided by unique visitors to the page over a recent, normal period. If you are not sure the form events are tracked correctly, fix that first. A test built on broken tracking is worse than no test.&lt;/p&gt;

&lt;p&gt;Choose the minimum detectable effect based on what would matter to the firm. A change from 3 percent to 3.1 percent is not worth anyone's time to detect. A change from 3 percent to 4 percent might be.&lt;/p&gt;

&lt;h2&gt;
  
  
  A short script for the estimate
&lt;/h2&gt;

&lt;p&gt;The formula for two proportions is short enough to keep in a utility file. This version uses only the Python standard library:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="n"&gt;statistics&lt;/span&gt; &lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nc"&gt;NormalDist&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;visitors_per_variant&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p1&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;p2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;alpha&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.05&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;power&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mf"&gt;0.8&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="n"&gt;z_a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;NormalDist&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;inv_cdf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;alpha&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;z_b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;NormalDist&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;inv_cdf&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;power&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="n"&gt;variance&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;p1&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;p1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;p2&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;p2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nb"&gt;pow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;z_a&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;z_b&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="n"&gt;variance&lt;/span&gt; &lt;span class="o"&gt;/&lt;/span&gt; &lt;span class="nb"&gt;pow&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;p1&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="n"&gt;p2&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="k"&gt;print&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;round&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;visitors_per_variant&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;0.03&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mf"&gt;0.04&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;  &lt;span class="c1"&gt;# about 5,300&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With a hypothetical baseline of 3 percent and a target of 4 percent, the estimate comes out near 5,300 visitors per variant, or roughly 10,600 in total. A bigger expected lift, from 3 percent to 6 percent, needs only about 750 per variant. Small differences are expensive to detect.&lt;/p&gt;

&lt;p&gt;Online calculators give similar numbers. The value of the script is that you can drop it into a planning notebook and run it for every page you are asked to test.&lt;/p&gt;

&lt;h2&gt;
  
  
  Turn visitors into weeks
&lt;/h2&gt;

&lt;p&gt;Divide the total by the page's weekly unique visitors. If a charge page gets 400 visitors a week and needs 10,600, the test would run for more than six months. In that time the firm will change other things on the site, search rankings will move and seasonal patterns in arrests will shift traffic. The result would be hard to trust.&lt;/p&gt;

&lt;p&gt;A useful rule: if the estimate runs past eight to ten weeks, the test as designed is not practical for that page.&lt;/p&gt;

&lt;h2&gt;
  
  
  Options when the numbers do not work
&lt;/h2&gt;

&lt;p&gt;You still have choices when traffic is low.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Test across a template. If every charge page uses the same form component, run the variant on all of them and pool the traffic. Make sure the change is the same everywhere.&lt;/li&gt;
&lt;li&gt;Test a bigger change. A redesign of the whole contact block has a better chance of producing a large effect than a single word swap.&lt;/li&gt;
&lt;li&gt;Measure a higher-volume step. Clicks on the call button or the start of form entry happen more often than submissions. Treat them as supporting evidence, though, because what the firm wants is cases.&lt;/li&gt;
&lt;li&gt;Use a before and after comparison with care. Match periods, note outside events and accept that the evidence is weaker.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;For the non-technical side of that last option, a write-up on &lt;a href="https://sbdmarketing.pages.dev/articles/defense-site-low-traffic-conversion-test/" rel="noopener noreferrer"&gt;running a conversion test on a low-traffic defense website&lt;/a&gt; covers how to plan and read a test when traffic is thin.&lt;/p&gt;

&lt;h2&gt;
  
  
  Do not forget the phone
&lt;/h2&gt;

&lt;p&gt;On criminal defense sites, many visitors call instead of filling in a form, especially on mobile. If a form change pushes people toward the phone, form submissions fall while total contacts rise. Track calls with a dynamic number or call tracking tool that can attribute calls to the variant, and judge the test on total contacts. Otherwise you can reject a change that actually helped.&lt;/p&gt;

&lt;h2&gt;
  
  
  Write the plan down before launch
&lt;/h2&gt;

&lt;p&gt;Record the baseline, the minimum detectable effect, the sample size, the expected end date and the decision rule in a short document before the test starts. Agree with the firm that you will not stop early because one variant looks ahead after a week. Peeking and stopping early is one of the most common ways small tests produce false winners.&lt;/p&gt;

&lt;p&gt;When the test ends, report the result with its uncertainty alongside the percentage lift. A firm owner can work with "probably no meaningful difference" as long as they knew in advance that this was a possible outcome.&lt;/p&gt;

&lt;p&gt;More on testing and measurement for law firm websites is gathered in the &lt;a href="https://officialsbdmarketing.science.blog/" rel="noopener noreferrer"&gt;library on conversion testing for law firm websites&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Questions about sample size for law firm tests
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Can I use a smaller significance level to finish faster?
&lt;/h3&gt;

&lt;p&gt;Raising alpha above 0.05 shortens tests but makes false positives more likely. Change it only if the firm understands the tradeoff.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is a Bayesian testing tool a way around sample size?
&lt;/h3&gt;

&lt;p&gt;Bayesian methods report results differently, but they do not create information from small samples. Low traffic still means uncertain results.&lt;/p&gt;

&lt;h3&gt;
  
  
  Should I count unique visitors or sessions?
&lt;/h3&gt;

&lt;p&gt;Use whichever unit you randomize on, usually users. Keep it consistent for the baseline and the test.&lt;/p&gt;

&lt;p&gt;SBD Marketing works only with criminal defense law firms, one firm per city. It builds websites for defense practices, handles SEO for the charges a firm defends, works on visibility in AI search tools and runs SEO audits.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>testing</category>
      <category>analytics</category>
      <category>python</category>
    </item>
    <item>
      <title>Adding llms.txt to a Law Firm Site: What It Can and Cannot Do</title>
      <dc:creator>SBD Marketing</dc:creator>
      <pubDate>Thu, 19 Nov 2026 23:29:05 +0000</pubDate>
      <link>https://dev.to/sbdmarketing/adding-llmstxt-to-a-law-firm-site-what-it-can-and-cannot-do-53l1</link>
      <guid>https://dev.to/sbdmarketing/adding-llmstxt-to-a-law-firm-site-what-it-can-and-cannot-do-53l1</guid>
      <description>&lt;p&gt;Sooner or later, a law firm client forwards an article saying every website needs an llms.txt file to show up in ChatGPT. The request lands on whoever maintains the site, usually with a deadline attached. For developers who build criminal defense firm sites, it is worth understanding what the file actually is before deciding how much time it deserves.&lt;/p&gt;

&lt;p&gt;The short version: llms.txt is a proposal, and no major search engine has committed to using it. Adding one is cheap and harmless. Treating it as a way to get a firm named in AI answers is a mistake, and the time is usually better spent on things AI crawlers and search engines do use.&lt;/p&gt;

&lt;h2&gt;
  
  
  What llms.txt is
&lt;/h2&gt;

&lt;p&gt;The llms.txt idea was proposed in September 2024 by Jeremy Howard of Answer.AI. The file sits at the root of a site, like robots.txt, but it is written in Markdown. It gives a short summary of the site and a curated list of links to the pages a language model should read, sometimes pointing to plain Markdown versions of those pages.&lt;/p&gt;

&lt;p&gt;The original motivation was documentation sites, where a model trying to answer a coding question benefits from a clean index of the docs. A law firm site is a different case. It has a handful of practice pages, attorney bios and a blog, all of which are already linked from normal HTML navigation.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Google and others have said
&lt;/h2&gt;

&lt;p&gt;Google has said that llms.txt files will not help or hurt a site's rankings in Google Search. John Mueller of Google has also been openly skeptical that AI systems rely on the file at all. Most AI companies have not said publicly whether their crawlers read it, so any claim that a specific assistant depends on it deserves a source.&lt;/p&gt;

&lt;p&gt;None of that means the file is harmful. It means a firm should not expect the file to change whether ChatGPT or Gemini mention the practice. Those tools draw on what they can crawl and what other sources say about the firm, and a short index file at the root does little to change either.&lt;/p&gt;

&lt;h2&gt;
  
  
  If the client still wants one
&lt;/h2&gt;

&lt;p&gt;A minimal file takes a few minutes and keeps the client happy. Keep it accurate and short. For a defense firm, a reasonable version looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gu"&gt;# Smith Defense Law
&lt;/span&gt;
&lt;span class="ge"&gt;&amp;gt; Criminal defense firm in Sacramento County, California, handling DUI, drug and domestic violence cases.
&lt;/span&gt;
&lt;span class="gu"&gt;## Practice areas
&lt;/span&gt;&lt;span class="k"&gt;- &lt;/span&gt;[DUI defense](https://example.com/dui/): DUI charges and DMV hearings
&lt;span class="k"&gt;- &lt;/span&gt;[Drug charges](https://example.com/drug-charges/): possession and sales cases

&lt;span class="gu"&gt;## About
&lt;/span&gt;&lt;span class="k"&gt;- &lt;/span&gt;[Attorneys](https://example.com/attorneys/): bios and bar admissions
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Treat the descriptions as public advertising copy. They should match the website exactly and follow the state bar's advertising rules, so avoid words like "expert" or claims about results. If the firm changes its practice areas, the file needs updating too, which is one more thing to forget.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where the effort pays off more
&lt;/h2&gt;

&lt;p&gt;The things that help AI tools understand a defense firm are the same things that help search engines. Start with access. Check robots.txt and any firewall or CDN bot settings to confirm the AI crawlers the firm wants to allow can reach the site. This guide on &lt;a href="https://sbdmarketing-ai-search.netlify.app/articles/ai-crawlers-defense-website-robots-txt/" rel="noopener noreferrer"&gt;which AI crawlers a criminal defense website should let in&lt;/a&gt; goes through the main user agents and the trade-offs.&lt;/p&gt;

&lt;p&gt;Next, make sure the important content is in the server-rendered HTML. Many AI crawlers do not execute JavaScript, so a charge page that loads its text client-side may look empty to them. Then make each page clear about who the firm is, where it practices and which charges it handles, in plain text near the top. Consistent Organization and LegalService structured data, matching the visible content, helps machines connect the details.&lt;/p&gt;

&lt;p&gt;Finally, keep facts consistent across the firm's site, Google Business Profile and directory listings. AI answers often combine several sources, and conflicting addresses or practice areas are a common reason they describe a firm wrongly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Measuring before and after
&lt;/h2&gt;

&lt;p&gt;If you add llms.txt, log requests to it. Most hosting platforms and CDNs let you filter access logs by path and user agent. After a few months, you will have your own evidence of whether anything reads it. Compare that with requests from known AI crawlers to the rest of the site, which tells you far more about how the firm's pages are being used.&lt;/p&gt;

&lt;p&gt;More on AI search and legal marketing technology is collected in the &lt;a href="https://officialsbdmarketing.tech.blog/" rel="noopener noreferrer"&gt;library on ChatGPT, AI search and legal marketing technology&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Questions about llms.txt for law firms
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Will llms.txt get a defense firm mentioned in ChatGPT?
&lt;/h3&gt;

&lt;p&gt;There is no public evidence that it does. Be cautious with anyone who promises otherwise.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can llms.txt hurt a site's rankings?
&lt;/h3&gt;

&lt;p&gt;Google has said it will not help or hurt rankings in Google Search. The main risk is outdated or inaccurate content in the file.&lt;/p&gt;

&lt;h3&gt;
  
  
  Should the file list every page on the site?
&lt;/h3&gt;

&lt;p&gt;No. If you add one, keep it to the main practice pages and attorney information, and update it whenever those change.&lt;/p&gt;

&lt;p&gt;SBD Marketing works only with criminal defense law firms, one firm per city. It builds websites for defense practices, handles SEO for the charges they defend, works on visibility in AI search tools such as ChatGPT, Gemini, Claude and Perplexity, and runs SEO audits.&lt;/p&gt;

</description>
      <category>seo</category>
      <category>webdev</category>
      <category>ai</category>
      <category>marketing</category>
    </item>
    <item>
      <title>Keeping Sitemap Lastmod Dates Honest on a Law Firm Site</title>
      <dc:creator>SBD Marketing</dc:creator>
      <pubDate>Wed, 18 Nov 2026 23:28:29 +0000</pubDate>
      <link>https://dev.to/sbdmarketing/keeping-sitemap-lastmod-dates-honest-on-a-law-firm-site-4g70</link>
      <guid>https://dev.to/sbdmarketing/keeping-sitemap-lastmod-dates-honest-on-a-law-firm-site-4g70</guid>
      <description>&lt;p&gt;Most CMS platforms and sitemap plugins fill in the lastmod field automatically. Some use the date of the last database save. Others stamp every URL with the build time, so a static law firm site rebuilt nightly tells search engines that all 300 pages changed today. Neither matches what lastmod is supposed to mean.&lt;/p&gt;

&lt;p&gt;Google said in 2023 that it uses lastmod when the value is consistently and verifiably accurate, and that it ignores the priority and changefreq fields. On a criminal defense firm's site, a charge page may sit unchanged for months and then get a meaningful legal update, so an honest lastmod is one of the few sitemap signals worth getting right. This post covers how to store it and how to generate it.&lt;/p&gt;

&lt;h2&gt;
  
  
  What should count as a change
&lt;/h2&gt;

&lt;p&gt;Google's guidance ties lastmod to significant changes, such as changes to the main content, the structured data or the links on a page. A new copyright year in the footer does not qualify. A rewritten penalties section on a DUI page does.&lt;/p&gt;

&lt;p&gt;On a law firm site, agree on the definition with the people who edit content. A reasonable rule set:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Change the date when body content, legal facts, FAQ answers or structured data change&lt;/li&gt;
&lt;li&gt;Leave it alone for template, navigation, footer or styling changes&lt;/li&gt;
&lt;li&gt;Leave it alone for typo fixes that do not change meaning&lt;/li&gt;
&lt;li&gt;Change it when links in the body are added or removed&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Write the rule down. Developers and content editors will otherwise each assume someone else is handling it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Store the date as content
&lt;/h2&gt;

&lt;p&gt;The cleanest approach is a dedicated field, something like content_updated_at, kept separate from the CMS's own updated timestamp. Editors set it, or the CMS sets it when a "meaningful change" checkbox is ticked on save. The database's updated_at stays as an audit field and never reaches the sitemap.&lt;/p&gt;

&lt;p&gt;For a static site built from Markdown, put the date in front matter and treat it the same way:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="nn"&gt;---
&lt;/span&gt;&lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"Second-Degree Assault Charges in Example County"&lt;/span&gt;
&lt;span class="na"&gt;content_updated&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2026-11-10&lt;/span&gt;
&lt;span class="na"&gt;legal_review&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2026-11-10&lt;/span&gt;
&lt;span class="nn"&gt;---
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For an existing site, backfill the field once. Pull the last meaningful edit from revision history where the CMS keeps it. For pages with no reliable history, use the date of the last known legal review, or leave the field empty until the next review sets it.&lt;/p&gt;

&lt;p&gt;A separate legal_review date is useful on charge pages. The page can show readers when a lawyer last checked it, and your team can query every page whose review is older than a set limit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Generate the sitemap from that field
&lt;/h2&gt;

&lt;p&gt;At build or request time, read the content date for each URL and write it in W3C Datetime format. A date alone, such as 2026-11-10, is valid. If you include a time, include the timezone offset too.&lt;/p&gt;

&lt;p&gt;Leave lastmod off a URL entirely if you do not have a trustworthy date for it. A missing value is better than an invented one. Do not fall back to file modification times on a build server, since a fresh checkout resets them and every page appears changed.&lt;/p&gt;

&lt;p&gt;Check that the sitemap lists only canonical, indexable URLs that return a 200 status. A lastmod on a redirected or noindexed URL is wasted.&lt;/p&gt;

&lt;h2&gt;
  
  
  Tie it to the editorial review cycle
&lt;/h2&gt;

&lt;p&gt;The date only stays honest if editing habits support it. Many defense firms review charge and court pages on a schedule, and those reviews often produce real content changes. A post on &lt;a href="https://sbd-marketing.webflow.io/articles/charge-court-page-review-schedule" rel="noopener noreferrer"&gt;setting a review schedule for every charge and court page&lt;/a&gt; covers how to plan that cycle. Connect the sitemap date to the same workflow, so a completed review that changes the page also updates the field.&lt;/p&gt;

&lt;p&gt;When a review finds nothing to change, record it in legal_review and leave content_updated alone. The sitemap should reflect changes to the page, not visits from your own editors.&lt;/p&gt;

&lt;h2&gt;
  
  
  Checking that it works
&lt;/h2&gt;

&lt;p&gt;After deploying, compare a sample of sitemap dates against the real edit history for the same pages. The Sitemaps report in Search Console shows when Google last read the file, though it does not tell you whether Google trusts your dates. Watch the Crawl stats report in the following weeks for activity on pages you updated.&lt;/p&gt;

&lt;p&gt;If you previously stamped every page with the build date, expect Google to take a while to trust the field again. Months of consistent values are what earn that trust back.&lt;/p&gt;

&lt;h2&gt;
  
  
  Questions about lastmod on law firm sites
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Does a newer lastmod make Google rank a page higher?
&lt;/h3&gt;

&lt;p&gt;No. It can help Google decide when to recrawl a page, which matters after a legal update, but it is not a ranking boost.&lt;/p&gt;

&lt;h3&gt;
  
  
  Should I still ping Google when the sitemap changes?
&lt;/h3&gt;

&lt;p&gt;Google retired its sitemap ping endpoint in 2023. Submit the sitemap in Search Console and reference it in robots.txt.&lt;/p&gt;

&lt;h3&gt;
  
  
  What about IndexNow?
&lt;/h3&gt;

&lt;p&gt;Bing and some other search engines accept IndexNow notifications for changed URLs. Google does not use it. The same honest content date can drive both.&lt;/p&gt;

&lt;p&gt;SBD Marketing works only with criminal defense firms, one firm per city, and helps them with website design, SEO for the charges they defend, visibility in AI search tools and SEO audits. Its notes on &lt;a href="https://officialsbdmarketing.code.blog/" rel="noopener noreferrer"&gt;technical SEO for law firms&lt;/a&gt; cover more of this kind of work.&lt;/p&gt;

</description>
      <category>seo</category>
      <category>webdev</category>
      <category>sitemap</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Save Points for Law Firm Intake Forms: A Game Design Lesson</title>
      <dc:creator>SBD Marketing</dc:creator>
      <pubDate>Tue, 17 Nov 2026 23:28:11 +0000</pubDate>
      <link>https://dev.to/sbdmarketing/save-points-for-law-firm-intake-forms-a-game-design-lesson-58f9</link>
      <guid>https://dev.to/sbdmarketing/save-points-for-law-firm-intake-forms-a-game-design-lesson-58f9</guid>
      <description>&lt;p&gt;Anyone who played games before autosave remembers losing an hour of progress to a power cut or a missed save point. Modern game design treats that kind of loss as the game's fault. Progress is saved quietly at sensible moments, and a crash costs a few seconds at most.&lt;/p&gt;

&lt;p&gt;Law firm intake forms rarely get the same care. A person filling out a criminal defense contact form is often stressed, on a phone, and interrupted. A call comes in, the browser reloads, the screen locks, and everything they typed about the arrest is gone. Some will start again. Many will not. If you build sites for defense firms, a save point in the intake form is a small piece of work with a real payoff, as long as you handle the privacy side carefully.&lt;/p&gt;

&lt;h2&gt;
  
  
  What games get right about saving
&lt;/h2&gt;

&lt;p&gt;Good save systems share a few habits. They save without asking, so the player never has to think about it. They save at natural checkpoints, such as entering a new area, rather than every frame. They tell the player when a save happened with a small, unobtrusive icon. And they make it easy to start fresh when the player wants to.&lt;/p&gt;

&lt;p&gt;Each of those maps onto a form. Save quietly as the user types, at the moment a field loses focus. Show a short "Saved on this device" note. Offer a clear way to wipe the saved data. Restore it automatically if the page reloads.&lt;/p&gt;

&lt;h2&gt;
  
  
  The privacy problem games do not have
&lt;/h2&gt;

&lt;p&gt;A saved game holds a character's inventory. A saved intake form can hold a description of an arrest, a charge, a court date and a phone number. That changes the design.&lt;/p&gt;

&lt;p&gt;The device may be shared. A person might fill out the form on a family computer, a work laptop or a friend's phone. Anything stored in the browser can be seen by the next person who opens it. For that reason, persistent storage that survives closing the browser is a poor fit for defense intake. Session-scoped storage is a better default: in current browsers, sessionStorage data survives a reload but is cleared when the tab is closed, and it is not shared with other tabs.&lt;/p&gt;

&lt;p&gt;It also helps to be selective about what gets saved at all. Contact details and simple choices, such as the type of charge from a dropdown, are the fields people most hate retyping. The long free-text description of what happened is the most sensitive. A reasonable compromise is to save the structured fields and leave the free-text box out, or to save it only if the firm decides the trade-off is worth it after discussing it with the lawyers.&lt;/p&gt;

&lt;h2&gt;
  
  
  A minimal implementation
&lt;/h2&gt;

&lt;p&gt;Here is a small sketch using sessionStorage. It saves listed fields when they lose focus, restores them on load, and clears everything on submit or when the user asks.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;KEY&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;"intake-draft"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"#intake"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="no"&gt;SAVED&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="s2"&gt;"name"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"phone"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"email"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"charge_type"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s2"&gt;"county"&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;save&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="no"&gt;SAVED&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;elements&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="o"&gt;?&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="s2"&gt;""&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;sessionStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;setItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nb"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;stringify&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;restore&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;JSON&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;parse&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;sessionStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;||&lt;/span&gt; &lt;span class="s2"&gt;"{}"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="no"&gt;SAVED&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;forEach&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;elements&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;elements&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;value&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;data&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="n"&gt;n&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;clearDraft&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;sessionStorage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;removeItem&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"focusout"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;save&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"submit"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;clearDraft&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nb"&gt;document&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;querySelector&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"#clear-draft"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;addEventListener&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"click"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nf"&gt;clearDraft&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;form&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reset&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nf"&gt;restore&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The try blocks matter. Storage can throw in private browsing modes or when the browser blocks site data, and the form has to keep working either way. Clearing on submit should happen after you confirm the submission succeeded if the form posts by script, so a network error does not wipe the draft.&lt;/p&gt;

&lt;h2&gt;
  
  
  Telling the user what happened
&lt;/h2&gt;

&lt;p&gt;Games show a spinning icon in the corner. A form can show a line of small text under the submit button that changes to "Saved on this device until you close this tab" after the first save. That one sentence tells the person their work is safe and tells them how long it stays. Next to it, a "Clear this form" link gives them control on a shared device.&lt;/p&gt;

&lt;p&gt;Keep the message honest. Do not say "saved" in a way that suggests the firm has received anything. Only the submit button sends the information.&lt;/p&gt;

&lt;h2&gt;
  
  
  Making the form shorter matters more
&lt;/h2&gt;

&lt;p&gt;A save point helps people who get interrupted. It does nothing for people who give up because the form asks too much. Before building any of this, look at which fields the firm actually uses at the first call. Some intake forms ask for date of birth, case number and a long narrative that the lawyer will cover by phone anyway. A guide to &lt;a href="https://telegra.ph/Designing-an-Intake-Form-a-Frightened-Caller-Will-Finish-11-03" rel="noopener noreferrer"&gt;designing an intake form a frightened caller will finish&lt;/a&gt; goes through trimming the form itself.&lt;/p&gt;

&lt;p&gt;Track the effect with your existing form analytics. Compare form starts with completed submissions for a few weeks before and after adding the save feature. Small sites will need longer to see a pattern.&lt;/p&gt;

&lt;h2&gt;
  
  
  Questions about saving intake form progress
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Should the form use localStorage so drafts survive closing the browser?
&lt;/h3&gt;

&lt;p&gt;For criminal defense intake, that is risky on shared devices. Session-scoped storage is the safer default unless the firm has a clear reason and tells users plainly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does saving in the browser send anything to the firm?
&lt;/h3&gt;

&lt;p&gt;No. Data in sessionStorage stays on the device until the user submits the form.&lt;/p&gt;

&lt;h3&gt;
  
  
  Does the firm need to mention this in its privacy policy?
&lt;/h3&gt;

&lt;p&gt;Ask the firm to review its privacy policy with whoever maintains it. Describing local draft saving in plain words is good practice.&lt;/p&gt;

&lt;p&gt;SBD Marketing works only with criminal defense firms, one firm per city, and helps them with website design, SEO for the charges they defend, visibility in AI search tools and SEO audits. Its notes on &lt;a href="https://officialsbdmarketing.game.blog/" rel="noopener noreferrer"&gt;UX lessons from video game design&lt;/a&gt; cover more ideas from games that apply to law firm sites.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ux</category>
      <category>javascript</category>
      <category>gamedev</category>
    </item>
    <item>
      <title>Grouping Law Firm Pages by Practice Area in GA4 Reports</title>
      <dc:creator>SBD Marketing</dc:creator>
      <pubDate>Mon, 16 Nov 2026 23:26:47 +0000</pubDate>
      <link>https://dev.to/sbdmarketing/grouping-law-firm-pages-by-practice-area-in-ga4-reports-j0h</link>
      <guid>https://dev.to/sbdmarketing/grouping-law-firm-pages-by-practice-area-in-ga4-reports-j0h</guid>
      <description>&lt;p&gt;If you build or maintain sites for criminal defense firms, sooner or later a partner asks a question GA4 cannot answer out of the box: how are the DUI pages doing compared with the drug charge pages? A defense site might have forty URLs about DUI alone, spread across charge pages, courthouse pages, blog posts and FAQs. The default Pages and screens report lists them one by one, which is fine for spotting a single winner and useless for comparing practice areas.&lt;/p&gt;

&lt;p&gt;GA4 has a built-in answer that many developers skip: the content group. You set one value per page, and GA4 records it with every event on that page. After that, any report that offers the Content group dimension can roll up traffic, engagement and conversions by practice area. This post covers how to plan the groups, how to send them and the mistakes that make the data unreliable.&lt;/p&gt;

&lt;h2&gt;
  
  
  Plan the groups before writing any code
&lt;/h2&gt;

&lt;p&gt;Decide on a short, fixed list of groups that match how the firm thinks about its practice. For a typical defense site that might be:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;dui&lt;/li&gt;
&lt;li&gt;drug-charges&lt;/li&gt;
&lt;li&gt;domestic-violence&lt;/li&gt;
&lt;li&gt;theft&lt;/li&gt;
&lt;li&gt;violent-crimes&lt;/li&gt;
&lt;li&gt;sex-crimes&lt;/li&gt;
&lt;li&gt;general (homepage, about, contact, attorney bios)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Keep the list small. Ten groups are readable in a report. Forty are not. Agree on the exact strings with whoever reads the reports, write them down and treat them as a controlled list. "DUI", "dui" and "Dui" will show up as three separate rows.&lt;/p&gt;

&lt;p&gt;Decide how to handle pages that span groups, such as a post about a DUI with drug charges. Pick the primary topic and move on. A page gets one content group, and trying to be precise about mixed topics creates more noise than insight.&lt;/p&gt;

&lt;h2&gt;
  
  
  Store the group with the page
&lt;/h2&gt;

&lt;p&gt;The cleanest source for the value is the page itself, set in the CMS. In WordPress, that might be a custom field or a mapping from the post's primary category. In a headless setup, add a required field to the page model. In a static site, put it in front matter.&lt;/p&gt;

&lt;p&gt;Avoid deriving groups from URLs with regular expressions in the tag. It works until someone publishes a page outside the expected folder, and then that page silently falls into "(not set)". A field on the page is visible to editors and easier to audit.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sending the content group
&lt;/h2&gt;

&lt;p&gt;With gtag.js, set the value in the config call before the page view fires. Render the value server-side into the template:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;script&amp;gt;&lt;/span&gt;
  &lt;span class="nf"&gt;gtag&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'config'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'G-XXXXXXXXXX'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;content_group&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'dui'&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/script&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With Google Tag Manager, push the value into the data layer above the container snippet, read it with a Data Layer Variable, and add content_group as a configuration parameter on the Google tag. Either way, check in DebugView that page_view events carry the parameter before you trust any report.&lt;/p&gt;

&lt;p&gt;If the site is a single-page app with client-side routing, update the value on each route change and make sure the virtual page view fires after it. Otherwise the first page's group sticks to every page that follows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Reading the reports
&lt;/h2&gt;

&lt;p&gt;Once data flows, open the Pages and screens report and switch the primary dimension to Content group. You will see views, users, engagement and key events per group. For call and form tracking, make sure those actions are marked as key events so they appear alongside the traffic numbers.&lt;/p&gt;

&lt;p&gt;For deeper work, build an Exploration with Content group as a row dimension and your call and form key events as values. That answers the partner's question directly: which practice areas bring in contacts, and how many pages it takes to get there. Pair it with Search Console query data to see which groups have demand but weak pages. There is a walkthrough on &lt;a href="https://sbdmarketing.github.io/articles/search-console-queries-charge-page-priorities/" rel="noopener noreferrer"&gt;using Search Console queries to choose which charge page to fix&lt;/a&gt; that fits well with this.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mistakes that break the data
&lt;/h2&gt;

&lt;p&gt;A few problems come up repeatedly on law firm sites:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Content groups are not retroactive. Reports only show groups from the day you start sending them, so note the launch date.&lt;/li&gt;
&lt;li&gt;Templates without the field send nothing, and those pages show as "(not set)". Check that row weekly for the first month.&lt;/li&gt;
&lt;li&gt;Renaming a group splits its history. If you must rename, do it at the start of a month and note it.&lt;/li&gt;
&lt;li&gt;Landing pages and conversion pages often belong to different groups. A visitor who reads a DUI page and then calls from the contact page credits "general" for the key event unless you report on the landing page's group too.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Keep reporting on outcomes aggregate. Do not attach anything about a caller's situation to analytics events, since intake details can be confidential.&lt;/p&gt;

&lt;p&gt;More on analytics and search data for law firm sites is collected in our &lt;a href="https://officialsbdmarketing.data.blog/" rel="noopener noreferrer"&gt;legal marketing analytics and search data library&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Questions developers ask about GA4 content groups
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Can a page belong to more than one content group?
&lt;/h3&gt;

&lt;p&gt;No. The parameter holds one value per page. If you need a second way to slice pages, such as page type, register a separate event-scoped custom dimension.&lt;/p&gt;

&lt;h3&gt;
  
  
  Do content groups count against custom dimension limits?
&lt;/h3&gt;

&lt;p&gt;Content group is a built-in GA4 dimension, so it does not use one of your custom dimension slots.&lt;/p&gt;

&lt;h3&gt;
  
  
  Should blog posts get the group of the charge they discuss?
&lt;/h3&gt;

&lt;p&gt;Usually yes. When posts share a group with their charge pages, the report shows everything a practice area brings in, from service pages and articles alike.&lt;/p&gt;

&lt;p&gt;SBD Marketing works only with criminal defense firms, one firm per city. It helps with defense firm websites, SEO for the charges a firm handles, AI search visibility and SEO audits.&lt;/p&gt;

</description>
      <category>analytics</category>
      <category>webdev</category>
      <category>seo</category>
      <category>googleanalytics</category>
    </item>
    <item>
      <title>Building a Sticky Mobile Call Bar for a Law Firm Website</title>
      <dc:creator>SBD Marketing</dc:creator>
      <pubDate>Fri, 13 Nov 2026 23:27:38 +0000</pubDate>
      <link>https://dev.to/sbdmarketing/building-a-sticky-mobile-call-bar-for-a-law-firm-website-1569</link>
      <guid>https://dev.to/sbdmarketing/building-a-sticky-mobile-call-bar-for-a-law-firm-website-1569</guid>
      <description>&lt;p&gt;Most visitors to a criminal defense website arrive on a phone, and many of them want to call rather than read. A sticky call bar, a strip pinned to the bottom of the screen with a tap-to-call button, is one of the most common patterns on law firm sites for that reason. It is also one of the most commonly broken. Bars cover footer links, collide with chat widgets, sit under the iPhone home indicator or hide the last line of every page.&lt;/p&gt;

&lt;p&gt;This post walks through building one that behaves well: correct on notched phones, accessible, easy to measure and out of the way of the content. The examples use plain HTML and CSS with a few lines of JavaScript, so they port to any CMS or framework.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with the markup
&lt;/h2&gt;

&lt;p&gt;Keep the bar simple. One primary action, the phone call, and at most one secondary action, such as a link to the contact form. Two buttons fit comfortably on small screens. Three usually do not.&lt;/p&gt;

&lt;p&gt;Use a real &lt;code&gt;tel:&lt;/code&gt; link with the number in international format, and put the human-readable number in the visible text. Screen reader users and people who distrust buttons both benefit from seeing the actual number. Wrap the bar in a landmark element with a label so assistive technology can identify it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Handle the safe area on notched phones
&lt;/h2&gt;

&lt;p&gt;On phones with a home indicator, content at the very bottom of the viewport can sit underneath it. CSS environment variables solve this, but only if the viewport meta tag opts in with &lt;code&gt;viewport-fit=cover&lt;/code&gt;. Without that, &lt;code&gt;env(safe-area-inset-bottom)&lt;/code&gt; returns zero and the bar may be partly covered.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.call-bar&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;position&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;fixed&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;inset&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;auto&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;gap&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;8px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;10px&lt;/span&gt; &lt;span class="mi"&gt;12px&lt;/span&gt; &lt;span class="nf"&gt;calc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10px&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;env&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;safe-area-inset-bottom&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mh"&gt;#0c1a33&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;z-index&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;50&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nc"&gt;.call-bar&lt;/span&gt; &lt;span class="nt"&gt;a&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;flex&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;min-height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;48px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;grid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nl"&gt;place-items&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;center&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nt"&gt;body&lt;/span&gt;&lt;span class="nc"&gt;.has-call-bar&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;padding-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nf"&gt;calc&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;72px&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nf"&gt;env&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;safe-area-inset-bottom&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="k"&gt;@media&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nt"&gt;min-width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;900px&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nc"&gt;.call-bar&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;none&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="n"&gt;body&lt;/span&gt;&lt;span class="nc"&gt;.has-call-bar&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nl"&gt;padding-bottom&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The body padding matters. Without it, the bar covers the last part of every page, which on a law firm site is often the footer with the disclaimer and office addresses. Match the padding to the bar's real height, and test with large text settings, since the bar grows when the user increases the font size.&lt;/p&gt;

&lt;h2&gt;
  
  
  Make the tap targets generous
&lt;/h2&gt;

&lt;p&gt;WCAG 2.2 added a target size criterion at level AA that sets a minimum of 24 by 24 CSS pixels for most targets, with some exceptions. That is a floor. For the main call button on a defense site, aim much larger, around 44 to 48 pixels tall, since the person tapping it may be stressed, in a car or using one hand.&lt;/p&gt;

&lt;p&gt;Check contrast too. A white phone number on a pale brand color may look fine in a design file and fail outdoors on a phone. Run the colors through a contrast checker and aim for at least the AA ratio for normal text.&lt;/p&gt;

&lt;h2&gt;
  
  
  Avoid collisions with other fixed elements
&lt;/h2&gt;

&lt;p&gt;Law firm sites often load a chat widget, a cookie banner and sometimes an accessibility overlay, each of which wants the bottom corner of the screen. If your bar and a chat bubble overlap, users may tap the wrong one or neither.&lt;/p&gt;

&lt;p&gt;Decide on a stacking order and stick to it. Common choices are to move the chat launcher above the bar with a bottom offset, or to fold chat into the bar as the secondary action. Hide the bar while the on-screen keyboard is open on form pages, since it can cover the field the user is typing in. Listening for focus on inputs and toggling a class works on most devices.&lt;/p&gt;

&lt;h2&gt;
  
  
  Show it only where it helps
&lt;/h2&gt;

&lt;p&gt;A call bar on every page is the default, but it is worth reconsidering. On a long charge page, the bar keeps the number in reach. On the contact page, which already shows the number and a form, it adds clutter. On a printable page, such as courthouse directions, hide it in a print stylesheet.&lt;/p&gt;

&lt;p&gt;Some sites reveal the bar only after the visitor scrolls past the first screen, so the hero section stays clean. That can work, but test it. A visitor who wants to call immediately should not have to scroll to find the number.&lt;/p&gt;

&lt;p&gt;Content matters as much as code. The words on the button affect whether people tap it, and plain labels such as "Call now" next to the actual number tend to be clearer than vague promises. This article on &lt;a href="https://sbdmarketing.pages.dev/articles/defense-site-call-button-copy/" rel="noopener noreferrer"&gt;writing the words around the call button on a defense site&lt;/a&gt; covers the copy side.&lt;/p&gt;

&lt;h2&gt;
  
  
  Measure taps without breaking calls
&lt;/h2&gt;

&lt;p&gt;Track taps on the call link as an event in your analytics tool. Attach the listener to the link and do not prevent the default action, so the dialer still opens if the analytics script is slow or blocked. Record which page the tap came from, since that is the data the marketing side will ask for.&lt;/p&gt;

&lt;p&gt;Remember that a tap is not a call. Some users tap and hang up before connecting. If the firm uses a call tracking service, compare tap events with connected calls by page every month to see how far the numbers drift apart.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test on real devices
&lt;/h2&gt;

&lt;p&gt;Emulators catch layout problems, but they miss the details that matter here: the home indicator, the dynamic toolbar in mobile browsers that changes the viewport height while scrolling, and how the bar behaves when the keyboard opens. Test on at least one recent iPhone and one Android phone, held upright and turned sideways, with the system font size turned up.&lt;/p&gt;

&lt;p&gt;For more on design for defense firm websites, the &lt;a href="https://officialsbdmarketing.design.blog/" rel="noopener noreferrer"&gt;law firm website design guides&lt;/a&gt; cover layout, typography and mobile patterns.&lt;/p&gt;

&lt;h2&gt;
  
  
  Questions about sticky call bars
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Does a sticky call bar hurt SEO?
&lt;/h3&gt;

&lt;p&gt;A small bar that does not cover the main content is generally fine. Avoid anything that hides most of the screen on page load, since intrusive overlays can create a poor experience on mobile.&lt;/p&gt;

&lt;h3&gt;
  
  
  Should the bar show on desktop?
&lt;/h3&gt;

&lt;p&gt;Usually not. Desktop visitors rarely place calls from the browser, and a header with the phone number serves them better.&lt;/p&gt;

&lt;h3&gt;
  
  
  Can the bar include a text message option?
&lt;/h3&gt;

&lt;p&gt;Yes, with an &lt;code&gt;sms:&lt;/code&gt; link, if the firm actually monitors that number. Make sure someone replies quickly and that texting fits the firm's intake rules.&lt;/p&gt;

&lt;p&gt;SBD Marketing works only with criminal defense firms, one per city. It designs and builds websites for defense practices, handles SEO for the charges they defend, runs SEO audits and works on visibility in AI search tools.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>css</category>
      <category>a11y</category>
      <category>mobile</category>
    </item>
    <item>
      <title>A/B Testing a Law Firm Site Without Flicker or SEO Trouble</title>
      <dc:creator>SBD Marketing</dc:creator>
      <pubDate>Thu, 12 Nov 2026 23:27:09 +0000</pubDate>
      <link>https://dev.to/sbdmarketing/ab-testing-a-law-firm-site-without-flicker-or-seo-trouble-4nhp</link>
      <guid>https://dev.to/sbdmarketing/ab-testing-a-law-firm-site-without-flicker-or-seo-trouble-4nhp</guid>
      <description>&lt;p&gt;Law firm sites are a hard place to run A/B tests. Traffic is modest, the conversion that matters is a phone call, and the pages being tested are often the same charge pages that bring in most of the firm's search traffic. Add a client-side testing script that hides the page until it swaps in a variant, and you can hurt both the visitor experience and search performance while trying to improve conversions.&lt;/p&gt;

&lt;p&gt;This post covers a setup that avoids the two most common problems: the flicker of original content before a variant appears, and test configurations that confuse search engines. It is aimed at developers and technical marketers who maintain sites for criminal defense firms, though most of it applies to any small service business.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where flicker comes from
&lt;/h2&gt;

&lt;p&gt;Most client-side testing tools work by loading the original page, then running JavaScript that changes headings, buttons or layout for visitors in the variant group. If the script loads late, visitors briefly see the original before it changes. To hide this, many tools add an anti-flicker snippet that sets the page to invisible until the test script finishes.&lt;/p&gt;

&lt;p&gt;On a fast connection that delay is short. On a phone with a weak signal, which describes a lot of people searching for a lawyer late at night, the page can stay blank for a noticeable time. That blank period can lower conversions across both groups, which muddies the test and costs real calls.&lt;/p&gt;

&lt;h2&gt;
  
  
  Assigning variants at the edge
&lt;/h2&gt;

&lt;p&gt;A cleaner approach is to decide the variant before the HTML reaches the browser. Most modern hosts offer some kind of edge function or middleware that runs before a request is served. The function checks for a cookie, assigns a group if there is none and serves the matching version of the page.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="no"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;pathname&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="s2"&gt;"/dui-defense/"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;next&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="n"&gt;group&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cookies&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"ab_dui"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="n"&gt;group&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;group&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;Math&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;random&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mf"&gt;0.5&lt;/span&gt; &lt;span class="o"&gt;?&lt;/span&gt; &lt;span class="s2"&gt;"a"&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"b"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="n"&gt;expires&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;Date&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt; &lt;span class="o"&gt;*&lt;/span&gt; &lt;span class="mf"&gt;864e5&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;cookies&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;set&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"ab_dui"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="n"&gt;group&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"/"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;expires&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;group&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="s2"&gt;"b"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="no"&gt;URL&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;"/variants/dui-defense-b/"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;request&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;next&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The visitor's address bar still shows the original URL, and no client-side swap happens, so there is no flicker. The example follows the style of Netlify's edge functions, where returning a URL rewrites the request. Other hosts have their own APIs, so adapt the cookie and rewrite calls to your platform.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keeping search engines out of trouble
&lt;/h2&gt;

&lt;p&gt;Google publishes guidance on running tests without harming search performance. The main points are simple to follow on a law firm site:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Do not cloak. Googlebot should be treated like any other visitor and can be assigned to a group like anyone else. Do not detect crawlers and always serve them the original.&lt;/li&gt;
&lt;li&gt;If a variant lives at a separate URL, add a rel=canonical tag on it that points to the original page, so the variant is not indexed as a duplicate.&lt;/li&gt;
&lt;li&gt;If you redirect visitors to a variant URL, use a temporary 302 redirect rather than a permanent 301.&lt;/li&gt;
&lt;li&gt;End the test once you have a result, then update the original page and remove the test code.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;With an edge rewrite, the variant shares the original URL, so canonical tags matter less. Still add a noindex or canonical tag to the variant files themselves in case they are ever reached directly.&lt;/p&gt;

&lt;h2&gt;
  
  
  Measuring the right conversion
&lt;/h2&gt;

&lt;p&gt;A test that measures form starts or button clicks may pick a winner that does not bring in more cases. Record the group in your analytics events for calls and form submissions, and pass it to your call tracking tool if it accepts custom fields. That lets you compare actual call volume by variant.&lt;/p&gt;

&lt;p&gt;Expect low traffic to limit what you can learn. Test large differences, such as a rewritten first screen, rather than small ones like button color. For a charge page that already ranks, read this guide on &lt;a href="https://sbd-marketing.webflow.io/articles/charge-page-testing-without-ranking-loss" rel="noopener noreferrer"&gt;testing changes to a charge page without hurting its rankings&lt;/a&gt; before changing headings or main copy in a variant.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cleaning up after the test
&lt;/h2&gt;

&lt;p&gt;Leftover test code causes problems months later. When a test ends, remove the edge function or set it to always serve the winning version, delete the variant files, and clear the cookie by setting it to expire. Update the original page with the winning content so the test infrastructure can go.&lt;/p&gt;

&lt;p&gt;Keep a short log in the repository: dates, hypothesis, variants, traffic, result and the commit that shipped the change. More notes on conversion testing for law firm websites are collected in the &lt;a href="https://officialsbdmarketing.science.blog/" rel="noopener noreferrer"&gt;conversion testing guides for law firm sites&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Questions about A/B testing law firm sites
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Does A/B testing hurt SEO?
&lt;/h3&gt;

&lt;p&gt;Not when it follows Google's guidance: no cloaking, canonical tags on variant URLs, temporary redirects and tests that end once there is a result.&lt;/p&gt;

&lt;h3&gt;
  
  
  How long should a test run on a low-traffic site?
&lt;/h3&gt;

&lt;p&gt;Long enough to collect a meaningful number of calls in each group, which may take weeks or months. Avoid stopping a test early on the first good week.&lt;/p&gt;

&lt;h3&gt;
  
  
  Should I test on the homepage or a charge page?
&lt;/h3&gt;

&lt;p&gt;Charge pages often get more qualified traffic. Test where the visitors who call actually land, which your analytics can show.&lt;/p&gt;

&lt;p&gt;SBD Marketing works only with criminal defense law firms, one firm per city. It builds defense firm websites, handles SEO for the charges a firm defends, works on visibility in AI search tools and runs SEO audits.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>seo</category>
      <category>javascript</category>
      <category>testing</category>
    </item>
    <item>
      <title>Making Law Firm Pages Readable for AI Crawlers That Skip JavaScript</title>
      <dc:creator>SBD Marketing</dc:creator>
      <pubDate>Wed, 11 Nov 2026 23:26:56 +0000</pubDate>
      <link>https://dev.to/sbdmarketing/making-law-firm-pages-readable-for-ai-crawlers-that-skip-javascript-589g</link>
      <guid>https://dev.to/sbdmarketing/making-law-firm-pages-readable-for-ai-crawlers-that-skip-javascript-589g</guid>
      <description>&lt;p&gt;If you build or maintain websites for law firms, there is a quiet problem worth checking on every project. A charge page can look perfect in a browser and still be close to empty for some of the crawlers that feed AI assistants. When the page's main text arrives only after JavaScript runs, a crawler that doesn't run JavaScript sees the shell and little else.&lt;/p&gt;

&lt;p&gt;For a criminal defense firm, that matters. People increasingly ask ChatGPT, Claude and Perplexity who handles DUI or assault cases in their county, and those tools draw on what their crawlers and search partners were able to read. This post covers how to test what those crawlers receive and how to fix the common causes on law firm sites.&lt;/p&gt;

&lt;h2&gt;
  
  
  What we know about AI crawlers and rendering
&lt;/h2&gt;

&lt;p&gt;Googlebot renders JavaScript, with a delay, and has for years. Many other crawlers do not. In late 2024 Vercel published an analysis of crawler traffic across its network reporting that the crawlers run by OpenAI and Anthropic fetched JavaScript files but did not execute them. Crawler behavior can change, and each company documents its own bots, so check current documentation before assuming. The safe working assumption is that any important text should exist in the initial HTML response.&lt;/p&gt;

&lt;p&gt;Which crawlers a firm should allow is a separate decision with its own tradeoffs, covered in &lt;a href="https://sbdmarketing-ai-search.netlify.app/articles/ai-crawlers-defense-website-robots-txt/" rel="noopener noreferrer"&gt;which AI crawlers a criminal defense website should let in&lt;/a&gt;. This post assumes you've made that call and want the allowed crawlers to see real content.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test the raw HTML
&lt;/h2&gt;

&lt;p&gt;The fastest check needs no special tooling. Request the page without a browser and look for a sentence you know appears in the body copy.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -s https://example-firm.com/dui-defense/ &lt;span class="o"&gt;|&lt;/span&gt; grep -c &lt;span class="s2"&gt;"blood alcohol"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;A count of zero means the phrase is not in the server response. Repeat for the headings, the FAQ answers and the lawyer's name. You can also view the source in a browser (not the inspector, which shows the rendered DOM) and search for the same text.&lt;/p&gt;

&lt;p&gt;Run this on a sample of page types: the homepage, a charge page, a lawyer bio, a location page and the contact page. Page builders and themes often treat each type differently.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common causes on law firm sites
&lt;/h2&gt;

&lt;p&gt;Most law firm sites are built on a CMS or a page builder, not a hand-rolled single-page app, but client-side rendering still sneaks in. The usual suspects:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;FAQ sections built as accordions that load their content from a script or an API call after the page loads.&lt;/li&gt;
&lt;li&gt;Tabs on charge pages where only the first tab exists in the HTML.&lt;/li&gt;
&lt;li&gt;Practice area grids populated by a script from a JSON file.&lt;/li&gt;
&lt;li&gt;Headless setups where the front end is a client-rendered framework without server rendering turned on.&lt;/li&gt;
&lt;li&gt;Review widgets and attorney bios injected by third-party embeds.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Accordions themselves are fine. The problem is when the hidden content isn't in the markup at all. An accordion built with the details and summary elements, or with content present in the HTML and toggled by CSS or a small script, passes the test.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fixes that tend to work
&lt;/h2&gt;

&lt;p&gt;For headless builds, turn on server-side rendering or static generation for content pages. Most modern frameworks support it, and charge pages rarely need anything that only works on the client.&lt;/p&gt;

&lt;p&gt;For CMS sites, replace script-loaded components with ones that output their content in the HTML. If a plugin loads FAQ answers by AJAX, swap it or move the content into the page body. For third-party review embeds, consider publishing a small number of approved reviews directly in the HTML, following the bar's rules and the review platform's terms.&lt;/p&gt;

&lt;p&gt;Keep structured data in the initial HTML as well. JSON-LD injected by a tag manager may be read by Google after rendering but not by crawlers that skip scripts.&lt;/p&gt;

&lt;h2&gt;
  
  
  Check after every release
&lt;/h2&gt;

&lt;p&gt;Rendering problems tend to come back when someone installs a new plugin or switches a theme. Add the curl check to whatever release process you have. A short script that fetches a list of key URLs and greps for an expected phrase on each one is enough to catch regressions before they sit unnoticed for months.&lt;/p&gt;

&lt;p&gt;Log results with the date and the deploy that preceded them, so you can match a drop in AI referrals or crawler visits to a specific change.&lt;/p&gt;

&lt;h2&gt;
  
  
  Questions developers ask about AI crawlers
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Does Google's rendering mean we can ignore this?
&lt;/h3&gt;

&lt;p&gt;Not if the firm cares about AI assistants beyond Google. Server-rendered content also helps users on slow phones, which is common for people searching after an arrest.&lt;/p&gt;

&lt;h3&gt;
  
  
  Is dynamic rendering for bots a good fix?
&lt;/h3&gt;

&lt;p&gt;It adds complexity and risks serving different content to bots and users. Server-side or static rendering for everyone is simpler and easier to maintain.&lt;/p&gt;

&lt;h3&gt;
  
  
  What about content behind a click-to-load button?
&lt;/h3&gt;

&lt;p&gt;If the text isn't in the initial HTML, assume script-skipping crawlers won't see it. Put essential answers in the markup.&lt;/p&gt;

&lt;p&gt;For more on AI search and the technology behind legal marketing, see the &lt;a href="https://officialsbdmarketing.tech.blog/" rel="noopener noreferrer"&gt;guides on ChatGPT, AI search and legal marketing technology&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;SBD Marketing works only with criminal defense firms, one per city, and helps with website design, SEO for the charges a firm defends, visibility in AI search tools and SEO audits.&lt;/p&gt;

</description>
      <category>seo</category>
      <category>webdev</category>
      <category>ai</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Splitting a Law Firm Sitemap by Page Type to Debug Indexing</title>
      <dc:creator>SBD Marketing</dc:creator>
      <pubDate>Tue, 10 Nov 2026 23:26:31 +0000</pubDate>
      <link>https://dev.to/sbdmarketing/splitting-a-law-firm-sitemap-by-page-type-to-debug-indexing-56d8</link>
      <guid>https://dev.to/sbdmarketing/splitting-a-law-firm-sitemap-by-page-type-to-debug-indexing-56d8</guid>
      <description>&lt;p&gt;A typical criminal defense firm site has a few hundred URLs: practice pages for each charge, city and courthouse pages, attorney bios and a blog that has grown for years. Most CMS plugins put all of them into a single sitemap file. That works for discovery, but it throws away information you need later, when the firm asks why its new assault page is not showing up in Google.&lt;/p&gt;

&lt;p&gt;Splitting the sitemap by page type is a small change that pays off every time someone has to debug indexing. Search Console reports coverage per submitted sitemap, so separate files let you see at a glance whether charge pages are indexed at a healthy rate while thin city pages are being ignored.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Google does and does not use from a sitemap
&lt;/h2&gt;

&lt;p&gt;Before changing anything, it helps to know which parts of the sitemap protocol matter. Google's documentation says a single sitemap file can hold up to 50,000 URLs or 50 MB uncompressed, and larger sites should use a sitemap index that points to several files. A law firm site will never hit those limits, so the reason to split is diagnostics, not size.&lt;/p&gt;

&lt;p&gt;Google has said it ignores the priority and changefreq values. It does use lastmod, but only when the dates are consistently accurate. A plugin that stamps every URL with today's date on every build teaches Google to ignore your lastmod values entirely. If you cannot produce real modification dates, leave the field out.&lt;/p&gt;

&lt;h2&gt;
  
  
  Choose the groups
&lt;/h2&gt;

&lt;p&gt;Split along the lines the firm actually cares about. For a defense site, a good starting set is:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Charge and practice area pages&lt;/li&gt;
&lt;li&gt;Location pages for cities, counties and courthouses&lt;/li&gt;
&lt;li&gt;Attorney and staff bios&lt;/li&gt;
&lt;li&gt;Blog posts and news&lt;/li&gt;
&lt;li&gt;Utility pages such as contact, about and reviews&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Keep the groups stable. If a URL moves between files every build, the per-sitemap numbers in Search Console become hard to compare over time. Most CMSs can classify pages by template or content type, which is a more reliable signal than URL patterns.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build a sitemap index
&lt;/h2&gt;

&lt;p&gt;The index file lists each child sitemap. Serve it at a predictable path and reference it from robots.txt.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight xml"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;?xml version="1.0" encoding="UTF-8"?&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;sitemapindex&lt;/span&gt; &lt;span class="na"&gt;xmlns&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"http://www.sitemaps.org/schemas/sitemap/0.9"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;sitemap&amp;gt;&amp;lt;loc&amp;gt;&lt;/span&gt;https://example-defense.com/sitemaps/charges.xml&lt;span class="nt"&gt;&amp;lt;/loc&amp;gt;&amp;lt;/sitemap&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;sitemap&amp;gt;&amp;lt;loc&amp;gt;&lt;/span&gt;https://example-defense.com/sitemaps/locations.xml&lt;span class="nt"&gt;&amp;lt;/loc&amp;gt;&amp;lt;/sitemap&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;sitemap&amp;gt;&amp;lt;loc&amp;gt;&lt;/span&gt;https://example-defense.com/sitemaps/attorneys.xml&lt;span class="nt"&gt;&amp;lt;/loc&amp;gt;&amp;lt;/sitemap&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;sitemap&amp;gt;&amp;lt;loc&amp;gt;&lt;/span&gt;https://example-defense.com/sitemaps/blog.xml&lt;span class="nt"&gt;&amp;lt;/loc&amp;gt;&amp;lt;/sitemap&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/sitemapindex&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Each child file follows the normal urlset format. Include only canonical, indexable URLs that return 200. Leave out redirects, pages carrying a noindex tag, paginated archives and filtered views. A sitemap that lists URLs you do not want indexed sends Google a contradictory signal and fills your reports with noise.&lt;/p&gt;

&lt;h2&gt;
  
  
  Generate it from the same source as the pages
&lt;/h2&gt;

&lt;p&gt;The safest setup builds the sitemaps from the same data that renders the pages. In a static site generator, loop over the content collections at build time. In WordPress or another CMS, use the content type and the page's robots setting, so a page that an editor marks noindex drops out of the sitemap automatically.&lt;/p&gt;

&lt;p&gt;Pull lastmod from the content's real update timestamp, not the deploy time. If the firm edits a footer that appears on every page, that change probably should not bump lastmod for all three hundred URLs.&lt;/p&gt;

&lt;p&gt;Add a check to CI that fetches each URL in the generated sitemaps and fails the build if any of them redirect, return an error or contain a noindex directive. On a site this size, the check runs in seconds and catches the mistakes that usually go unnoticed for months.&lt;/p&gt;

&lt;h2&gt;
  
  
  Submit and read the reports
&lt;/h2&gt;

&lt;p&gt;In Search Console, submit the index file under Sitemaps. Google will list each child sitemap with the number of discovered URLs. Then open the Page indexing report and use the sitemap filter to view one group at a time.&lt;/p&gt;

&lt;p&gt;This is where the split earns its keep. If charge pages show nearly all URLs indexed but location pages show half of them under "Crawled - currently not indexed," you have a content problem in one template, not a technical problem across the site. The guide to &lt;a href="https://sbdmarketing.github.io/articles/defense-firm-indexing-problems/" rel="noopener noreferrer"&gt;finding and fixing indexing problems on a defense firm website&lt;/a&gt; walks through what each of those statuses usually means on a law firm site and which fixes to try first.&lt;/p&gt;

&lt;p&gt;Check the reports monthly and after any release that touches templates or routing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Common mistakes on law firm sites
&lt;/h2&gt;

&lt;p&gt;A few patterns turn up again and again:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Staging or preview URLs leaking into the production sitemap&lt;/li&gt;
&lt;li&gt;Old practice areas the firm dropped still listed after the pages were redirected&lt;/li&gt;
&lt;li&gt;Both trailing-slash and non-slash versions of the same URL&lt;/li&gt;
&lt;li&gt;HTTP URLs left over from before the site moved to HTTPS&lt;/li&gt;
&lt;li&gt;Attorney bios for lawyers who left the firm years ago&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each one is minor on its own. Together they make the reports hard to trust, which defeats the point.&lt;/p&gt;

&lt;h2&gt;
  
  
  Questions about law firm sitemaps
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Does splitting the sitemap improve rankings?
&lt;/h3&gt;

&lt;p&gt;No. It improves your ability to see what Google is doing with each kind of page, which helps you find and fix the problems that do affect rankings.&lt;/p&gt;

&lt;h3&gt;
  
  
  Should images and videos get their own sitemaps?
&lt;/h3&gt;

&lt;p&gt;Only if the firm relies on image or video search. Most defense sites can skip them.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I tell Google about a new sitemap?
&lt;/h3&gt;

&lt;p&gt;Submit it in Search Console and list it in robots.txt with a Sitemap line. Google will also find it through the index file.&lt;/p&gt;

&lt;p&gt;More notes on technical SEO for law firm sites are on the &lt;a href="https://officialsbdmarketing.code.blog/" rel="noopener noreferrer"&gt;code and technical SEO site&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;SBD Marketing works only with criminal defense law firms, one firm per city, and helps them with website design, SEO for the charges they defend, visibility in AI search tools and SEO audits.&lt;/p&gt;

</description>
      <category>seo</category>
      <category>webdev</category>
      <category>sitemap</category>
      <category>xml</category>
    </item>
    <item>
      <title>Game-Style Feedback for Law Firm Site Forms and Buttons</title>
      <dc:creator>SBD Marketing</dc:creator>
      <pubDate>Mon, 09 Nov 2026 23:28:08 +0000</pubDate>
      <link>https://dev.to/sbdmarketing/game-style-feedback-for-law-firm-site-forms-and-buttons-3k86</link>
      <guid>https://dev.to/sbdmarketing/game-style-feedback-for-law-firm-site-forms-and-buttons-3k86</guid>
      <description>&lt;p&gt;Press a button in a well-made video game and something happens right away. The character moves, a sound plays, the button glows or the controller vibrates. Players never wonder whether the game registered their input. Game designers treat that instant response as a basic requirement, and players notice at once when it is missing.&lt;/p&gt;

&lt;p&gt;Law firm websites rarely get the same attention. A visitor taps "Call now" and nothing seems to happen for a second. They submit a contact form and the page sits there with no sign it worked. On a criminal defense site, the person tapping is often anxious and in a hurry, so a moment of uncertainty can send them back to the search results. This post covers how to bring game-style feedback to the interactive parts of a law firm site.&lt;/p&gt;

&lt;h2&gt;
  
  
  Respond to every tap within a fraction of a second
&lt;/h2&gt;

&lt;p&gt;Games aim to respond to input within a frame or two. Jakob Nielsen's long-standing guidance on response times puts the limit for feeling instant at about 0.1 seconds. Anything slower and users start to notice the delay.&lt;/p&gt;

&lt;p&gt;Google measures something similar with Interaction to Next Paint, one of the Core Web Vitals. It tracks how long the page takes to visibly respond after a user interacts, and Google describes 200 milliseconds or less as good. Heavy chat widgets, tracking scripts and large JavaScript bundles are the usual reasons a law firm site responds slowly.&lt;/p&gt;

&lt;p&gt;Start by giving every button a visible pressed state in CSS. That costs almost nothing and tells the user the tap registered even if the next step takes a moment.&lt;/p&gt;

&lt;h2&gt;
  
  
  Show progress during anything that takes time
&lt;/h2&gt;

&lt;p&gt;Games show loading bars, spinning icons or animations whenever the player has to wait. The player knows the game is working and roughly how long it will take.&lt;/p&gt;

&lt;p&gt;On a law firm site, form submission is the main wait. When someone submits a contact form, disable the button, change its label to something like "Sending" and show a small spinner. That prevents double submissions and reassures the user. If the request fails, re-enable the button and explain what happened.&lt;/p&gt;

&lt;h2&gt;
  
  
  Make errors clear and fixable
&lt;/h2&gt;

&lt;p&gt;Good games tell players exactly what went wrong and how to fix it. A locked door has a symbol showing which key it needs. A failed jump shows where the player fell short.&lt;/p&gt;

&lt;p&gt;Form errors on many law firm sites do the opposite. They show a generic message at the top of the form or clear every field after a failed submit. Better practice looks like this:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Validate fields as the user leaves them, not on every keystroke&lt;/li&gt;
&lt;li&gt;Show the error message next to the field it belongs to&lt;/li&gt;
&lt;li&gt;Explain the fix in plain words, such as "Please enter a phone number with area code"&lt;/li&gt;
&lt;li&gt;Keep everything the user typed when an error appears&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Screen reader users need to hear these messages too. Connect each error to its field and announce status changes in a live region:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;label&lt;/span&gt; &lt;span class="na"&gt;for&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"phone"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Phone&lt;span class="nt"&gt;&amp;lt;/label&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;input&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"phone"&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"phone"&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"tel"&lt;/span&gt; &lt;span class="na"&gt;aria-describedby&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"phone-error"&lt;/span&gt; &lt;span class="na"&gt;aria-invalid&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"true"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;p&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"phone-error"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Please enter a phone number with area code.&lt;span class="nt"&gt;&amp;lt;/p&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;role&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"status"&lt;/span&gt; &lt;span class="na"&gt;aria-live&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"polite"&lt;/span&gt; &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"form-status"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;Sending your message...&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Confirm success in a way the user cannot miss
&lt;/h2&gt;

&lt;p&gt;When a player finishes a level, the game makes it obvious with a sound, a screen and often a summary of what happens next. The player is never left wondering.&lt;/p&gt;

&lt;p&gt;After a form submits successfully, replace the form with a clear confirmation message rather than a small line of green text. Tell the user what happens next, such as when they can expect a call and from what number. On a defense site, add a reminder not to share case details by email if the firm prefers to discuss them by phone.&lt;/p&gt;

&lt;p&gt;The form itself matters as much as the feedback around it, and this guide on &lt;a href="https://telegra.ph/Designing-an-Intake-Form-a-Frightened-Caller-Will-Finish-11-03" rel="noopener noreferrer"&gt;designing an intake form a frightened caller will finish&lt;/a&gt; covers which fields to ask for and which to leave out.&lt;/p&gt;

&lt;h2&gt;
  
  
  Test like a game studio
&lt;/h2&gt;

&lt;p&gt;Game studios watch real players and note every moment of confusion. Law firm sites can do a lighter version. Ask someone who has never seen the site to find the phone number and send a message on their own phone while you watch. Note any pause, repeated tap or confused look.&lt;/p&gt;

&lt;p&gt;Test on a slow connection as well. Browser developer tools can throttle the network so you see how the site behaves on weak mobile data, which is how many people will reach it.&lt;/p&gt;

&lt;p&gt;For more on interface lessons drawn from games, the &lt;a href="https://officialsbdmarketing.game.blog/" rel="noopener noreferrer"&gt;UX lessons from video game design&lt;/a&gt; site collects related articles.&lt;/p&gt;

&lt;h2&gt;
  
  
  Questions about feedback on law firm sites
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Does a pressed state on buttons really matter?
&lt;/h3&gt;

&lt;p&gt;Yes. It is the cheapest way to tell users their tap registered, and it reduces repeated taps that can cause double calls or duplicate form submissions.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I measure Interaction to Next Paint?
&lt;/h3&gt;

&lt;p&gt;PageSpeed Insights and the Chrome User Experience Report show field data for INP when a site has enough traffic. Chrome DevTools can measure it during local testing.&lt;/p&gt;

&lt;h3&gt;
  
  
  Should a law firm site use sound or vibration like games do?
&lt;/h3&gt;

&lt;p&gt;No. Visual feedback is enough on a website, and unexpected sound or vibration would feel intrusive to most visitors.&lt;/p&gt;

&lt;p&gt;SBD Marketing works only with criminal defense law firms, one firm per city. It builds defense firm websites, handles SEO for the charges a firm defends, works on visibility in AI search tools and runs SEO audits.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>ux</category>
      <category>a11y</category>
      <category>forms</category>
    </item>
    <item>
      <title>Pulling Search Console Data by Charge Page With the API</title>
      <dc:creator>SBD Marketing</dc:creator>
      <pubDate>Fri, 06 Nov 2026 23:27:40 +0000</pubDate>
      <link>https://dev.to/sbdmarketing/pulling-search-console-data-by-charge-page-with-the-api-1ajk</link>
      <guid>https://dev.to/sbdmarketing/pulling-search-console-data-by-charge-page-with-the-api-1ajk</guid>
      <description>&lt;p&gt;If you build or maintain sites for criminal defense firms, sooner or later the lawyer asks a fair question: which charge pages are working? The Search Console web interface can answer that one page at a time, but it gets slow once a site has forty charge pages, a dozen court pages and a blog. Exporting by hand every month is tedious and easy to get wrong.&lt;/p&gt;

&lt;p&gt;The Search Console API makes this repeatable. With one script you can pull clicks, impressions and queries for every URL, group them by charge and hand the firm a report that maps search data to the cases they actually take. This post covers the parts of the API that matter for that job and the traps that catch people the first time.&lt;/p&gt;

&lt;h2&gt;
  
  
  What the API gives you
&lt;/h2&gt;

&lt;p&gt;The searchanalytics.query method returns rows of performance data for a property. You choose the date range, the dimensions to group by and optional filters. Useful dimensions for a law firm report are page, query, date, device and country. Each row comes back with clicks, impressions, click-through rate and average position.&lt;/p&gt;

&lt;p&gt;A few limits shape how you write the script. Google's reference says rowLimit accepts values from 1 to 25,000 and defaults to 1,000. To get more rows you page through with startRow. Google also notes that the method returns top rows rather than every possible row, and its guide on getting all your data says the method exposes at most 50,000 rows per day per search type. For a typical defense firm site that ceiling rarely matters, but it is worth knowing before you promise a complete query list.&lt;/p&gt;

&lt;p&gt;Data usually appears after a delay of two to three days, so set your end date accordingly or the last few days will look empty.&lt;/p&gt;

&lt;h2&gt;
  
  
  Map URLs to charges
&lt;/h2&gt;

&lt;p&gt;The useful part of this report is the mapping. Defense firm sites tend to follow predictable URL patterns, so a small lookup table does the job. Keep it in a config file the firm can read:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;CHARGE_MAP&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/charges/dui&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;DUI&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/charges/drug&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Drug crimes&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/charges/domestic-violence&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Domestic violence&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/courts/&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Court pages&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/process/&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Process pages&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;label&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
    &lt;span class="n"&gt;path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;://&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)[&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
    &lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="n"&gt;prefix&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt; &lt;span class="ow"&gt;in&lt;/span&gt; &lt;span class="n"&gt;CHARGE_MAP&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;items&lt;/span&gt;&lt;span class="p"&gt;():&lt;/span&gt;
        &lt;span class="nf"&gt;if &lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;/&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="n"&gt;path&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nf"&gt;startswith&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;prefix&lt;/span&gt;&lt;span class="p"&gt;):&lt;/span&gt;
            &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="sh"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Other&lt;/span&gt;&lt;span class="sh"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Pull rows with dimensions page and query, label each row, then sum clicks and impressions by label. The firm gets totals per charge, and you keep the query detail underneath for anyone who wants to dig in.&lt;/p&gt;

&lt;h2&gt;
  
  
  Filter out noise before you report
&lt;/h2&gt;

&lt;p&gt;Two kinds of rows distort a local law firm report. Branded queries, which include the firm or lawyer name, inflate clicks on the homepage and bio pages. Foreign impressions can pile up on pages that a scraper copied or that match an unrelated query abroad.&lt;/p&gt;

&lt;p&gt;Handle both with filters. The API supports filter operators including equals, contains, notContains and regex matching, so you can exclude branded terms with a regex and limit the country to the United States in the same request. Keep a separate branded report, because lawyers do want to know how many people search their name.&lt;/p&gt;

&lt;h2&gt;
  
  
  Compare periods the same way every month
&lt;/h2&gt;

&lt;p&gt;A single month of data tells you little. Store each pull in a small database or a dated CSV, then compare the same date ranges: last 28 days against the previous 28, and this month against the same month last year. Seasonal patterns are real in criminal defense. Holiday periods, school calendars and enforcement campaigns all shift search behavior, so year-over-year comparisons are often the fairer view.&lt;/p&gt;

&lt;p&gt;Note any site changes alongside the data: a rewritten DUI page, a new court page, a redirect batch. When a number moves, the lawyer will ask why, and a change log answers that faster than guessing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Present it for lawyers
&lt;/h2&gt;

&lt;p&gt;Lawyers are busy and skeptical of marketing reports full of charts. Keep the output short:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;One table of clicks and impressions by charge, this period against the last.&lt;/li&gt;
&lt;li&gt;The three charge pages with the biggest gains and the three with the biggest losses.&lt;/li&gt;
&lt;li&gt;New queries that appeared this month, which often point to questions the site does not answer.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That last list tends to spark the most useful conversations. If people are suddenly searching a new phrase about license hearings, the firm may need a new section on the DUI page.&lt;/p&gt;

&lt;p&gt;For more on analytics and search data for legal sites, the collection of &lt;a href="https://officialsbdmarketing.data.blog/" rel="noopener noreferrer"&gt;legal marketing analytics and search data guides&lt;/a&gt; has related pieces. Once the report exists, this article on &lt;a href="https://sbdmarketing.github.io/articles/search-console-queries-charge-page-priorities/" rel="noopener noreferrer"&gt;using Search Console queries to choose which charge page to fix&lt;/a&gt; explains how a firm can act on it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Questions about the Search Console API
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Do I need a service account?
&lt;/h3&gt;

&lt;p&gt;You can use OAuth as a user or a service account. A service account works well for scheduled scripts, but it must be added as a user on the Search Console property before it can read data.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why do API totals differ from the web interface?
&lt;/h3&gt;

&lt;p&gt;Grouping by query drops some anonymized queries, so totals grouped by page and query can be lower than page-only totals. Compare like with like.&lt;/p&gt;

&lt;h3&gt;
  
  
  How often should the script run?
&lt;/h3&gt;

&lt;p&gt;Monthly is enough for most firms. Daily pulls help only if you are tracking a specific change and want a stored history.&lt;/p&gt;

&lt;p&gt;SBD Marketing works only with criminal defense law firms, one firm per city, and helps them with website design, SEO for the charges they defend, visibility in AI search tools and SEO audits.&lt;/p&gt;

</description>
      <category>seo</category>
      <category>python</category>
      <category>analytics</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Building a Charge Page Template for a Criminal Defense Site</title>
      <dc:creator>SBD Marketing</dc:creator>
      <pubDate>Thu, 05 Nov 2026 23:26:51 +0000</pubDate>
      <link>https://dev.to/sbdmarketing/building-a-charge-page-template-for-a-criminal-defense-site-36fi</link>
      <guid>https://dev.to/sbdmarketing/building-a-charge-page-template-for-a-criminal-defense-site-36fi</guid>
      <description>&lt;p&gt;If you build or maintain a website for a criminal defense firm, most of your work will end up in one template: the charge page. A typical defense site has twenty to sixty of them, one for each offense the firm handles, sometimes split by county or by first and repeat offenses. They bring in most of the search traffic and most of the calls.&lt;/p&gt;

&lt;p&gt;A good charge page template makes those pages easy for lawyers and editors to write, consistent for readers and fast on a phone. A weak one turns every new page into a custom design job. This post covers how to design the template from the content model up, with notes from the kinds of problems that show up on real law firm sites.&lt;/p&gt;

&lt;h2&gt;
  
  
  Start with a content model, not a layout
&lt;/h2&gt;

&lt;p&gt;Before opening a design tool, define the fields a charge page needs. Lawyers think in terms of the charge, the possible penalties, the court process and common defenses. The CMS should reflect that so editors fill in structured fields rather than one large rich text box.&lt;/p&gt;

&lt;p&gt;A starting model might look like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;charge_page&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;charge_name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;string&lt;/span&gt;        &lt;span class="c1"&gt;# "Domestic Battery"&lt;/span&gt;
  &lt;span class="na"&gt;jurisdiction&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;string&lt;/span&gt;       &lt;span class="c1"&gt;# state or county the page covers&lt;/span&gt;
  &lt;span class="na"&gt;statute_refs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;list&lt;/span&gt;         &lt;span class="c1"&gt;# optional citations, plain text&lt;/span&gt;
  &lt;span class="na"&gt;intro&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;richtext&lt;/span&gt;            &lt;span class="c1"&gt;# first 80-120 words, answers "what now?"&lt;/span&gt;
  &lt;span class="na"&gt;penalties&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;richtext&lt;/span&gt;        &lt;span class="c1"&gt;# reviewed by a lawyer before publish&lt;/span&gt;
  &lt;span class="na"&gt;process_steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;list&lt;/span&gt;        &lt;span class="c1"&gt;# arrest, arraignment, hearings&lt;/span&gt;
  &lt;span class="na"&gt;defenses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;richtext&lt;/span&gt;
  &lt;span class="na"&gt;faq&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;list[question, answer]&lt;/span&gt;
  &lt;span class="na"&gt;attorney&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;reference&lt;/span&gt;        &lt;span class="c1"&gt;# lawyer who handles these cases&lt;/span&gt;
  &lt;span class="na"&gt;related_charges&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;list[reference]&lt;/span&gt;
  &lt;span class="na"&gt;last_reviewed&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;date&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The last_reviewed field matters more than it looks. Penalties and procedures change, and a visible review date helps both readers and the firm keep pages accurate.&lt;/p&gt;

&lt;h2&gt;
  
  
  Design the first screen for a phone
&lt;/h2&gt;

&lt;p&gt;Most people reach a charge page from a phone, often in a stressful moment. The first screen should show the charge name as the heading, a short opening that speaks to the reader's situation and a clear way to call. Large hero images push all of that below the fold, so keep them small or leave them out.&lt;/p&gt;

&lt;p&gt;A sticky call bar at the bottom of the viewport works well on mobile. Use a real tel: link, make the tap target at least 44 by 44 CSS pixels and test that the bar does not cover form fields or the cookie banner. Keep it out of the way on desktop, where a header button usually does the job.&lt;/p&gt;

&lt;h2&gt;
  
  
  Build sections that editors cannot break
&lt;/h2&gt;

&lt;p&gt;Each field in the content model should map to a section component with fixed styling. Editors choose the content, not the fonts, colors or spacing. That keeps forty charge pages looking like one site rather than forty experiments.&lt;/p&gt;

&lt;p&gt;Some practical rules:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Render the FAQ from the structured list so questions use consistent heading levels.&lt;/li&gt;
&lt;li&gt;Generate the related charges block from references, not hand-typed links, so renamed pages do not leave broken links behind.&lt;/li&gt;
&lt;li&gt;Show the attorney card from the referenced bio, including photo and name, so updates in one place flow to every page.&lt;/li&gt;
&lt;li&gt;Limit rich text options to headings, lists, links and paragraphs.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Navigation matters as the number of charge pages grows. This guide on &lt;a href="https://sbdmarketing.pages.dev/articles/defense-firm-site-navigation-menu/" rel="noopener noreferrer"&gt;building a menu for a defense firm with many practice areas&lt;/a&gt; covers how to group charges so visitors and crawlers can find them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Keep it fast
&lt;/h2&gt;

&lt;p&gt;Charge pages compete in local search, and page experience is part of what Google considers. Watch the Core Web Vitals: Largest Contentful Paint, Interaction to Next Paint and Cumulative Layout Shift. On law firm sites, the usual causes of trouble are oversized hero images, chat widgets that load early and block the main thread, and fonts or embeds that shift the layout as they load.&lt;/p&gt;

&lt;p&gt;Set explicit dimensions on images and embeds. Load third-party chat and tracking scripts after the main content. Self-host fonts or limit the number of weights. Test on a mid-range Android phone over a throttled connection rather than only on a fast laptop.&lt;/p&gt;

&lt;h2&gt;
  
  
  Leave room for legal review and compliance
&lt;/h2&gt;

&lt;p&gt;Lawyers need to review penalty and process content before it goes live. Build a draft and review state into the CMS workflow, and record who approved each page. Attorney advertising rules vary by state, and some require disclaimers on certain pages. Add a disclaimer field or a site-wide component that can be switched on per page rather than hard-coding text.&lt;/p&gt;

&lt;p&gt;Accessibility belongs in the template too. Use proper heading order, sufficient color contrast and form labels that screen readers can announce. A person in crisis may be using assistive technology, and an inaccessible contact form loses calls.&lt;/p&gt;

&lt;p&gt;For more design ideas aimed at defense practices, see the collection of &lt;a href="https://officialsbdmarketing.design.blog/" rel="noopener noreferrer"&gt;law firm website design guides&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Questions developers ask about charge page templates
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Should each charge page have its own design?
&lt;/h3&gt;

&lt;p&gt;No. A shared template with structured fields keeps the site consistent and makes maintenance far easier. Variation should come from the content.&lt;/p&gt;

&lt;h3&gt;
  
  
  How do I handle county-specific versions of the same charge?
&lt;/h3&gt;

&lt;p&gt;Use the same template with a jurisdiction field and require unique local content, such as the courthouse and local process, so the pages are not near-duplicates.&lt;/p&gt;

&lt;h3&gt;
  
  
  Where should schema markup come from?
&lt;/h3&gt;

&lt;p&gt;Generate it from the structured fields so it stays in sync with the visible content. Only mark up what is actually on the page.&lt;/p&gt;

&lt;p&gt;SBD Marketing works only with criminal defense law firms, one firm per city. It helps them with website design, SEO for the charges they defend, visibility in AI search tools and SEO audits.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>design</category>
      <category>cms</category>
      <category>seo</category>
    </item>
  </channel>
</rss>
