Adjusted remaining 'piwik' naming to 'matomo'

This commit is contained in:
Julian Haluska 2019-06-09 21:50:17 +02:00
parent 845089d4e6
commit 3a652cd6bc
3 changed files with 8 additions and 8 deletions

View file

@ -43,8 +43,8 @@ VARIABLE_CODE = '_paq.push(["setCustomVariable", %(index)s, "%(name)s", "%(value
IDENTITY_CODE = '_paq.push(["setUserId", "%(userid)s"]);'
DISABLE_COOKIES_CODE = "_paq.push(['disableCookies']);"
GIVE_CONSENT_CLASS = "piwik_give_consent"
REMOVE_CONSENT_CLASS = "piwik_remove_consent"
GIVE_CONSENT_CLASS = "matomo_give_consent"
REMOVE_CONSENT_CLASS = "matomo_remove_consent"
ASK_FOR_CONSENT_CODE = """
_paq.push(['requireConsent']);

View file

@ -151,7 +151,7 @@ class MatomoTagTestCase(TagTestCase):
r = MatomoNode().render(Context({}))
self.assertTrue("_paq.push(['disableCookies']);" in r, r)
@override_settings(PIWIK_ASK_FOR_CONSENT=True)
@override_settings(MATOMO_ASK_FOR_CONSENT=True)
def test_ask_for_consent(self):
r = PiwikNode().render(Context({}))
r = MatomoNode().render(Context({}))
self.assertTrue("_paq.push(['requireConsent']);" in r, r)

View file

@ -157,15 +157,15 @@ To enable this, set :data:`MATOMO_ASK_FOR_CONSENT` to :const:`True`. By default,
To give and remove consent in your page, create DOM elements with the following classes:
`piwik_give_consent` - class name for element to click when visitors want to **give** consent
`piwik_remove_consent` - class name for element to click when visitors want to **remove** consent
`matomo_give_consent` - class name for element to click when visitors want to **give** consent
`matomo_remove_consent` - class name for element to click when visitors want to **remove** consent
Examples:
# button to allow tracking
<button class="piwik_give_consent">Track me!</button>
<button class="matomo_give_consent">Track me!</button>
# button to remove tracking consent
<button class="piwik_remove_consent">Don't track me anymore!</button>
<button class="matomo_remove_consent">Don't track me anymore!</button>
.. _`asking for consent`: https://developer.matomo.org/guides/tracking-javascript-guide#asking-for-consent