Skip to content
Docs menuTrack goals › Set up goals

Count a visit to a page

On this page

Count a goal each time a visitor reaches a page, like your thank-you page, with no code on your site.

Before you start

The page must load the CentPath snippet, as Install CentPath shows: a page goal counts the page views the script sends.

1. Open Goals in Setup

  1. In CentPath, open your site and go to Setup → Goals.
  2. Click Add a goal, and under Counts when… pick A page is visited.

2. Type the page's path

  1. In Path, type the path of the page, starting with /, like /thank-you. The field suggests the paths your site has had visits on.
  2. Leave out the domain, and anything from a ? or a #: the goal matches the path alone, so /thank-you?plan=pro counts as a visit to /thank-you.
  3. To count several pages as one goal, use * for any part of the path, at most twice, as in the table below.
PathCounts a visit to
/thank-you/thank-you alone
/blog/*any page under /blog/, like /blog/launch or /blog/2026/notes
/docs/*/install/docs/wordpress/install, /docs/a/b/install and the like

A path matches letter for letter: /Thank-you and /thank-you/ are other pages than /thank-you.

3. Name the goal

  1. Leave Name empty to call the goal after its path, like "Visit /thank-you". Or type a name of your own, like "Bought".
  2. Click Add goal.

The goal counts the visits from before you added it too, as far back as your dashboard keeps them.

Verify the setup

  1. On your live site, open the page.
  2. Open your dashboard and look at the Goals card: the goal is there, under its name, with the times it was reached.

Troubleshooting

Setup refuses the path

Type the path alone, starting with /: no domain, no ? and no #. A path can hold at most two *.

The goal counts nothing

  1. Open the page and check the path in your browser's address bar, letter for letter, with or without its ending /.
  2. Check that the page loads the snippet: Check your installation shows how.
  3. In a single-page app, check that the page has a path of its own. The script counts a new page each time the path changes, never a change after a #: see The script.

The goal doesn't count toward Goal conv.

Goal conv. counts the visitors who reached an event goal that counts as a conversion, or who bought: see Set up goals. A page goal is read from the pages a visit saw instead, so it isn't part of it. To count reaching a page as a conversion, send an event goal from that page, as Send goals from JavaScript shows.

You want to change the path

On the goal's row in Setup → Goals, click Edit, change Path, then click Save. The goal counts the new path, past visits included.