-
AuthorPosts
-
November 23, 2016 at 3:39 pm #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.
downloadI noticed the onclick code is automatically removes when we save the page. How can we resolve this?
November 24, 2016 at 6:10 am #716255November 24, 2016 at 9:26 am #716315Hi 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>November 24, 2016 at 3:20 pm #716445Hi,
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, 11 months ago by
Rikard.
November 24, 2016 at 8:21 pm #716560Hi 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?
November 24, 2016 at 10:06 pm #716604Hey!
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 understandingCheers!
BasilisNovember 25, 2016 at 12:12 am #716626Hi 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 :-(
November 28, 2016 at 4:11 pm #717843Hi,
I think Basilis is referring to this here: http://kriesi.at/documentation/enfold/enable-advanced-layout-builder-debug/
Best regards,
Andy -
This reply was modified 8 years, 11 months ago by
-
AuthorPosts
- You must be logged in to reply to this topic.
