Commit graph

24 commits

Author SHA1 Message Date
SilverStrings024
d1d1be189a Added conditional tracking consent for Matomo
Modified utils.build_paq_cmd to remove the trailing comma and white space as well as add a semi colon to the end of the push command.
Added context_providers directory with matomo.py file with a context provider that builds the tracking consent code and adds it to the context.
Modified matomo.MatomoNode.render. Removed original ugly settings check code with simply rendering the 'consent_script' context variable and adding it to the html variable only if its length is greater than 1.
NOTE: The context provider and rendering it (line 110 templatetags/matomo.py) are untested. Both utils.build_paq_cmd and utils.get_event_bind_js are tested but need need more rigorous testing to be sure it won't break.
2021-07-13 00:35:26 -04:00
SilverStrings (Matt)
3a514444f3
Update utils.py
Updated to use the tested and better documented version (Is not tested with Matomo or Django. Only with python)
2021-07-12 18:06:37 -04:00
SilverStrings (Matt)
85c651f6f6
Update utils.py to improve build_paq_cmd()
Update `utils.build_paq_cmd()` to convert all elements in the args list to their javascript counter-parts. This will recursively convert the keys and values of a dictionary until there are no more nested dictionaries and will also convert all the elements of a list as well.

Also made it so things like booleans, lists, and  dictionaries are not surrounded in quotation marks so they're treated like a normal javascript object. If that behavior needs changed. Please let me know
2021-07-12 18:03:02 -04:00
SilverStrings (Matt)
3761e7308a
Add files via upload
Added missing new end line
2021-07-12 10:34:30 -04:00
SilverStrings (Matt)
0bc55d1b10
Added utility functions
Added paq builder function and function to build javascript for binding events
2021-07-12 10:31:59 -04:00
David Smith
37009f2e08 Implemented isort 2021-02-21 17:28:27 +01:00
Matthäus G. Chajdas
a9d0befa46 Add support for Django <2 and 2; update tox test matrix. 2017-12-03 18:28:38 +01:00
Matthäus G. Chajdas
4c72289ac8 Use user.is_authenticated for Django 2.0 compatibility. 2017-12-02 22:39:03 +01:00
Bodnar Bogdan
add3baff74 Fix holding config variable in database through proxy objects
A config variable may not necessarily be None when not configured. Can be stored in the database with the help of proxy objects, which can  return the None value when accessed.
For example, to integrate with jazzband/django-constance.
2017-08-15 17:52:12 +02:00
Peter Bittner
f832ec6179 Remove dead code (unsupported Python/Django versions) 2016-05-18 14:51:52 +02:00
Joost Cassee
f84872a0ab Merge branch 'django19' of https://github.com/hobarrera/django-analytical
Conflicts:
	tox.ini
2016-01-06 14:58:43 +01:00
Hugo Osvaldo Barrera
f8b820c1db Only import django.contrib.site if it's in use
Since django1.7, importing models for uninitialized apps is not
supported, so Site if the app has been configured/initialized.
2015-12-21 14:26:39 -03:00
Brad Pitcher
5af731ab9d support custom username fields 2015-12-20 09:40:08 -08:00
Brad Pitcher
4273525668 override internal ips with empty list 2015-12-17 13:48:24 -08:00
Peter Bittner
58d83fe5aa Indentation corrections (PEP8)
Correct all flake8 complaints except: in tests, in templatetags, E501 line too long
2015-04-20 23:08:19 +02:00
Craig Bruce
51a08742c5 removed custom override_settings, using django instead. Removed with/without app decorators as only use in a few places. Updated all tests to use django provided override_settings. 2014-09-05 12:26:08 -07:00
Joost Cassee
1ae5d5c4d7 Add multiple domains support for Google Analytics 2011-09-17 23:13:25 +02:00
Joost Cassee
babfad16ac Add support for the Woopra service
Also bump the version to 0.7.0.
2011-03-15 16:48:23 +01:00
Joost Cassee
8f9b5104da Add Reinvigorate service
This commit also contains a number of typo fixes in the documentation
and bumps the version.
2011-02-22 10:44:53 +01:00
Joost Cassee
327157d610 Fix small code style issues based on pylint
Also update patch version number.
2011-02-18 13:57:04 +01:00
Joost Cassee
ef56199d1e Fix configuration validation code duplication 2011-01-30 10:13:09 +01:00
Joost Cassee
c76e47714e Add tests for internal IP addresses 2011-01-30 10:06:01 +01:00
Joost Cassee
cf7589bc20 Fix tests
Some parts of the code are not yet tested:
 * internal IP addresses feature
 * utils module
2011-01-30 03:05:10 +01:00
Joost Cassee
d715c16244 Refactoring services, step 1
Move services into their own Django apps, leaving the analytics app a
small wrapper.  First service converted is Clicky.

This commit has not been tested.
2011-01-26 22:28:16 +01:00