Should my staging site send analytics, and how do I keep it separate?

Usually no. Leave a staging hostname off the alias list and skip the production snippet, because only the canonical host and aliases are collected. For separate numbers, give staging its own Project. Reports stay apart and still share the Workspace pageview allowance. A path on the production host is an excluded prefix.

Last updated 26 November 2026. By Paul Badarau.

A fictional studio ships shop.example.com and reviews the next release on staging.shop.example.com. The production report is how they decide what sold. Staging visits would make that number mean something else.

Leave staging out when the report should describe the public site.

  • A different hostname is not collected unless it is the canonical hostname or a listed alias. Do not add staging.shop.example.com, and do not paste the production snippet on that site. An alias is collected into the same Project, so those pageviews would land in the production report.
  • Each alias is an exact hostname. A Project holds at most 20, and a hostname cannot belong to two Projects.
  • A path on the production host, such as /preview, is an excluded prefix. The prefix drops that path, pages under it, and later pages of a visit that started there. A Project holds 20 prefixes. Stored history stays.
  • localhost cannot be saved. The hostname check asks for a DNS name such as example.com.

Want the staging numbers in their own report? Create a second Project and set the staging hostname as its canonical host. Install that Project's snippet only on staging. The two reports do not mix.

They still share one allowance. Standard includes 25,000 pageviews a month for the Workspace, across every Project. A monthly limit is soft. Collection continues, and the Owner is warned. A busy staging site can spend the allowance the public site needed.

The product page for this is Analytics.

Start your 14-day free trial