timmyfox
Forum Replies Created
-
Anything else I could try?
Still nope 🙁
I put my “UA-” code for the gtag value and the behavior is still the same as before.
Update:
I did some further experimentation and found that the tags seemingly get loaded by default before the user makes a choice, and saves these first after the user has made a choice. Any way to make it disabled by default?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.
Hm, doesn’t seem to work still.
I replaced the code and made sure to clear my caches and tried again, first searching one thing and clicking on a product and then from there searching a different term and going straight to the search results. After ~5-10 minutes I see the latter search term, but not the former, under site search.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?Also to add an example with steps to reproduce:
1. Search “test1” and click to view all results
2. Search “test2” but don’t click to view all results, instead click away or on one of the results directly.After waiting for GA to catch up, I can see both “test1” and “test2” shown on the Events page under “Event labels”
But if I go to the Site Search page, only “test1” will show up in the list of search terms. I do not see either “test2” nor “ajax-search: test2” in this list.