Ensure page view preceeds any event tracking

This commit is contained in:
Andrew Miner
2016-05-19 20:22:51 -07:00
parent 083cc30eb2
commit cb962f6175
3 changed files with 5 additions and 2 deletions
+2 -1
View File
@@ -61,6 +61,8 @@ storage = new Storage storage:global.localStorage
######################################################################################################################## ########################################################################################################################
tracker.trackPageView()
{CraftingGuideClient} = require 'crafting-guide-common' {CraftingGuideClient} = require 'crafting-guide-common'
client = _(new CraftingGuideClient(baseUrl:apiBaseUrl)).extend Backbone.Events client = _(new CraftingGuideClient(baseUrl:apiBaseUrl)).extend Backbone.Events
client.onStatusChanged = (client, oldStatus, newStatus)-> client.onStatusChanged = (client, oldStatus, newStatus)->
@@ -79,5 +81,4 @@ site.loadDefaultModPack()
site.loadCurrentUser() site.loadCurrentUser()
Backbone.history.start pushState:true Backbone.history.start pushState:true
tracker.trackPageView()
logger.info -> "CraftingGuide is ready" logger.info -> "CraftingGuide is ready"
@@ -15,4 +15,6 @@ script.
ga('create', 'UA-54970416-2', 'crafting-guide.com'); ga('create', 'UA-54970416-2', 'crafting-guide.com');
ga('require', 'displayfeatures'); ga('require', 'displayfeatures');
ga('require', 'linkid', 'linkid.js'); ga('require', 'linkid', 'linkid.js');
} else {
window.ga = function() {}
} }
+1 -1
View File
@@ -27,11 +27,11 @@ html
.view__footer .view__footer
include ../includes/_google_analytics.jade
script(src="/external.js") script(src="/external.js")
script(src="/internal.js") script(src="/internal.js")
include ../includes/_google_adsense.jade include ../includes/_google_adsense.jade
include ../includes/_google_analytics.jade
include ../includes/_google_sitelinks.jade include ../includes/_google_sitelinks.jade
include ../includes/_twitter_follow.jade include ../includes/_twitter_follow.jade