• Resolved panevin83

    (@panevin83)


    Hi,
    I use Outdoor Active to embed custom route maps, I didn’t understand how to block the code that creates the iframe in the page section…

    Example code inside a section/div:

    <script type="text/javascript" src="https://www.outdooractive.com/it/embed/194945100/js?mw=false&usr=382c39&key=XXXXXXXXX"></script>

    How can I block the sections with the maps until the user gives consent?
    (I notice that it creates an iframe with a div with various classes)
    (I use WP Cache system + Divi)
    Thanks!

    • This topic was modified 2 years, 11 months ago by panevin83.
Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author Aert Hulsebos

    (@aahulsebos)

    Hi @panevin83,

    Could you try 3.2 Block a script, iframe, or plugin on https://complianz.io/integrating-plugins/

    Try to block outdooractive.com, with a Google Maps placeholder.

    This should be the quickest way. Let me know!

    regards Aert

    Thread Starter panevin83

    (@panevin83)

    HI Aert, I tried but it didn’t work… it hides everything and if I accept all cookies it does not load anything, inspecting for many errors

    Here the link: https://bit.ly/3MpFYuD

    • This reply was modified 2 years, 11 months ago by panevin83.
    Plugin Author Aert Hulsebos

    (@aahulsebos)

    Hi @panevin83,

    If I follow the link and see below Google Maps with the trail markers, it seems to work, maybe there was some caching issue.

    You can change the dimensions of the placeholder under Settings, as the height is pretty big.

    You can also create your own custom placeholder; more about that here: https://complianz.io/changing-the-google-maps-placeholder/

    regards Aert

    Thread Starter panevin83

    (@panevin83)

    Hi Aert,
    the problem is not Google Maps that works correctly, I can’t block the Outdooractive code ..
    Here is the settings: https://freeimage.host/i/VXDQ0F
    Blank page in Outdoor Active section…
    how can I solve it?

    Plugin Contributor jarnovos

    (@jarnovos)

    Hi @panevin83,

    I see what you are referring to, the behavior seems to be specific to the OutdoorActive embed. I have created a feature request to add support for this particular embed, which you can find here. We will update this when the status changes.

    As a solution for now, my recommendation would be to wrap the OutdoorActive embeds in Consent Area shortcodes to block them before consent is obtained.

    [cmplz-consent-area category=’marketing’ text="Enable this content by clicking this link"]
    
    /* add your snippet here */
    
    [/cmplz-consent-area]

    For more information about this approach (and some ready-to-use CSS to style the placeholder), please refer to: https://complianz.io/wrapping-content-in-consent-shortcodes/

    Kind regards,
    Jarno

    Thread Starter panevin83

    (@panevin83)

    tnt @jarnovos , it works (temporarily)!
    Not knowing what kind of cookie Outdoor active uses ( I think pref or session), does it only work with category=”marketing” or can I also add “preferences” or “statistics” (with which code)?
    Thanks!

    Plugin Contributor jarnovos

    (@jarnovos)

    Hi @panevin83,

    Thank you for confirming! And yes, you can change the consent category on which the script should be unblocked.

    You can do this by modifying the category='marketing' part in the shortcode to category='statistics' for example, which will result in it being unblocked on consent for the Statistics category.

    The end result after applying the above would be:

    [cmplz-consent-area category='statistics' text="Enable this content by clicking this link"]
    
    /* your snippet */
    
    [/cmplz-consent-area]

    Kind regards,
    Jarno

    • This reply was modified 2 years, 10 months ago by jarnovos.
    Thread Starter panevin83

    (@panevin83)

    If I put ‘statistics’ the page starts loading in loop.. and I don’t know why -_-

    Plugin Contributor jarnovos

    (@jarnovos)

    Hi @panevin83,

    I expect this might happen as a result of caching. Could you try the below shortcode instead, which additionally has cache_redirect=true attribute added? This allows the caching tool to cache the consent page separately.

    [cmplz-consent-area category='statistics' cache_redirect=true text="Enable this content by clicking this link"]
    
    /* your snippet */
    
    [/cmplz-consent-area]
    Thread Starter panevin83

    (@panevin83)

    [cmplz-consent-area category=’statistics’ cache_redirect=true text=”Accetta tutti i cookie per visualizzare correttamente questo contenuto”]

    /* my snippet */

    [/cmplz-consent-area]

    This is my code…For now I have only edited the page in Italian.
    if you want to test it go to the Hike & trail page (Italian version)
    If I click on “accept all cookies” in the blocked section, It selects “Marketing” cookie even if I have put “Statistics” as category and the page loads in loop.
    (I disabled WP Cache plugin)

    • This reply was modified 2 years, 10 months ago by panevin83.
    Plugin Contributor jarnovos

    (@jarnovos)

    Hi @panevin83,

    I was able to reproduce the described behavior as well when changing the category in the consent-area Shortcode to “statistics” instead of “marketing”.

    The plugin version attached on the GitHub link below should fix the issue. You can download this updated version by clicking the green Code button > “Download .ZIP”.

    https://github.com/Really-Simple-Plugins/complianz-gdpr/tree/shortcode-consent-area

    Just let me know if that works for you as well!

    Kind regards,
    Jarno

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Problems blocking embed code’ is closed to new replies.