Install the analytics script
Add the snippet
Section titled “Add the snippet”- In Checkend, add your site.
- Copy its snippet.
- Paste it in the
<head>of every page. - Deploy your site.
The snippet has this form:
<script defer data-domain="example.com" data-verify="YOUR_SITE_KEY" src="https://app.checkend.com/s.js"></script>Use the snippet from your account, because the key is different for each site.
For WordPress, use a plugin that adds code to the header, for example WPCode.
Verify the domain
Section titled “Verify the domain”The first visit starts a check of your home page. The check looks for the key in the HTML of https://your-domain/.
If a tag manager adds the snippet, the key is not in that HTML. Use a DNS record:
| Field | Value |
|---|---|
| Type | TXT |
| Name | Your domain, or _checkend.your-domain |
| Value | checkend-verify=YOUR_SITE_KEY |
Then click Check now in the settings of the site.
What the script counts
Section titled “What the script counts”- Pageviews, also when a single-page app changes the path.
- Clicks on links to other sites, as
Outbound Link: Click. - Your custom events.
A change of only the query or the # part of an address is not a new pageview.
Visits that are not counted
Section titled “Visits that are not counted”- Bots that Checkend recognizes, and automated browsers.
- Pages on localhost. Add
data-allow-localhostto the script to send events from localhost. - The excluded IP addresses in the settings of the site.
- A browser in which you set
localStorage.checkend_ignore = 'true'on your site.