My site builder only lets me paste code into the page head. Is that enough to add analytics?

Yes. The PostDeploy Analytics snippet is one script tag, so a head code field that applies to every page is enough to count pageviews, sources and page goals. List your custom domain on the Project, publish, and run the collection check. A thank-you page goal needs no extra code.

Last updated 26 November 2026. By Paul Badarau.

A fictional wedding photographer runs a site on a builder, with the custom domain example.com. While editing, the builder also shows the site at its own preview address.

  1. Find the builder's site-wide head code setting. Builders call it custom code, code injection or header code. A field on a single page adds the snippet to that page only.
  2. Paste the snippet from the Project's tracking setup and save. Builders often run custom code only on the published site, so publish before you test.
  3. Make the custom domain the Project's hostname, and add the www form as an alias if visitors use it. Leave the builder's preview address off the list. Visits there are not collected, which keeps your own editing out of the reports.
  4. If the contact form sends people to a page such as /thank-you, add a goal with the matching rule Exact page path and that path. A page goal needs no code beyond the snippet.
  5. Open the published site and run the collection check.

If the builder changes pages without a full reload, PostDeploy Analytics still counts them, because the script sends a pageview on each single-page navigation.

A head field falls short in these cases:

  • The field covers only some pages, or your builder plan does not allow custom code. Check the plan before you count on it.
  • The builder changes the tag when it saves. The collection check then shows no event, and you should compare the saved code with the snippet.
  • You want click goals, such as clicks on an email or phone link. Those need a short script that calls postdeploy.track, which the same field can hold if it accepts inline scripts.
  • The form or checkout runs on the builder's own domain. The snippet is not there to count it, so make the goal the page your site shows after the form is sent.

Some builders hold all custom code until a visitor accepts a cookie notice. With that setting on, Analytics counts only the visitors who accept, even though its script sets no cookies.

The product page for this is Analytics.

Start your 14-day free trial