Comments (14)
I see the problem now. It is in your configuration.
You defined the Tracking Object fe_typo_user
in group mandatory
, but your settings do not define plugin.tx_cookieman.settings.trackingObjects.fe_typo_user.show
.
from extension-cookieman.
from extension-cookieman.
Hi Markus,
I reckon that you have not defined any tracking objects.
Does this happen in a default install after you have included the static TypoScript templates (including the examples)?
Maybe you want to post your Tracking Object TypoScript.
from extension-cookieman.
plugin.tx_cookieman.settings.trackingObjects {
Matomo {
# inline scripts would break Content-Security-Policy: script-src
# https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy/script-src
inject (
<script data-what="Matomo" src="/fileadmin/js/cookieman-inject.js"></script>
)
show {
_pk_id {
duration = 13
durationUnit = months
type = cookie_http+html
provider = Matomo
#Pattern searches for all cookies that are named like _pk_id.{website ID}.{user hash}
htmlCookieRemovalPattern = ^_pk_id\.\d+\.[a-fA-F0-9]+$
}
_pk_ref {
duration = 6
durationUnit = months
type = cookie_http+html
provider = Matomo
htmlCookieRemovalPattern = ^_pk_ref\.\d+\.[a-fA-F0-9]+$
}
_pk_ses {
duration = 30
durationUnit = minutes
type = cookie_http+html
provider = Matomo
htmlCookieRemovalPattern = ^_pk_ses\.\d+\.[a-fA-F0-9]+$
}
_pk_cvar {
duration = 30
durationUnit = minutes
type = cookie_http+html
provider = Matomo
htmlCookieRemovalPattern = ^_pk_cvar\.\d+\.[a-fA-F0-9]+$
}
_pk_hsr {
duration = 30
durationUnit = minutes
type = cookie_http+html
provider = Matomo
htmlCookieRemovalPattern = ^_pk_hsr\.\d+\.[a-fA-F0-9]+$
}
}
}
}
plugin.tx_cookieman {
# see documentation: https://github.com/dmind-gmbh/extension-cookieman
settings {
groups {
# extend group (already configured in the base template)
mandatory {
trackingObjects {
10 = fe_typo_user
}
}
# a new group
marketing {
trackingObjects {
0 = Matomo
#10 = GoogleAnalytics
#20 = GoogleTagManager
#30 = Bing
#40 = FacebookPixel
}
respectDnt = 1
showDntMessage = 1
}
}
}
}
from extension-cookieman.
my cookieman-inject.js:
console.log('cookieman: I would inject ' + document.currentScript.dataset.what + ' now...')
var _paq = _paq || [];
/* tracker methods like "setCustomDimension" should be called before "trackPageView" */
_paq.push(['trackPageView']);
_paq.push(['enableLinkTracking']);
(function () {
var u = "//stats.mydomain.de/";
_paq.push(['setTrackerUrl', u + 'piwik.php']);
_paq.push(['setSiteId', '2']);
var d = document, g = d.createElement('script'), s = d.getElementsByTagName('script')[0];
g.type = 'text/javascript';
g.async = true;
g.defer = true;
g.src = u + 'piwik.js';
s.parentNode.insertBefore(g, s);
})();
from extension-cookieman.
Can you confirm with the Template Analyzer that your TypoScript setup is actually loaded?
And is your TypoScript setup output into HTML in data-cookieman-settings="..."
?
from extension-cookieman.
the typoscript is loaded.
The setup:
<div id="cookieman-modal"
data-cookieman-showonce="1"
data-cookieman-settings="{"groups":{"mandatory":{"preselected":"1","disabled":"1","trackingObjects":["CookieConsent","fe_typo_user"]},"marketing":{"respectDnt":"1","showDntMessage":"1","trackingObjects":["Matomo"]}},"trackingObjects":{"CookieConsent":{"show":{"CookieConsent":{"duration":"1","durationUnit":"year","type":"cookie_http+html","provider":"Website"}}},"Matomo":{"inject":" \u003Cscript data-what=\"Matomo\" src=\"\/fileadmin\/js\/cookieman-inject.js\"\u003E\u003C\/script\u003E","show":{"_pk_id":{"duration":"13","durationUnit":"months","type":"cookie_http+html","provider":"Matomo","htmlCookieRemovalPattern":"^_pk_id\\.\\d+\\.[a-fA-F0-9]+$"},"_pk_ref":{"duration":"6","durationUnit":"months","type":"cookie_http+html","provider":"Matomo","htmlCookieRemovalPattern":"^_pk_ref\\.\\d+\\.[a-fA-F0-9]+$"},"_pk_ses":{"duration":"30","durationUnit":"minutes","type":"cookie_http+html","provider":"Matomo","htmlCookieRemovalPattern":"^_pk_ses\\.\\d+\\.[a-fA-F0-9]+$"},"_pk_cvar":{"duration":"30","durationUnit":"minutes","type":"cookie_http+html","provider":"Matomo","htmlCookieRemovalPattern":"^_pk_cvar\\.\\d+\\.[a-fA-F0-9]+$"},"_pk_hsr":{"duration":"30","durationUnit":"minutes","type":"cookie_http+html","provider":"Matomo","htmlCookieRemovalPattern":"^_pk_hsr\\.\\d+\\.[a-fA-F0-9]+$"}}}}}"
class="modal fade" tabindex="-1" role="dialog"
>
from extension-cookieman.
in the root ts template i include the static template "cookieman"
in the setup section:
<INCLUDE_TYPOSCRIPT: source="FILE: fileadmin/Resources/Typoscript/ext_cookieman.typoscript">
is there a problem with the order of the ts?
from extension-cookieman.
or is this the error, see empty space:
from extension-cookieman.
i removed the empty space:
Matomo":{"inject":"\u003Cscript data-what="Matomo"
what is:
\u003Cscript
?
from extension-cookieman.
Empty space is just empty string. It looks like good JSON to me.
\003C
is HTML encoded JSON. It's ok, it's the same here: https://cookieman.d-mind.de/theme-bootstrap4-modal
Can you please try with the default static TypoScript, just included in the site template?
We run the exact same configuration (TYPO3 9.5.20, cookieman 2.5.1) on https://cookieman.d-mind.de/, too
from extension-cookieman.
with the static template it works
btw: i know another user who has exactly the same problem
from extension-cookieman.
We can try to confirm that the settings are correctly parsed in JavaScript.
Could you enter JSON.parse(document.querySelector('[data-cookieman-settings]').dataset.cookiemanSettings)
in a JavaScript console?
It should return a JavaScript object.
from extension-cookieman.
You're welcome.
I am sure you can solve that yourself.
from extension-cookieman.
Related Issues (20)
- Documentation improvements - feedback HOT 1
- Destroy cookie CookieConsent if is older than some specified date HOT 2
- Why using void return in themes? HOT 2
- Removal of cookies is not complete due to missing "/" path HOT 1
- typo3/cms-composer-installers:^4 compatibility will need some work HOT 4
- Add test if the modal window can be displayed HOT 7
- group.respectDnt = 0 is not respected HOT 4
- Too few arguments to function Dmind\Cookieman\DataProcessing\TypoScriptSettingsProcessor::__construct(), 0 passed in HOT 2
- EditorConfig sets wrong indent size HOT 5
- Logo in modal header HOT 2
- Class btn-small doesn't exist in Bootstrap 3
- Google Consent Mode Integration HOT 2
- CookieConsent cookie expires only after 1 week HOT 4
- Accessibility: Fix headline hierarchie in modal HOT 1
- TYPO3 12 compatibility HOT 19
- htmlCookieRemovalPattern for GA4 tag HOT 3
- Could it be possible to include bootstrap js in extension HOT 1
- Option to refresh page if user accept all cookies HOT 2
- Cookies get set on page refresh despite preferences HOT 2
- Setting: Open with a time delay HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from extension-cookieman.