Support » Plugin: Lead Call Buttons » OnClick tracking code help

  • Resolved trublu30


    I am trying to set up Onclick tracking code, but I dont know if I have got it correct. My Google analytics is using universal analytics and this is the code that I am putting in the Lead Call Button Onclick code box:

    onClick=”ga(‘send’, ‘event’, ‘Mobile Contact’, ‘Phone’, ‘Phone button clicked’);”

    Nothing is showing up in my GA when I test this. Is there something I am doing wrong?

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Smart Site


    Thread Starter trublu30


    Thanks for your reply. I think I have it sorted. I just needed to put it in like this:
    ga(‘send’, ‘event’, ‘Mobile Contact’, ‘Phone’, ‘Phone button clicked’);

    Hi Trublu30
    i know your problem got solved.
    im a beginner in these things but i want to track who ever click to call on this plugin.
    i did the same as u said but no luck.would you please help me to do that also?
    i really appreciate if u can help me

    Thread Starter trublu30


    Hi mishel298,

    I will assume you are using Google Analytics to track this and know which GA code you are using (GA or Universal analytics). I am using Universal analytics. Here is a screenshot of the code I placed into the Lead Call Button Onclick Code box:
    And here is a screenshot of where it then shows up in GA:

    I’m certainly not a guru in this area, but I did manage to get this to work!

    thank u so much for your reply and sorry for late reply as i was on business trip.
    ok i just copy the code that u did for on click code.
    now i want to know how did u set these settings in analytics.

    Category Equals to ???
    Action Equals to ???
    Label Equals to ???
    Value Greater than ???
    Please specify at least one event condition.

    actually event conditions which i have no idea about them.
    i just want to set it up and finish it .

    thanks in advance

    Would You Pls Help Me trublu30?

    Thread Starter trublu30


    The GA data is simply to match what you put in the Lead Call fields. See here: and then here for where these are coming from:

    Hope this helps.

    thank u so much for your help trublu30
    but i still have problem. it seems i did something wrong.
    may i have your phone number or skype id or something that we can talk for few minutes and we finish it .
    i really appreciate and sorry for bothering

    This thread is very helpful. I would recommend adding this info into the FAQ and or a help section within the plugin.

    Plugin Author Smart Site


    great idea! will do thx!

    Hi all,

    I have been using this plugin for a few weeks now, but I don’t seem to able to track the clicks in Google. I have used both the following codes:

    ga(‘send’, ‘event’, ‘Lead Call button’, ‘(0495) 54 84 87, ‘Telefoonnummer Weert’);


    ga(‘send’, {
    hitType: ‘event’,
    eventCategory: ‘Lead Call button’,
    eventAction: ‘(040) 2572922’,
    eventLabel: ‘Telefoonnummer Eindhoven’

    But no events are triggered :-(. Could it be a conflict with Google Tag Mangager? I am using it on the website of a client:

    Thanks in advance for your help!


    a follow up from my last post. I really like the plugin, but it is crucial for us that we are able to measure the clicks on the phone numbers.

    Plugin Author Smart Site


    here’s one way we’ve done it:

    our link:
    <a href="tel:9547839737" onclick="ga('send', 'event', 'Phone Call', 'click', 'Home Header');">954.783.9737</a>

    our goal in google analytics

    • This reply was modified 5 years, 2 months ago by Smart Site.

    Look at the links in the previous replies by trublu30. They absolutely do work as described. If it is not working for you, you probably have a plugin conflict (you’ll need to deactivated and test one by one) or or you are testing using an IP address that you have set up to exclude in Google Analytics or your UA code implementation on your site (if using a plugin) is setup to exclude your user role (if you’re logged in)

    • This reply was modified 5 years, 2 months ago by Travis Pflanz.
    Thread Starter trublu30


    Has anyone tried this onclick tracking for Facebook leads? Option 2 at the bottom of this post shows code that could be used, but can we have two codes (Google and Facebook) within the onclick code field within Lead Call Buttons Settings? Be glad of feedback from the team or community.

Viewing 15 replies - 1 through 15 (of 15 total)
  • The topic ‘OnClick tracking code help’ is closed to new replies.