Add onclick to Image URLs

justin14
14 Posts
justin14 posted this 21 September 2015

Hi,
I am trying to create a theme that includes a number of images used for click-to-call.
I see there is the option to add a hyperlink to the images - awesome. But how and where do I go about adding an onClick call to them? I am specifically looking to add onclick="goog_report_conversion('')" to all the images so that conversions can be tracked in AdWords.
Adding the onClick to the Address section does not work.

Please help.
Thanks.

PS: I'm using Themler Desktop to create a WordPress theme.

Hi, I am trying to create a theme that includes a number of images used for click-to-call. I see there is the option to add a hyperlink to the images - awesome. But how and where do I go about adding an onClick call to them? I am specifically looking to add onclick="goog_report_conversion('')" to all the images so that conversions can be tracked in AdWords. Adding the onClick to the Address section does not work. Please help. Thanks. PS: I'm using Themler Desktop to create a WordPress theme.

Last edited 21 September 2015 by justin14

Vote to pay developers attention to this features or issue.
4 Comments
Order By: Standard | Newest
Support Team
Support Team posted this 21 September 2015

Hi,

You can try to use the HTML control. Add the code under the code section and apply the desired image under the Styles >> Image option for the HTML control.

Sincerely,
Hella

Hi, You can try to use the HTML control. Add the code under the code section and apply the desired image under the Styles >> Image option for the HTML control. Sincerely, Hella
justin14
14 Posts
justin14 posted this 21 September 2015

Hi,

Please elaborate. It seems you are suggesting that instead of inserting an image in my column I insert an HTML control.
If I use the Styles>>Image option I can't seem to get it clickable in line with the code in the HTML control. It simply adds the images as a background to the HTML.
Thanks.

Hi, Please elaborate. It seems you are suggesting that instead of inserting an image in my column I insert an HTML control. If I use the Styles>>Image option I can't seem to get it clickable in line with the code in the HTML control. It simply adds the images as a background to the HTML. Thanks.
justin14
14 Posts
justin14 posted this 22 September 2015

Hi,
Please can you elaborate on the workaround for this?
Thanks.

Hi, Please can you elaborate on the workaround for this? Thanks.
Support Team posted this 23 September 2015

Hi,

The main idea is to insert the image as image or background image and put clickable element on top of this image.
For example:

  • If you're working with columns you can put the image inside the column
  • insert HTML control into this column
  • change it's position to absolute. It should cover the whole area.

clickabke-area.png

In my example HTML control has green color. The green area will be clickable.

Thank you,
Olivia

Hi, The main idea is to insert the image as image or background image and put clickable element on top of this image. For example: - If you're working with columns you can put the image inside the column - insert HTML control into this column - change it's position to absolute. It should cover the whole area. !clickabke-area.png! In my example HTML control has green color. The green area will be clickable. Thank you, Olivia
You must log in or register to leave comments