DocsStart here

Install on any site

Add Datacenter to any website. Paste one line into the head of every page, or into the head code setting your site builder has.

On this page

Every website can run Datacenter. You paste one line into the <head> of each page.

Before you start

Copy your tag. In Datacenter, open Set up your site, or open your site's Settings. Your tag looks like this, with your own address:

HTML
<script defer data-site="yoursite.com" src="https://datacenter.so/s.js"></script>

Steps

  1. Open the HTML of each page, or the header file all pages share.
  2. Paste the tag just above </head>.
  3. Save, then upload or publish the change.

Using a site builder?

Most builders have a setting called head code, header code, custom code or code injection. Paste the tag there. It then runs on every page. We have step-by-step guides for Shopify, WordPress, Squarespace, Wix, Webflow, Framer and Google Tag Manager.

What the one line does

On paid plans, a new site starts with 90-day tracking, and the tag in setup loads sa.js instead of s.js. That one line then does three things, with no second step:

  • Visits. Every page view, with where the visitor came from.
  • Sales and goals. Conversions tie back to the ad or link that brought the visitor, for 90 days.
  • People. Someone who signs up, signs in or sends a form with an email field is added to Profiles, with their email and name. Password and card fields are never read.

With Wait for consent on, the tag stores and sends nothing about a person until they agree. On Free, the plain tag counts visits only.

Then your site never shows a sign-in form, so the tag has nothing to read. Add one more line, called right after someone signs in:

JavaScript
window.datacenter?.('identify', { email, name, id });

email, name and id are the person's email, name and your own user id. Send at least one of email or id. Setup shows this line under Signs people in with Google or a magic link? Add one more line, on the install step, and the email to your developer includes it. Sign-up and sign-in forms with an email field need nothing.

Check it works

Go back to Datacenter. On the last setup step, click Check my site. Then open your site in a new tab. Your first visit shows up in a minute or two.

Good to know

  • Add the tag once per page, not twice.
  • Single page apps need the tag once, in the main HTML file. See Add the script.
  • Need someone else to do it? On step 2 of setup, press Email it or Text it under Send it to your web person. The message goes from your own email or phone, with the steps and your site's code already in it.

Something missing or wrong? Email hello@datacenter.so.