You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

django_google_analytics

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

django_google_analytics

Google analytics web property per site in django admin


Maintainers
1

Readme

Django Google Analytics

Django template tag app for inserting google analytic code on a per site basis.

Copyright (C) 2011 Benjamin Wilbur

License

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Installation

  1. pip install django_google_analytics
  2. Ensure you have sites configured. https://docs.djangoproject.com/en/1.8/ref/contrib/sites/#enabling-the-sites-framework
  3. add analytics to your INSTALLED_APPS
  4. python manage.py migrate
  5. In the django admin interface visit the "Sites" page and add your google web property id for the site you wish to track.
  6. Add the following to your desired templates. {% load analytics %}
  7. at the very bottom of your head section add this {% analytics %}
  8. if you want to avoid counting logged in user visits surround the above line with the following {% if not user.is_staff %} {% endif %}
  9. Go to your google analytics control panel and refresh frantically to see if it is working

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc