Loading...
 
Features / Usability

Features / Usability


Cookie Consent

posts: 29 Germany

Hi,

I use the Cookie Consent feature like this:

1) I have set up a new Google Analytics 4 Property
1.1) to use this it was necesscary to modify the plugin a little bit (see the attachment) - but this is not the point of this topic. Feel free to use the modified code, but there is still some work in the admin-panel to do (description).

2) When the user decide to accept the Analytics Stuff everthing is OK.
2.1)When the user decide to reject the Analytics Stuff, some content will not be displayed. For this I use the Plugin Cookieconsent.
2.2) Now the user change decision and want to accept the additional cookies. Is there a way to change the first cookie consent desicion?

Thanks.

Bob

posts: 126825 United Kingdom

Hi Bob

Yes, i wrote a little module called "Cookie Settings" to do this, so just add that to one of your module zones and a little cog should show up that allows users to change their settings.

HTH

posts: 29 Germany

Hi Jonny,

thanks a lot.

The module just calles:

[tiki-index.php?cookie_consent|Recall the Cookie Consent]


That's all I need.

I added a little example in:
https://doc.tiki.org/PluginCookieConsent


posts: 126825 United Kingdom

p.s. your changes to wikiplugin_googleanalytics.php would break existing usages i think wouldn't it?
I reckon we would need some code in there to detect which version of GA is needed, no? (but thanks!)

posts: 29 Germany
Jonny Bradley wrote:

p.s. your changes to wikiplugin_googleanalytics.php would break existing usages i think wouldn't it?
I reckon we would need some code in there to detect which version of GA is needed, no? (but thanks!)


Hi Jonny,

my changes are not backward compatible! The Google Universal Property (UA) is out of date since at least 1 year. In my script the user have to input the whole ID, no UA or G or what else is added, so it is more flexible ... I think the included script for the gtag.js is always the same? If so, there is no need to detect something - but I am not sure.

Another thing:
I want to modify the Cookie Consent Dialog. In addition we want to have a "Accept ALL" and "Accept only necassery"-button and some additional Text, like the way many other websites do. Can you give me a little tip, how/where to start?

Thanks

Bob

posts: 126825 United Kingdom
Bob wrote:

Another thing:
I want to modify the Cookie Consent Dialog. In addition we want to have a "Accept ALL" and "Accept only necassery"-button and some additional Text, like the way many other websites do. Can you give me a little tip, how/where to start?


Most of it's in cookie_consent.tpl - does that help?

posts: 29 Germany
Jonny Bradley wrote:
Most of it's in cookie_consent.tpl - does that help?


Yes, thanks.

I used the original template for about 1 week and only 1 out of 1000 visitors checked the checkbox for the analytics. So we decided to make some changes, looking forward for more agreements.

Our goal was something like this on spreadshirt.com.

On the bobshopdemo.bob360.de site you can see how it works. It is just a Demo!

Some limitations:

  • all text is hardcoded in the template - I don't knwo how to modify the admin-panel for the $prefs
  • using the display mode "Modal" make a problem, when the user klick on the link for the privacy policy. To solve this, I tried to open a dialog (Plugin Dialog), but there is no scrolling available in the dialog-box? Is there any other way to open something like a dialog?


Feel free to use the new file for the next version or inspiration.

Bob