Set referrer when changing pages

This commit is contained in:
Ray Schamp 2015-05-14 17:21:19 -04:00
parent 2c0c8f2993
commit 0f66f238e3

View file

@ -311,8 +311,6 @@ function showPage(path, force) {
$(document).trigger("page:show", path);
}
$(document).on("page:show", function(e, page){ga("send", "pageview", page)});
/* URL Shortening */
function shorten(url, done) {
var data = {longUrl: url};
@ -418,6 +416,11 @@ $(window).on('hashchange', function(e) {
});
$(document).on("page:show", function(e, page){
ga("send", "pageview", page);
ga("set", "referrer", document.location.origin + document.location.pathname + document.location.hash)
});
function initPage() {
/*
On load, show the page identified by the URL fragment. Default to #home.