Update google tracker for url scheme change.
This commit is contained in:
parent
99be279ae3
commit
ebf158f3a5
@ -270,6 +270,18 @@ $(document).ready(function() {
|
|||||||
$("#error-text, #error-overlay").fadeOut(500);
|
$("#error-text, #error-overlay").fadeOut(500);
|
||||||
$("body, html").css("overflow", "auto");
|
$("body, html").css("overflow", "auto");
|
||||||
}
|
}
|
||||||
|
window.hashUrl = function() {
|
||||||
|
var new_album_cache = location.hash.substring(1);
|
||||||
|
if (new_album_cache.length) {
|
||||||
|
if (new_album_cache[0] == "!")
|
||||||
|
new_album_cache = new_album_cache.substring(1);
|
||||||
|
if (new_album_cache[0] == "/")
|
||||||
|
new_album_cache = new_album_cache.substring(1);
|
||||||
|
if (new_album_cache[new_album_cache.length - 1] == "/")
|
||||||
|
new_album_cache = new_album_cache.substring(0, new_album_cache.length - 1);
|
||||||
|
}
|
||||||
|
return new_album_cache;
|
||||||
|
}
|
||||||
|
|
||||||
var current_album_cache = null;
|
var current_album_cache = null;
|
||||||
var current_photo_cache = null;
|
var current_photo_cache = null;
|
||||||
@ -280,15 +292,7 @@ $(document).ready(function() {
|
|||||||
var original_title = document.title;
|
var original_title = document.title;
|
||||||
var album_cache = new Array();
|
var album_cache = new Array();
|
||||||
$(window).hashchange(function() {
|
$(window).hashchange(function() {
|
||||||
var new_album_cache = location.hash.substring(1);
|
var new_album_cache = window.hashUrl();
|
||||||
if (new_album_cache.length) {
|
|
||||||
if (new_album_cache[0] == "!")
|
|
||||||
new_album_cache = new_album_cache.substring(1);
|
|
||||||
if (new_album_cache[0] == "/")
|
|
||||||
new_album_cache = new_album_cache.substring(1);
|
|
||||||
if (new_album_cache[new_album_cache.length - 1] == "/")
|
|
||||||
new_album_cache = new_album_cache.substring(0, new_album_cache.length - 1);
|
|
||||||
}
|
|
||||||
var index = new_album_cache.lastIndexOf("/");
|
var index = new_album_cache.lastIndexOf("/");
|
||||||
if (index != -1 && index != new_album_cache.length - 1) {
|
if (index != -1 && index != new_album_cache.length - 1) {
|
||||||
previous_photo_cache = current_photo_cache;
|
previous_photo_cache = current_photo_cache;
|
||||||
|
@ -11,5 +11,5 @@ $(window).load(function () {
|
|||||||
$(window).hashchange(function() {
|
$(window).hashchange(function() {
|
||||||
window._gaq = window._gaq || [];
|
window._gaq = window._gaq || [];
|
||||||
window._gaq.push(['_trackPageview']);
|
window._gaq.push(['_trackPageview']);
|
||||||
window._gaq.push(['_trackPageview', location.hash.substring(1)]);
|
window._gaq.push(['_trackPageview', window.hashUrl()]);
|
||||||
});
|
});
|
Loading…
Reference in New Issue
Block a user