Difference between revisions of "Common.js"

From SchemeServe Help
Jump to: navigation, search
(Created page with "<script type="text/javascript"> // Set to false if opt-in required var trackByDefault = true; function acEnableTracking() { var expiration = new Date(new...")
(No difference)

Revision as of 05:20, 24 August 2018

<script type="text/javascript">

   // Set to false if opt-in required
   var trackByDefault = true;
   function acEnableTracking() {
       var expiration = new Date(new Date().getTime() + 1000 60 60 24 30);
       document.cookie = "ac_enable_tracking=1; expires= " + expiration + "; path=/";
       acTrackVisit();
   }
   function acTrackVisit() {
       var trackcmp_email = ;
       var trackcmp = document.createElement("script");
       trackcmp.async = true;
       trackcmp.type = 'text/javascript';
       trackcmp.src = '//trackcmp.net/visit?actid=1000065698&e=' + encodeURIComponent(trackcmp_email) + '&r=' + encodeURIComponent(document.referrer) + '&u=' + encodeURIComponent(window.location.href);
       var trackcmp_s = document.getElementsByTagName("script");
       if (trackcmp_s.length) {
           trackcmp_s[0].parentNode.appendChild(trackcmp);
       } else {
           var trackcmp_h = document.getElementsByTagName("head");
           trackcmp_h.length && trackcmp_h[0].appendChild(trackcmp);
       }
   }
   if (trackByDefault || /(^|; )ac_enable_tracking=([^;]+)/.test(document.cookie)) {
       acEnableTracking();
   }

</script>