Tagged: cookie, cookie notice, google maps
-
AuthorPosts
-
March 18, 2022 at 6:15 pm #1345134
Hi,
we’ve used the Google Maps media element and would like to change the behavior of the link when cookies are deactivated. The client doesn’t want a redirect to Google Maps in a new Tab but a reload of the frame itself, even when all other external cookies are deactivated. As soon as I accept all cookies via cookie notice bar the behavior is according to the clients’ wishes: page reloads and the map still requires confirmation – once clicked it appears as intended.
I’m aware that the text itself could be changed in the de_DE.po file but I’m struggling to figure out how to avoid the external redirect to Google Maps.
If needed I can set up an admin access for you.
Thanks in advance.
March 21, 2022 at 6:19 am #1345314Hey tebitron gmbh,
Thank you for the inquiry.
This is possible but you will have to modify the enfold/config-templatebuilder/avia-shortcodes/google_maps/google_maps.php around line 785, look for this code.
if( 'confirm_link' == $google_link ) { $html_overlay = '<a href="#" class="av_gmaps_confirm_link av_text_confirm_link' . $button_class . '">'; $text_overlay = esc_html( $confirm_button ); } else { $html_overlay .= '<a class="av_gmaps_page_only av_text_confirm_link' . $button_class . '" href="' . esc_url( $url ) . '" target="_blank">'; $text_overlay = esc_html( $page_link_text ); }
Replace it with:
$html_overlay = '<a href="#" class="av_gmaps_confirm_link av_text_confirm_link' . $button_class . '">'; $text_overlay = esc_html( $confirm_button );
This will replace the new tab link with the button that refreshes or loads the map on click.
Have you tried setting the map’s Advanced > Conditional Load > Link to Google Maps settings to the second option (User must accept to show google maps)?
Best regards,
IsmaelMarch 21, 2022 at 12:10 pm #1345334Hi Ismael,
thanks for your help. This worked so far.
How to I add a link and/or a button into the notification badge?
Thanks in advance.
March 21, 2022 at 2:24 pm #1345354Hi Ismael,
for whatever reason Microsoft Edge doesn’t seem to display the changes.
The badge on the map is supposed to say: “Durch den Klick …”
Instead it is showing an old version: “Aufgrund deiner Datenschutzeinstellungen …”The backend is fine, the revisions make sense, the map settings are OK.
I’ve installed Fastest Cache and tried shift F5 – no success. I’m lost.
March 22, 2022 at 4:59 am #1345437Hi,
Instead it is showing an old version: “Aufgrund deiner Datenschutzeinstellungen …”
The changes are displaying correctly on our end as shown in the screenshot below. Please try to check the site on incognito mode or test it on another device.
Screenshot: https://1drv.ms/u/s!AjjTfXSRbKTvwEieHBV0RqB4DoZ4?e=efUL5T
Best regards,
IsmaelMarch 22, 2022 at 10:28 am #1345488Hi Ismael,
thanks for your confirmation.
Kind regards.
March 22, 2022 at 2:33 pm #1345528 -
AuthorPosts
- The topic ‘Google Maps link when cookies are deactivated’ is closed to new replies.