Skip to content

Commit

Permalink
refactor for new google analytics code
Browse files Browse the repository at this point in the history
  • Loading branch information
Coto committed Jan 27, 2014
1 parent e58e07f commit 7de38e3
Show file tree
Hide file tree
Showing 4 changed files with 164 additions and 129 deletions.
6 changes: 3 additions & 3 deletions boilerplate/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@
'captcha_public_key': "PUT_YOUR_RECAPCHA_PUBLIC_KEY_HERE",
'captcha_private_key': "PUT_YOUR_RECAPCHA_PRIVATE_KEY_HERE",

# Leave blank "google_analytics_domain" if you only want Analytics code
'google_analytics_domain': "YOUR_PRIMARY_DOMAIN (e.g. google.com)",
'google_analytics_code': "UA-XXXXX-X",
# Use a complete Google Analytics code, no just the Tracking ID
# In config/localhost.py there is an example to fill out this value
'google_analytics_code': "",

# add status codes and templates used to catch and display errors
# if a status code is not listed here it will use the default app engine
Expand Down
1 change: 0 additions & 1 deletion boilerplate/lib/basehandler.py
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,6 @@ def render_template(self, filename, **kwargs):

# set or overwrite special vars for jinja templates
kwargs.update({
'google_analytics_domain': self.app.config.get('google_analytics_domain'),
'google_analytics_code': self.app.config.get('google_analytics_code'),
'app_name': self.app.config.get('app_name'),
'user_id': self.user_id,
Expand Down
Loading

0 comments on commit 7de38e3

Please sign in to comment.