Hi @timmyfox,
Thanks for using our plugins.
You can get more information about Enhanced Ecommerce settings under this topic:
https://support.mooveagency.com/topic/problem-with-conversion-and-gdpr-cookie-compliance/
Hope this helps.
Alright, I think I’ve been getting it mostly to work, although I have another related issue now:
I’m trying to add a filter that sets a certain value depending on if cookies have been accepted or not. I’ve tried doing this inside a custom_functions.php file by using this default hook:
if ( function_exists( 'gdpr_cookie_is_accepted' ) ) {
/* supported types: 'strict', 'thirdparty', 'advanced' */
if ( gdpr_cookie_is_accepted( 'thirdparty' ) ) {
echo "GDPR third party ENABLED content";
} else {
echo "GDPR third party RESTRICTED content";
}
}
Unfortunately this appears to not function as intended and upon inspection I do not seem to get past the initial if ( function_exists() ). If I place the snippet inside the gdpr-functions.php file of the plugin then it works, but I’d rather have it inside my own custom_functions.php to avoid modifying any plugins or my theme’s functions.php file. How can I do this?
-
This reply was modified 5 years, 6 months ago by
timmyfox.
-
This reply was modified 5 years, 6 months ago by
timmyfox.
Hi @timmyfox,
You can connect your function to a hook, something like the example below:
add_action('init', 'my_custom_gdpr_extension');
function my_custom_gdpr_extension(){
if ( function_exists( 'gdpr_cookie_is_accepted' ) ) {
/* supported types: 'strict', 'thirdparty', 'advanced' */
if ( gdpr_cookie_is_accepted( 'thirdparty' ) ) {
echo "GDPR third party ENABLED content";
} else {
echo "GDPR third party RESTRICTED content";
}
}
}
Hope this helps.
Hmm, that worked but it seems that the conditional does not update properly; if I accept the cookie it stays in the restricted state even after refreshing the page.
If I navigate to a different page it updates fine, but returning to the page I was on previously I still see the restricted behavior.
Edit: Also tried refreshing witout cache (CTRL+F5), same thing.
-
This reply was modified 5 years, 6 months ago by
timmyfox.
Hi @timmyfox,
You can try to exclude the “moove_gdpr_popup” cookie from caching. Sometimes this should be done in the server, you can ask your hosting support to disable the cache for “moove_gdpr_popup” cookie.
If you’re using caching plugins, please check the settings and ensure the cookie name is whitelistes.
Hope this helps.