Plugin Directory

Changeset 1200469


Ignore:
Timestamp:
07/16/2015 08:31:26 PM (11 years ago)
Author:
cliffcrocker
Message:

Updated the script loader for version 2.0

Location:
mpulse-real-user-measurement/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • mpulse-real-user-measurement/trunk/mpulse-real-user-measurement.php

    r738400 r1200469  
    7979function mpulse_add_rum_header() {
    8080?>   
    81     <script type='text/javascript'>(function(){
    82     var dom,doc,where,iframe = document.createElement('iframe');
    83     iframe.src = "javascript:false"; iframe.title = ""; iframe.role="presentation";
    84     (iframe.frameElement || iframe).style.cssText = "width: 0; height: 0; border: 0";
    85     where = document.getElementsByTagName('script')[0];
    86     where.parentNode.insertBefore(iframe, where);
    87     try {
    88         doc = iframe.contentWindow.document;
    89     } catch(e) {
    90     dom = document.domain;
    91     iframe.src="javascript:var d=document.open();d.domain='"+dom+"';void(0);";
    92     doc = iframe.contentWindow.document;
    93     }
    94     doc.open()._l = function() {
    95     var js = this.createElement("script");
    96     if(dom) this.domain = dom;
    97     js.id = "boomr-if-as";
    98     js.src = '//c.go-mpulse.net/boomerang/' +
    99     '<?php echo get_option('mpulse_api_key');?>';
    100     BOOMR_lstart=new Date().getTime();
    101     this.body.appendChild(js);
    102     };
    103     doc.write('<body onload="document._l();">');
    104     doc.close();
    105     })();</script>;
     81<script>
     82(function(){
     83  if(window.BOOMR && window.BOOMR.version){return;}
     84  var dom,doc,where,iframe = document.createElement('iframe');
     85  iframe.src = "javascript:false";
     86  iframe.title = ""; iframe.role="presentation";
     87  (iframe.frameElement || iframe).style.cssText = "width:0;height:0;border:0;display:none;";
     88  where = document.getElementsByTagName('script')[0];
     89  where.parentNode.insertBefore(iframe, where);
    10690
     91  try {
     92    doc = iframe.contentWindow.document;
     93  } catch(e) {
     94    dom = document.domain;
     95    iframe.src="javascript:var d=document.open();d.domain='"+dom+"';void(0);";
     96    doc = iframe.contentWindow.document;
     97  }
     98  doc.open()._l = function() {
     99    var js = this.createElement("script");
     100    if(dom) this.domain = dom;
     101    js.id = "boomr-if-as";
     102    js.src = '//c.go-mpulse.net/boomerang/' +
     103    '<?php echo get_option('mpulse_api_key');?>';
     104    BOOMR_lstart=new Date().getTime();
     105    this.body.appendChild(js);
     106  };
     107  doc.write('<body onload="document._l();">');
     108  doc.close();
     109})();
     110</script>;
    107111<?php
    108112}
  • mpulse-real-user-measurement/trunk/readme.txt

    r738117 r1200469  
    22Contributors: SOASTA
    33Tags: SOASTA, mPulse, RUM, performance, perf, webperf, analytics, real time analytics, real user measurement, real user monitoring
    4 Stable tag: 1.0
     4Stable tag: 2.0
    55Requires at least: 2.0
    6 Tested up to: 3.5.2
     6Tested up to: 4.2
    77
    88How fast do your users think your site is, really? How fast should it be? How do you get there?
     
    1414== Installation ==
    1515
    16 1. If you haven't already, create an mPulse Lite account at http://www.soasta.com/free/ and copy your API key once you've configured a domain
     161. If you haven't already, create an mPulse account (http://www.soasta.com/mpulse/ and copy your API key once you've configured a domain
    17172. Install the WordPress plugin
    1818    - Directly from WordPress admin: 'Plugins' > 'Add new'. Search for "SOASTA", "mpulse", or "Real User Monitoring" and "Install Now"
     
    3131== Changelog ==
    3232
     33= 2.0 =
     34* Changed the script loader code
     35
    3336= 1.0 =
    3437* Initial version
Note: See TracChangeset for help on using the changeset viewer.