StatelessID

Blogger

Blogger lets you edit the HTML of your theme directly. Add the snippet once to the theme template and it will appear on every post and page on your blog.

Open the theme HTML editor

Log in to Blogger and go to your blog's dashboard. In the left menu, click Theme. On the Theme page, click the dropdown arrow next to the Customize button and choose Edit HTML. The theme source code opens in a text editor.

The Blogger theme XML format can look intimidating, but you only need to find one place: look for the string </body> near the very bottom of the file. Everything above it is template content that renders the blog.

Paste the StatelessID snippet just above the </body> tag. Then click Save theme (the disk icon, or the Save button). Blogger will validate the XML and save if there are no errors.

Handling the Blogger XML template format

Blogger templates are valid XML, which means certain characters must be escaped. The StatelessID snippet is a plain <script> tag with no quotes or angle brackets inside the JavaScript itself — it is safe to paste directly without any escaping.

If the template editor throws an XML parsing error after you save, the most common cause is a stray character or an angle bracket that was accidentally typed near the snippet. Delete the snippet, paste it fresh from the dashboard copy, and try saving again.

Do not paste the snippet inside a <b:section> or <b:widget> block. Those are Blogger widget containers. Paste it outside all widget blocks, just before the final </body> tag.

Confirming the install and testing on Blogger

After saving the theme, click View blog to open your blog in a new tab. Load any post or the homepage. Then open your StatelessID dashboard and look at today's page views. Within a minute you should see a count.

View source on the Blogger page (right-click → View Page Source) and search for "asset.js". If you find it, the snippet is live. If you do not find it, the save did not apply — go back to the theme editor and confirm the snippet is still there.

Blogger's own stats may show different numbers than StatelessID. Blogger counts views differently, including bot traffic. StatelessID fires on real browser load events with JavaScript execution. The numbers will not match, and that is expected.

Custom domains on Blogger

If your Blogger blog is at yourblog.blogspot.com, register that URL in your StatelessID dashboard and use its key. If you have set up a custom domain (Settings → Publishing → Custom domain), the blog serves from your custom domain instead.

When a custom domain is active on Blogger, visitors reach the blog via the custom domain and the beacon fires under that origin. Register your custom domain in the StatelessID dashboard and update the key in the theme HTML.

Blogger redirects blogspot.com URLs to the custom domain automatically. So blogspot.com visitors are redirected before any page renders, and the snippet only fires on the custom domain — consistent with how redirect-based tracking works everywhere else.

Troubleshooting

The theme editor shows a parsing error when I try to save. Blogger's template editor requires valid XML. Copy the snippet text again from your dashboard and paste it fresh. Make sure there are no extra characters or line breaks inside the tag attributes. The most common cause is an accidental key press that adds an invalid character.

I saved the theme but my blog shows a blank page. An XML error in the template can cause Blogger to fail to render any posts. Go back to the theme editor and look for the error indicator. Undo the change with Ctrl+Z in the editor or use the Revert to classic theme option to restore a known-good state, then re-add the snippet carefully.

The snippet fires on posts but not on the blog homepage. Blogger's homepage is a different template section than individual posts in some themes. Make sure the snippet is placed globally before </body> and not inside a conditional section that only applies to posts.

Similar pages