Moved kissmetrics code from php to js