Closed GoogleCodeExporter closed 9 years ago
I mistakenly thought I could safely disable this in homepage.js and that GA
would still
load in base.html. It won't.
Marking as Critical to reenable loadGA for homepage before launch. This can be
as
simple as adding HOMEPAGE as a case @line 161 of base.html
Original comment by paul.rademacher
on 18 Jun 2009 at 1:39
Adam pointed out that loadGA() definition can/should be moved to utils.js
Original comment by paul.rademacher
on 18 Jun 2009 at 1:57
I'll take care of all this tomorrow morning. The reason loadGA() and callGA()
are in
base.html and not utils.js already is because both use template variables.
loadGA()
only uses the {{version}} variable, so if we're okay hard-coding in the version
it
should be fine.
I don't think it's possible to move callGA() to external JS though, since it
needs
the GA key variable, which is dependent on the instance and determined in
deploy.py
I could move the callGA() function to the <head> though. I'll try it out
tomorrow
and see what works.
Original comment by ehysen
on 18 Jun 2009 at 2:02
ah right, in that case, just define them earlier in base.html
Original comment by adam.sah
on 18 Jun 2009 at 2:09
Just committed r833 and r834 moving the functions to the header and re-enabling
on
the homepage. We should be set now, working backwards:
* loadGA() is called on the homepage in the runSnippetsQuery() function in
homepage.js
* homepage.js is loaded with the suprfetch call, but runSippetsQuery() isn't
called
until the homepage.html template.
* The homepage.html template extends layout_full.html, which extends base.html
* loadGA() is defined in the head of base.html, which will be loaded by that
point.
If I'm getting this chain right, we should be okay now.
Original comment by ehysen
on 18 Jun 2009 at 3:04
Original comment by ehysen
on 18 Jun 2009 at 5:07
Original issue reported on code.google.com by
paul.rademacher
on 18 Jun 2009 at 1:29