Skip to main content

Naming conventions and allowed characters

How to build tag names and ref_ids that upload cleanly and update instead of duplicating.

Why naming matters

Measure uses identifiers (tag names and ref_ids) to decide whether an uploaded row is new or an update. Identifiers are matched exactly, character for character:

  • Denver-HQ and denver-hq are two different records.

  • denver-hq and denver-hq (with a trailing space) are two different records.

  • A hyphen (-) and an en dash (–) look alike but make two different records.

A small difference in an identifier creates a duplicate instead of updating your data, and the two often look identical on screen. Consistent naming prevents this.

Recommended conventions

Each record has a readable display field and an identifier that mirrors it in lowercase, with spaces and punctuation replaced by hyphens.

Record

Display field

Identifier

Example

Facility tag

title: facility name plus only what's needed to tell it apart

name

Langley - Warehouse → langley-warehouse

Activity

label: <Facility> - <Type> plus any detail needed

ref_id

Leland Warehouse - Propane Forklift #3 → leland-warehouse-propane-forklift-3

Consumption

none

ref_id

<activity_ref_id>-<starts_at>-<ends_at>

Emission factor

none

ref_id

<activity_ref_id>-<starts_at>-<ends_at>-<method>

When two facilities share a name, add only what you need to tell them apart, such as division, type or city. For example, "Portland - Rugby" and "Portland - Novo."

Allowed characters in a tag name

Measure enforces these rules:

  • Letters (A–Z) and digits (0–9)

  • Hyphens, underscores and periods, but only between letters or digits, and only one at a time

  • Must start and end with a letter or digit

  • No spaces, other punctuation or accented characters. Replace accented letters with plain ones (Zürich → zurich).

Valid

Invalid

Why

langley-warehouse

Langley - Warehouse

Contains spaces

site_01

langley--warehouse

Two separators in a row

plant.a.2

-langley

Starts with a separator

zurich-hq

Zürich

Accented character

edcams02

north/south

Slash isn't allowed

We recommend all lowercase, since identifiers are case-sensitive.

Allowed characters in a tag type

Tag types follow different rules from tag names: lowercase letters, digits and underscores only. facility_type is valid as a type. facility-type is not.

ref_ids

Measure accepts almost any characters in a ref_id, but we strongly recommend following the same rules as tag names, in lowercase. In particular, never use:

  • A colon (:) or semicolon (;)

  • Leading or trailing spaces

  • Invisible characters, such as non-breaking spaces copied from a PDF or web page

  • A leading =, + or -. Exports add an apostrophe in front of these, so re-uploading an exported file creates a duplicate.

Keep identifiers stable

Once a record exists, keep its identifier the same in every future upload. Changing a ref_id or tag name, even to fix a typo, creates a new record rather than renaming the old one. To rename a record, delete the old one and upload the new one. See How imports work.

Did this answer your question?