PluginProbe
Parse.ly / 1.12.1
Parse.ly v1.12.1
3.24.1 3.24.0 3.23.7 3.23.6 3.23.5 3.23.4 3.23.3 3.16.0 3.16.1 3.16.2 3.16.3 3.16.4 3.17.0 3.18.0 3.18.1 3.19.0 3.19.1 3.19.2 3.19.3 3.2.0 3.2.1 3.20.0 3.20.1 3.20.2 3.20.3 All 105 releases
wp-parsely / parsely-javascript.php

parsely-javascript.php in Parse.ly 1.12.1, at parsely-javascript.php

62 lines 1.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php if ( ! isset( $parsely_options['apikey'] ) || empty( $parsely_options['apikey'] ) ) {
2 return;
3 } ?>
4
5 <!-- START Parse.ly Include: Standard -->
6 <?php if ( ! empty( $parsely_options['api_secret'] ) ) : ?>
7 <script data-cfasync="false">
8
9 function uuidProfileCall() {
10 var rootUrl = 'https://api.parsely.com/v2/profile?apikey=<?php echo esc_html( $parsely_options['apikey'] ); ?>';
11 var uuid = '&uuid=' + PARSELY.config.parsely_site_uuid;
12 var requestUrl = rootUrl + uuid + '&url=' + window.location.href;
13 jQuery.ajax({
14 url: requestUrl,
15 dataType: "jsonp"
16 });
17 }
18
19 if (typeof PARSELY == 'object') {
20 var oldonload = PARSELY.onload;
21 if (typeof PARSELY.onload != 'function') {
22 PARSELY.onload = uuidProfileCall
23 }
24 else {
25 PARSELY.onload = function () {
26 if (oldonload) {
27 oldonload();
28 }
29 uuidProfileCall();
30 };
31 }
32 }
33
34 else {
35 PARSELY = {
36 onload: uuidProfileCall
37 }
38 }
39 </script>
40 <?php endif; ?>
41
42 <div id="parsely-root" style="display: none">
43 <div id="parsely-cfg" data-parsely-site="<?php echo esc_html( $parsely_options['apikey'] ); ?>"></div>
44 </div>
45 <script data-cfasync="false">
46 (function (s, p, d) {
47 var h = d.location.protocol, i = p + "-" + s,
48 e = d.getElementById(i), r = d.getElementById(p + "-root"),
49 u = h === "https:" ? "d1z2jf7jlzjs58.cloudfront.net"
50 : "static." + p + ".com";
51 if (e) return;
52 e = d.createElement(s);
53 e.id = i;
54 e.async = true;
55 e.setAttribute('data-cfasync', 'false');
56 e.src = h + "//" + u + "/p.js";
57 r.appendChild(e);
58 })("script", "parsely", document);
59 </script>
60
61 <!-- END Parse.ly Include: Standard -->
62