Tagged: ,

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #715984

    Hi,

    We have a file download in a accordion tab. We need to place a javascript onclick action to a pdf file download to be able to track it in analytics.
    download

    I noticed the onclick code is automatically removes when we save the page. How can we resolve this?

    #716255

    Hey hotspot,

    What code are you trying to add?

    Best regards,
    Rikard

    #716315

    Hi rikard,

    Can you see the code now?

    <a href=""http://www.domainamexx.com/wp-content/uploads/folder.pdf"" onclick=""ga('send', 'event', 'PDF', 'Download', 'PDF Download');"" target=""_blank"">download</a>

    #716445

    Hi,

    Sorry but my code section keeps outputting html instead of the code, please try to remove all double quotes in your code. For instance:

    ""http://www.domainamexx.com/wp-content/uploads/folder.pdf""

    Should be:

    "http://www.domainamexx.com/wp-content/uploads/folder.pdf"

    Best regards,
    Rikard

    • This reply was modified 8 years ago by Rikard.
    #716560

    Hi rikard, the double quotes is something that happend here. It is not in the code we use. The problem is thwt the javascript part. The ‘onlick’ is immediately being stripped from the html when the accordion is saved.

    Ofcource we input the html in ‘text’ modus.

    Seems the javascript is not rendered by the framwork.

    How can we input this code in the accordion?

    #716604

    Hey!

    Can you maybe try convert the code to shortcode and use it then as that, inside the accordion?
    The html output, is not allowed to be something else we are afraid.
    Tanks a lot for your understanding

    Cheers!
    Basilis

    #716626

    Hi Basilis,

    A shortcode yes, but that would mean we have to install a plugin for it. That means more code, more weight, slowing down the website. For the use of it, it is overkill.

    Too bad the framework (still) does not support this :-(

    #717843

    Hi,

    I think Basilis is referring to this here: http://kriesi.at/documentation/enfold/enable-advanced-layout-builder-debug/

    Best regards,
    Andy

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.