White label » Best practices

This page covers best practices that we recommend for your white label service.

Put your tracking code on a CDN
Sender Policy Framework for email
DNS "A" records vs "CNAME" records
Stay up to date with our blog
Providing users access to their stats
Automatically register new users and sites with the white label API


Put your tracking code on a CDN

A CDN distributes static files on various servers around the world, so that when a visitor goes to a web site with our tracking code installed, it is downloaded from a server that is geographically close to that visitor. This ensures there is as little "lag" as possible when loading a web site with the tracking code installed.

We have a secondary generic domain name, staticstuff.net, that points to our CDN and also supports HTTPS. In your white label admin area, you have the option to use this for tracking instead of your branded domain. (This only applies to the tracking code that your users install on their site, and nothing else). By default this option is enabled for new white label accounts. There is no extra charge for this, so we highly recommend using it.

If you decide not to do this, however, then we recommend putting a copy of the tracking code file on your own CDN.

All you need to do is download your white label's tracking code javascript file and put it on your CDN. Then, simply change the code that you paste onto your customer's sites so that it points to this code instead.

Here is an example. If your white label domain is stats.mysite.com, your tracking code javascript file would be located at stats.mysite.com/js. Download this file, rename it something like "stats.js", and upload it your CDN. Most CDNs let you create a "C name" (with DNS) so you can use a sub-domain like cdn.mysite.com instead of 1h2j123j132jk.cdn.some-company.com. We'll assume you have a "C name" setup.

Here is what your "default" tracking code looks like:

<script src="http://stats.mysite.com/js" type="text/javascript"></script>
<script type="text/javascript">mysite.init( 123 );</script>


Here is what your CDN tracking code would look like, with the change highlighted in red:

<script src="http://cdn.mysite.com/stats.js" type="text/javascript"></script>
<script type="text/javascript">mysite.init( 123 );</script>



CDN recommendations

Here are a couple of popular CDNs to get you started:



Sender Policy Framework (SPF) for email

Clicky has an email report feature that is also included in your white label service. However, these email reports are sent from our server, not yours. The reason this matters is that a lot of anti-spam software checks what IP addresses are authorized to send email for a domain. They do this by querying your domain's DNS for a Sender Policy Framework. It's important you have an SPF declared in your DNS, regardless of using our white label service, so that no one can impersonate emails from your domain.

If you already have SPF set up...

Just add this declaration to it and you're gold:

ip4:198.145.13.0/26


If you do not have SPF set up...

You need to get busy! We recommend OpenSPF, which only requires you to fill out a small form to create your SPF record. In the part where it asks you for IP4 addresses, use the text below for one of your entries, which is the IP block that belongs to Clicky. You'll of course want to add your own server IP addresses as well.

[As of Dec 2015, the OpenSPF form no longer works. Please search Google for help with SPF syntax.]

198.145.13.0/26

To get this into your DNS, you just need to create a new TXT record, and paste in the block of code that OpenSPF gives you.

By completing these steps, there is a far greater likelihood that our emails will be delivered to your customers without issue.



DNS "A" records vs "CNAME" records


ALWAYS USE A CNAME FOR YOUR WHITE LABEL DNS.

DO NOT, UNDER ANY CIRCUMSTANCES, USE AN "A" RECORD.


When we setup a white label account, we specifically state that you need to set it up your DNS an a CNAME record. If you go against this request, you do so at your own risk.

This is because we cannot guarantee our IP will remain the same forever. If our IP does change and your white label breaks because you set it up as an A record, we cannot be held responsible for any outages.

SO PLEASE... DON'T DO IT!



Stay up to date by subscribing to our blog

Clicky is contstantly being updated with new features, and you'll definitely want to know about them. Whenever we release major new features, we always blog about it. So the best way to stay up to date is by subscribing to our blog.



Providing users access to their stats

There are two ways you can provide a user with access to the stats for their site(s). The first way is to have them come to your white label domain and login with a username and password that you have created for them, or that they have chosen. They would have to know what your stats domain is, though. You would either let them know, or have a link to it from your main web site.

We also offer an iframe optimized solution, so you can include the stats inside of your own web site. This is the way we recommend doing things, as it also includes the ability to automatically log the user in, making the experience completely seamless.

To learn more about our iframe solution, click here.



Automatically register new users and sites with the white label API

Your white label is a closed system, which means that users cannot create account directly. You, the admin, must create accounts for your users.

We have made an API just for white label users to fully automate this process. You can learn how to use it in the white label API documentation.

The API also lets you make your system open, if you wish. Using the API, you can create pages on your own web site that talk to our API, so you can have new users register and add new sites to their white label. If your white label stats will only be available to existing users of whatever service it is you provide, and they must login to your web site to use it, another option to consider is just having an "opt in to stats" button. When a user clicks that, you could just send their information to our API automatically and they'd be ready to start tracking their site in just a couple of seconds.