Permalink
Browse files

google analytics added

  • Loading branch information...
1 parent f1ff3bc commit 06af20287181c3bb82fe1ee0da917ac0cbde0c71 @specialorange committed Aug 7, 2012
Showing with 51 additions and 21 deletions.
  1. +3 −3 _css/semanticcss.css
  2. +25 −0 exclude.html
  3. +23 −7 index.html
  4. +0 −11 untitled.html
View
6 _css/semanticcss.css
@@ -165,14 +165,14 @@ header h1 { color:white; }
}
body {
margin: 0;
- font-size: 10px;
+ font-size: 10px !important;
line-height: 1.4;
}
.gc .element {
- font-size: 11px;
+ font-size: 14px !important;
}
.gc .heading {
- font-size: 14px;
+ font-size: 18px !important;
}
}
View
25 exclude.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
+ "http://www.w3.org/TR/html4/strict.dtd">
+
+<html lang="en">
+<head>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+ <title>Exclude from Google Analytics</title>
+</head>
+<body>
+ <script type="text/javascript">
+
+ var _gaq = _gaq || [];
+ _gaq.push(['_setAccount', 'UA-XXXXXXX-X']);
+ _gaq.push(['_setVar','test_value']);
+ _gaq.push(['_trackPageview']);
+
+ (function() {
+ var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+ ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+ var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+ })();
+
+ </script>
+</body>
+</html>
View
30 index.html
@@ -121,7 +121,7 @@
</fieldset>
<fieldset id="fs_section_oldresumes" class="fs section oldresumes">
- <label id="fs_oldresumes_heading" class="fs btn heading oldresumes">Old Resumes</label><br>
+ <label id="fs_oldresumes_heading" class="fs btn heading oldresumes white">Old Resumes</label><br>
</fieldset>
<fieldset id="fs_section_visibility" class="fs section visibility">
@@ -790,7 +790,7 @@
</section>
</section>
- <section id="gc_section_oldresumes" class="gc section oldresumes "><h1>Old Resumes</h1>
+ <section id="gc_section_oldresumes" class="gc section oldresumes hidden"><h1>Old Resumes</h1>
<!-- <div>
<object data="_img/java.pdf" type="application/pdf" width="775" height="1000">
@@ -1019,10 +1019,8 @@
if ($(this).hasClass("gc")) {
//heading
if ($(this).hasClass("heading")) {
- // $('#trackClick').click(function () {
- //track number of times element is clicked
- _gaq.push(['_trackEvent', 'Action', 'Label', 'Value']);
- // });​
+ //track btn clicks
+ _gaq.push(['_trackEvent', 'GC Heading', 'ID: ' + $(this).attr('id')]);
//left
($(this).parent().parent().toggleClass('hidden'));
//right
@@ -1042,6 +1040,8 @@
var hidden = ($(this).parent().parent().children().filter(':hidden').size()+1);
//if all elelemts are hidden, hide the parent too
if (hidden >= count) {
+ //track btn clicks
+ _gaq.push(['_trackEvent', 'GC Element(all)', 'ID: ' + $(this).attr('id')]);
//left
($(this).parent().toggleClass('hidden'));
($(this).parent().parent().toggleClass('hidden'));
@@ -1057,6 +1057,8 @@
($("'" + newClasses + "'").parent().parent().children().eq(0)).toggleClass('white');
//hide one element only
} else {
+ //track btn clicks
+ _gaq.push(['_trackEvent', 'GC Element(1)', 'ID: ' + $(this).attr('id')]);
//left
($(this).parent().toggleClass('hidden'));
//right
@@ -1093,9 +1095,13 @@
//unhide any element's sections that were hidden
//if all elements were hidden
if(hidden >= count) {
+ //track btn clicks
+ _gaq.push(['_trackEvent', 'FS Heading(allElementsHidden)', 'ID: ' + $(this).attr('id')]);
($(this).siblings().children().toggleClass('hidden'));
($(this).siblings().toggleClass('hidden'));
} else {
+ //track btn clicks
+ _gaq.push(['_trackEvent', 'FS Heading', 'ID: ' + $(this).attr('id')]);
($(this).siblings().each(function() {
if (!$(this).children().hasClass('hidden')) {
$(this).toggleClass('hidden');
@@ -1113,17 +1119,23 @@
};
classes[0] = "gc";
var newClasses = '.' + classes.join().replace(/\,/g,'.');
+ //track btn clicks
+ _gaq.push(['_trackEvent', 'FS Element', 'ID: ' + $(this).attr('id')]);
//left
($("'" + newClasses + "'").parent().toggleClass('hidden'));
//right
($(this).toggleClass('hidden', (!$(this).hasClass('hidden'))));
//information section
- } else if ($(this).hasClass("i")) {
+ } else if ($(this).hasClass("i")) {
+ //track btn clicks
+ _gaq.push(['_trackEvent', 'FS Information', 'ID: ' + $(this).attr('id')]);
$(this).parent().parent().parent().parent().parent().toggleClass('hidden');
//Hide all show all
} else if ($(this).hasClass("visibility")) {
//Hide
if ($(this).hasClass("off")) {
+ //track btn clicks
+ _gaq.push(['_trackEvent', 'FS All', 'ID: ' + $(this).attr('id')]);
//headers
$(this).parent().prevAll().each(function() {
if (!$(this).children(':first-child').hasClass('white')) {
@@ -1133,6 +1145,8 @@
$('.jokes').toggleClass('hidden');
//Show
} else if ($(this).hasClass("on")) {
+ //track btn clicks
+ _gaq.push(['_trackEvent', 'FS All', 'ID: ' + $(this).attr('id')]);
//headers
$(this).parent().prevAll().each(function() {
if ($(this).children(':first-child').hasClass('white')) {
@@ -1154,6 +1168,8 @@
} else {
}
if ($('.fs.section').length-1 === $('.fs.white').length) {
+ //track btn clicks
+ _gaq.push(['_trackEvent', 'ALL HEADINGS HIDDEN']);
$('.jokes').toggleClass('hidden');
}
});
View
11 untitled.html
@@ -1,11 +0,0 @@
-<html type="application/msword">
-
-<h1>Heading 1</h1>
-<p>This text is <strong>bold</strong>, this <em>italic</em>, and this <span style="text-decoration: underline">underlined</span>.</p>
-<div dir="ltr" style="margin-left: 40px"><div dir="ltr" style="margin-left: 40px"><div dir="ltr" style="margin-left: 40px"><div dir="ltr" style="margin-left: 40px"><p>This text is <span style="font-family: Arial">Arial</span>, this <span style="font-family: Garamond">Garamond</span>, and this <span style="font-family: Verdana">Verdana</span>.</p></div></div></div></div>
-<ul>
-<li>Bullet 1 </li>
-<li>Bullet 2</li>
-</ul>
-
-</html>

0 comments on commit 06af202

Please sign in to comment.