GoatCounter documentation (original) (raw)

Getting started

Getting started is pretty easy, just add the following JavaScript anywhere on the page:

Check if your adblocker is blocking GoatCounter if you don’t see any pageviews (goatcounter.com and/or gc.zgo.at domain).

Integrations

Endpoint

You’ll need to copy this to the integration settings

Paste the following in Custom Javascript in the Customize page:

const script = document.createElement('script'); script.setAttribute('defer', true); script.setAttribute('src', 'https://gc.zgo.at/count.js'); script.setAttribute('data-goatcounter', 'https://MYCODE.goatcounter.com/count'); document.body.appendChild(script);

After setup

Here are some things you may want to look at after setting up the above:

<link rel="canonical" href="https://example.com/path.html">  

See Control the path that’s sent to GoatCounter for more details.

Feel free to get in touch if you’ve got any questions or having any problems; a lot of times they can be resolved without too much problems.

Ways to contact me: show