mirror of
https://github.com/jazzband/django-analytical.git
synced 2026-05-15 02:33:15 +00:00
Removed backslashes from strings, improved documentation text
This commit is contained in:
parent
5c5250692a
commit
7e3f9d1de8
3 changed files with 8 additions and 8 deletions
|
|
@ -41,8 +41,8 @@ TRACKING_CODE = """
|
|||
|
||||
VARIABLE_CODE = '_paq.push(["setCustomVariable", %(index)s, "%(name)s", "%(value)s", "%(scope)s"]);' # noqa
|
||||
IDENTITY_CODE = '_paq.push(["setUserId", "%(userid)s"]);'
|
||||
DISABLE_COOKIES_CODE = '_paq.push([\'disableCookies\']);'
|
||||
ASK_FOR_CONSENT_CODE = '_paq.push([\'requireConsent\']);'
|
||||
DISABLE_COOKIES_CODE = "_paq.push(['disableCookies']);"
|
||||
ASK_FOR_CONSENT_CODE = "_paq.push(['requireConsent']);"
|
||||
FORGET_CONSENT_CODE = 'document.getElementById("piwik_deny_consent").addEventListener("click", () => { _paq.push(["forgetConsentGiven"]); });'
|
||||
REMEMBER_CONSENT_CODE = 'document.getElementById("piwik_give_consent").addEventListener("click", () => { _paq.push(["setConsentGiven"]); _paq.push(["rememberConsentGiven"]); });'
|
||||
|
||||
|
|
|
|||
|
|
@ -154,4 +154,4 @@ class PiwikTagTestCase(TagTestCase):
|
|||
@override_settings(PIWIK_ASK_FOR_CONSENT=True)
|
||||
def test_ask_for_consent(self):
|
||||
r = PiwikNode().render(Context({}))
|
||||
self.assertTrue("_paq.push([\'requireConsent\']);" in r, r)
|
||||
self.assertTrue("_paq.push(['requireConsent']);" in r, r)
|
||||
|
|
|
|||
|
|
@ -146,7 +146,7 @@ Disabling cookies
|
|||
-----------------
|
||||
|
||||
If you want to `disable cookies`_, set :data:`PIWIK_DISABLE_COOKIES` to
|
||||
:const:`True`. This is disabled by default.
|
||||
:const:`True`. By default, cookies are enabled (i.e. :const:False).
|
||||
|
||||
.. _`disable cookies`: https://matomo.org/faq/general/faq_157/
|
||||
|
||||
|
|
@ -154,12 +154,12 @@ Ask for consent
|
|||
-----------------
|
||||
|
||||
If you want to ask for consent set :data:`PIWIK_ASK_FOR_CONSENT` to
|
||||
:const:`True`. This is disabled by default.
|
||||
:const:`True`. By default, no consent by the visitor is needed (i.e. :const:False).
|
||||
|
||||
To ask the visitor for consent just create DOM elements with the following id's:
|
||||
To ask the visitor for consent in your page, create DOM elements with the following id's:
|
||||
|
||||
`piwik_deny_consent` - id for DOM element to click, if the user denies consent
|
||||
`piwik_give_consent` - id for DOM element to click, if the user gives consent
|
||||
`piwik_deny_consent` - id for element to click when the user denies consent
|
||||
`piwik_give_consent` - id for element to click when the user gives consent
|
||||
|
||||
.. _`asking for consent`: https://developer.matomo.org/guides/tracking-javascript-guide#asking-for-consent
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue