Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #714476

    Hi,

    I have 2 instances of a button (one in a header widget, one in a footer widget) which link to an external site.
    My customer’s SEO guys told me to ad an onclick event to those two buttons (for Google Analytics tracking):

    a href="#" onclick="trackOutboundLink('#'); return false;">Zur Online-Terminvergabe</a>

    I tried my best and read topics like these
    https://kriesi.at/support/topic/how-to-add-google-analytics-event-tracking-code-to-image-links-and-text-links/#post-326322
    https://kriesi.at/support/topic/please-clear-this-up-for-em-ga-tracking-2/#post-349057

    but I don’t really understand how to accomplish that. Could you please help me?

    Arti

    #715451

    Hey Artiarturro_66,

    you could try to put your code inside of a Code Block element.

    Best regards,
    Andy

    #715594

    Hi Andy,

    I am not sure if I understand what you mean – using a Code Block element inside a widget?
    I tried to put the Google Analytics code into my button shortcode (which is inside a text widget) – with no success.

    Then I tried to just use the provided code and style it as a button via Quick CSS (just in case that the code does not work inside a shortcode). But the problem is: when I click on it in Safari nothing happens. In Firefox and Chrome its working.
    Do you have any idea why?

    I would really appreciate it if you would look into it.
    It’s the button named “GA Test →” in the footer column 2

    Arti

    #715819

    Problem solved. It was my AdBlocker. Grrr.
    You can close this thread.

    Thanks!
    Arti

    #715847

    Hi!

    Please feel free to let us know if we can do anything else for you.

    Thanks a lot

    Regards,
    Basilis

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.