mirror of
https://github.com/scratchfoundation/scratchx.git
synced 2024-11-28 10:36:03 -05:00
Set referrer when changing pages
This commit is contained in:
parent
2c0c8f2993
commit
0f66f238e3
1 changed files with 5 additions and 2 deletions
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue