prototypead
Forum Replies Created
-
Forum: Plugins
In reply to: [Woo Total Sales] item of number sold at product page show two timesI would also like an update on this my single product is also showing products sold twice.
Forum: Plugins
In reply to: [GDPR] Cookie block helper function added warning message to WP DashboardLook forward to the update. Thank you for all your hard work!
I do have a question regarding php code. I am trying to understand what is the difference between these two codes?
1.
if ( is_allowed_cookie( '_ga' ) ) {
and
2.
if ( ! has_consent( 'privacy-policy' ) || ! is_allowed_cookie( '_ga' ) ) {
Thanks
Forum: Plugins
In reply to: [GDPR] Cookie block helper function added warning message to WP DashboardOk, I figured it out – had placed a closing php tag.
Though, I am confused how all this works. When I test on the site using the code above on initial website load (browser cookies are cleared) the ga cookie doesn’t seem to be “on”. Then I agree to terms and the ga cookies is still not on. Only when I go to preferences and “turn on” the cookie, it shows up.
What I want to accomplish is when user agrees to Privacy Policy (the language in the privacy policy does state if they agree to terms the cookie will be enabled), the ga cookie turns “on”. Then, if they want to turn it off, then they have to go to privacy policy and turn it off.
How do I achieve that, what code to use?
Thank you.
Forum: Plugins
In reply to: [GDPR] Cookie block helper function added warning messagePlease ignore this message, it is a duplicate of another!
Forum: Plugins
In reply to: [GDPR] Email field does not show up in request form in ChromeThank you, makes sense.
Forum: Plugins
In reply to: [GDPR] Cookie blockThank you for answering all my silly question @fclaussen. It makes more sense now.
Forum: Plugins
In reply to: [GDPR] Cookie blockThank you, so if we need to remove Facebook Pixel cookie, I would register it in the plugin and then add a helper function next to google analytics function with the new name and whatever FB pixel cookie is named. Something like that:
function my_facebook_opt_out() { if ( is_allowed_cookie( '_fbq' ) ) { ....the rest code under here
Forum: Plugins
In reply to: [GDPR] Cookie blockThank you, I understand legally you cannot advise, we are talking to some regarding that. I just wanted to make sure the code to use and how to use it is the right way.
So if we do not require a separate consent for google analytics, I would use the code like this in the if section?
function my_google_opt_out() { if ( is_allowed_cookie( '_ga' ) ) { ....the rest code under here as above
Can I use something like this:
function my_google_opt_out() { if ( is_allowed_cookie( '_ga', '_gid' ) ) { ....the rest code under here as above
Thank you. I will google how to make google analytics data anonymous too. Good suggestion.
ALSO, currently we have the google tracking code in header.php file. Do I remove it from there when adding helper function in functions.php file?
Forum: Plugins
In reply to: [GDPR] Cookie blockHi, I am trying to understand how blocking/enabling cookies works. This thread has been helpful, I just want to put it in plain language what the steps are. Please let me know if they are correct.
1. Identify Cookies used on the website
2. Register cookies in the plugin under Cookies Tab
2a. Add Category name ‘analytics’
2b. identify cookies used – ‘_ga, _gid, _gat’
3. Add the code below in the functions.php fileadd_action( 'wp_head', 'my_google_opt_out' ); function my_google_opt_out() { if ( ! has_consent( 'analytics' ) || ! is_allowed_cookie( '_ga' ) ) { ?> <script> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) })(window,document,'script','https://www.google-analytics.com/analytics.js','ga'); ga('create', 'UA-xxxxxxxxx-x', 'auto'); ga('send', 'pageview'); </script> <?php } }
But what does this do. If the cookies are off, then this function will not make them available and then google will not track? Do we need to create analytics consent too?
What about _gid and _gat? Does a separate helper function for each need to be added?
What if we have Facebook Pixel on the site? Is a new category need to be created and a new helper function in function.php file has to be added?
Thank you for your help, I know it is basic questions, but I just want to understand how to properly implement it.
Forum: Themes and Templates
In reply to: [Hestia] Custom Post TypesNever-mind, had server issues. Everything works fine.