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.
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
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.
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.