This thread is over two years old and may be outdated. Please create a new thread if you need help, or email us if you have an active Premium license.

Button Tracking (Onclick)

5 years ago · Last reply by Andrew Misplon 5 years ago

Hi,

I’m trying to set up event tracking in Analytics for button clicks.

In the OnClick field I’ve entered the following; ga(“send”, “event”, “Button”, “Click”, “vmscompare”, “1”);

No matter what I try I can’t get the event to record in Analytics (Realtime or otherwise)

The page URL is https://eleymet.com/digital-height-gauge/

The Button Name is ‘How does the VMS Compare’

Analytics is working and other tracking is working perfectly.

Can you advise what I’m doing wrong?

Thanks

This is our free support forum. Replies can take several days.

Need fast email support? Get SiteOrigin Premium

Replies

5
  1. Andrew Misplon Staff 5 years, 3 months ago

    Hi Carlos

    Thanks for reaching out.

    Perhaps try:

    ga('send', 'event', 'Button', 'Click', 'vmscompare', '1');
  2. CarlosB 5 years, 3 months ago

    Hi Andrew,

    Thanks for replying.

    I’m afraid your suggestion hasn’t worked either.

    Is there anything else I could try?

  3. Andrew Misplon Staff 5 years, 3 months ago

    You can perhaps try setting up a test button on a page not using Page Builder to see if that’s working.

    <button onclick="ga('send', 'event', 'Button', 'Click', 'vmscompare', '1');">Button</button>

    https://www.w3schools.com/jsref/event_onclick.asp

  4. CarlosB 5 years, 3 months ago

    Hi Andrew,

    Thanks for coming back again. I’ve managed to find a workaround using a plugin.

    Thanks for your help

  5. Andrew Misplon Staff 5 years, 3 months ago

    Sure, no problem. Glad to hear you’re making progress :)

Replies on this thread are closed.

Please create a new thread if you have a question, or purchase a SiteOrigin Premium license if you need one-on-one email support.

Have a different question or issue?

Start New Thread