Embedding your script to your site

Every site you create on tinylytics has its own unique embed code. It's tied to your domain that you've entered and will only load on that domain you have entered.

Note that if you have a domain like example.com and your site then actually loads on www.example.com and doesn't redirect to example.com we will ignore it. We might change this in future. www is treated as a subdomain and a different website.

When you create your site, you'll be presented with your embed code:

Click on the code and then copy it to your clipboard.

Depending on your website, and provider, add this script below the footer of your site (or before the closing body tag). We'll add specific guides for different providers at later stage.

An alternative approach to adding the script to your page, because perhaps your provider won't allow you to (for example Write.as), and instead use Javascript only, you can use the following:

let script = document.createElement("script");
script.type = "text/javascript";
script.defer = true;
script.src = "https://tinylytics.app/embed/YOUR_UNIQUE_SITE_CODE.js";

Just replace YOUR_UNIQUE_SITE_CODE with the code found on your site's page.

Note that if you're using a development domain, and it does not match the site's domain you set up, then no hits will be recorded. We suggest you add a separate site for testing purpose, with your test URL.

And that's all there is to it. Once you load the site, it'll start collecting hits. If not, double check the domain. If you'r still struggling, please get in touch.