summaryrefslogtreecommitdiffstats
path: root/includes/header.php
diff options
context:
space:
mode:
authorraylu <raylu@mixpanel.com>2012-04-25 23:19:52 -0700
committerraylu <raylu@mixpanel.com>2012-04-25 23:19:52 -0700
commitdf71da70062b9f70d9906fa7df7350d47be79acc (patch)
treec6deaaa183640703fefb5068e02c7a2aa96aec68 /includes/header.php
parentc8783d4dc257913ba527d469c88d7b97770be3de (diff)
downloadpathery-df71da70062b9f70d9906fa7df7350d47be79acc.tar.xz
add tutorial and map difficulty tracking
Diffstat (limited to 'includes/header.php')
-rw-r--r--includes/header.php26
1 files changed, 14 insertions, 12 deletions
diff --git a/includes/header.php b/includes/header.php
index 3f83530..a1dbfa4 100644
--- a/includes/header.php
+++ b/includes/header.php
@@ -19,6 +19,20 @@ function htmlHeader($css = array(), $title = 'Pathery', $desc = '') {
?>
<script src="js/ajax.js" async="async"></script>
<script src="js/mapspecs.js"></script>
+
+ <script>
+ (function(d,c){var a,b,g,e;a=d.createElement("script");a.type="text/javascript";a.async=!0;a.src=("https:"===d.location.protocol?"https:":"http:")+'//api.mixpanel.com/site_media/js/api/mixpanel.2.js';b=d.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b);c._i=[];c.init=function(a,d,f){var b=c;"undefined"!==typeof f?b=c[f]=[]:f="mixpanel";g="disable track track_pageview track_links track_forms register register_once unregister identify name_tag set_config".split(" ");
+ for(e=0;e<g.length;e++)(function(a){b[a]=function(){b.push([a].concat(Array.prototype.slice.call(arguments,0)))}})(g[e]);c._i.push([a,d,f])};window.mixpanel=c})(document,[]);
+ mixpanel.init("24743c6567f831ddfcbbbd3f397e11e4");
+<?php
+ if ($_SESSION['accepted'] == 1) {
+ if ($_SESSION['displayName'] != 'noname')
+ echo 'mixpanel.name_tag(' . json_encode($_SESSION['displayName']) . ');';
+ if ($_SERVER['HTTP_HOST'] == 'www.pathery.com')
+ echo 'mixpanel.identify(' . json_encode($_SESSION['userID']) . ');';
+ }
+?>
+ </script>
</head>
<?php
}
@@ -53,18 +67,6 @@ function htmlFooter() {
ga.src = ('https:' == proto ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
s.parentNode.appendChild(ga, s);
})();
-
- (function(d,c){var a,b,g,e;a=d.createElement("script");a.type="text/javascript";a.async=!0;a.src=("https:"===d.location.protocol?"https:":"http:")+'//api.mixpanel.com/site_media/js/api/mixpanel.2.js';b=d.getElementsByTagName("script")[0];b.parentNode.insertBefore(a,b);c._i=[];c.init=function(a,d,f){var b=c;"undefined"!==typeof f?b=c[f]=[]:f="mixpanel";g="disable track track_pageview track_links track_forms register register_once unregister identify name_tag set_config".split(" ");
- for(e=0;e<g.length;e++)(function(a){b[a]=function(){b.push([a].concat(Array.prototype.slice.call(arguments,0)))}})(g[e]);c._i.push([a,d,f])};window.mixpanel=c})(document,[]);
- mixpanel.init("24743c6567f831ddfcbbbd3f397e11e4");
- <?php
- if ($_SESSION['accepted'] == 1) {
- if ($_SESSION['displayName'] != 'noname')
- echo 'mixpanel.name_tag(' . json_encode($_SESSION['displayName']) . ');';
- if ($_SERVER['HTTP_HOST'] == 'www.pathery.com')
- echo 'mixpanel.identify(' . json_encode($_SESSION['userID']) . ');';
- }
- ?>
</script>
</body>