JSFiddle - React, Tailwind, and code Playground

by trolleymusic

HTML

<script src="https://raw.github.com/carlo/jquery-browser-fingerprint/master/src/jquery.browser-fingerprint-1.1.min.js"></script>
<script src="https://raw.github.com/wbond/md5-js/master/md5.js"></script>

JavaScript

/* https://developers.google.com/analytics/resources/articles/gaTrackingTroubleshooting#gifParameters */

(function($) {
    $.fn.gaq = function(settings) {

        this.loadtime = (new Date()).getTime();
        this.beacon = 'http://www.google-analytics.com/__utm.gif';

        this.params = {
            version: '1',
            // ?
            domain: settings.domain || (window.location.protocol + '//' + window.location.host),
            account: settings.account,
            hostname: settings.hostname || document.location.hostname,
            language: settings.language || navigator.language,
            charset: settings.charset || (document.characterSet || document.charset),
            title: settings.title || document.title,
            //unique: $.fingerprint(),
            unique : $.fingerprint().replace(/[^0-9]/g, ''),
            pageview : settings.pageview || window.location.pathname
        }

        this.rand = function(min, max) {
            if (!min) {
                min = 0;
            }
            if (!max) {
                max = 1;
            }
            return Math.floor(Math.random() * (max - min)) + min;

        }

        this.getcookie = function() {
            var time = (new Date()).getTime();
            var c = [];
            c.push('__utma=' + [this.params.unique, //cookie number
                this.rand(0, 2147483647), //number under 2147483647
                this.loadtime, //time cookie first set
                this.loadtime, //time cookie previous set
                time, //time today
                3].join('.'))
            c.push('__utmb=' + this.params.unique); //cookie number
            c.push('__utmc='+ this.params.unique); //cookie number
            c.push('__utmz=' + [this.params.unique, time, 3, 2,'utmccn=(organic)|utmcsr=google|utmctr=seo+optimal+keyword+density|utmcmd=organic;'].join('.'));
c.join(';')
            return c.join(';')
        }
        
        this.querymap = function() {
     ...