Tracking code
The tracking code needs to be on every page of your website in order to track it.
Your site's numeric site ID is shown on your
site preferences page (and via the
account API), and goes in the
data-id attribute.
Standard (recommended)
Paste directly before the closing </body> tag of every page. Many sites have a single footer or layout template that does this site-wide.
<script async data-id="SITE_ID" src="//static.getclicky.com/js"></script>
Tag manager (GTM, etc)
Use a Custom HTML tag with the script tag below (some tag managers want only the raw javascript, without the <script> tags, so double check). Tag manager code cannot include the affiliate badge, so use one approach or the other.
<script>
(function() {
var s = document.createElement('script');
s.type = 'text/javascript';
s.async = true;
s.src = '//static.getclicky.com/js';
s.setAttribute('data-id', SITE_ID);
( document.head || document.body ).appendChild( s );
})();
</script>
Plugins
Check the many
web analytics plugins (WordPress, etc) that will install the tracking code automatically. Some have additional features like goals and tracking logged-in users.
📢 Agent-ready Analytics
Join Clicky today and let your agent generate reports for you