I’m using generate press theme and elementor in wordpress and now we need to create on-click events for the menu and the buttons, see: eliv.com.tw/volunteerwithus. Since I can’t really use the html way to do it, I will need to use javascript. I’ve tried it like this:

         $( "#landingpage3-button1" ).click(function() {
             ga('send','event','phone call','header');

However this doesn’t seem to work…

Any ideas how to fix this?

Best regards,


PS: I don’t really know javascript and got this code from someone else…

Read more here: How to create on-click events for google analytics with javascript


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: