@@ -2043,5 +2043,58 @@ <h1>Thank you!</h1>
2043
2043
$ . deck ( '.slide' ) ;
2044
2044
} ) ;
2045
2045
</ script >
2046
+
2047
+ < script type ="text/javascript ">
2048
+
2049
+ var _gaq = _gaq || [ ] ;
2050
+ _gaq . push ( [ '_setAccount' , 'UA-246174-1' ] ) ;
2051
+ _gaq . push ( [ '_trackPageview' ] ) ;
2052
+
2053
+ ( function ( ) {
2054
+ var ga = document . createElement ( 'script' ) ; ga . type = 'text/javascript' ; ga . async = true ;
2055
+ ga . src = ( 'https:' == document . location . protocol ? 'https://ssl' : 'http://www' ) + '.google-analytics.com/ga.js' ;
2056
+ var s = document . getElementsByTagName ( 'script' ) [ 0 ] ; s . parentNode . insertBefore ( ga , s ) ;
2057
+ } ) ( ) ;
2058
+
2059
+ function trackQuality ( feedback ) {
2060
+
2061
+ //the higher the value over time,
2062
+ //the more the page should be tweaked since it's not understandable
2063
+ var feedbackValue ;
2064
+ switch ( feedback ) {
2065
+ case 'no' :
2066
+ feedbackValue = 2 ;
2067
+ break ;
2068
+ case 'sortof' :
2069
+ feedbackValue = 1 ;
2070
+ break ;
2071
+ default :
2072
+ feedbackValue = 0 ;
2073
+ }
2074
+
2075
+ if ( _gaq ) {
2076
+ _gaq . push ( [ '_trackEvent' , "LLC HTML/CSS (Ottawa)" , feedback , returnDocumentName ( ) , feedbackValue , true ] ) ;
2077
+ var feedbackDiv = document . getElementById ( 'page_feedback' ) ;
2078
+ feedbackDiv . innerHTML = "Thanks!" ;
2079
+ } else {
2080
+ console . log ( '_gaq is not defined' ) ;
2081
+ }
2082
+ }
2083
+
2084
+ function returnDocumentName ( ) {
2085
+ var fileName = document . location . href ;
2086
+ var end = ( fileName . indexOf ( "?" ) == - 1 ) ? fileName . length : fileName . indexOf ( "?" ) ;
2087
+ return fileName . substring ( fileName . lastIndexOf ( "/" ) + 1 , end ) ;
2088
+ }
2089
+
2090
+ </ script >
2091
+
2092
+ < div id ="page_feedback ">
2093
+ < strong > Help improve the quality of this workshop!</ strong >
2094
+ Did this page explain everything well?
2095
+ < a href ="# " onClick ="trackQuality('yes');return false; " class ="button "> Yes</ a >
2096
+ < a href ="# " onClick ="trackQuality('sortof');return false; " class ="button "> Sort of</ a >
2097
+ < a href ="# " onClick ="trackQuality('no');return false; " class ="button "> No</ a >
2098
+ </ div >
2046
2099
</ body >
2047
2100
</ html >
0 commit comments