-
AuthorPosts
-
November 20, 2016 at 12:24 pm #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-349057but I don’t really understand how to accomplish that. Could you please help me?
Arti
-
This topic was modified 9 years, 1 month ago by
Artiarturro_66.
November 22, 2016 at 5:31 pm #715451Hey Artiarturro_66,
you could try to put your code inside of a Code Block element.
Best regards,
AndyNovember 22, 2016 at 9:32 pm #715594Hi 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 2Arti
-
This reply was modified 9 years, 1 month ago by
Artiarturro_66.
November 23, 2016 at 11:10 am #715819Problem solved. It was my AdBlocker. Grrr.
You can close this thread.Thanks!
ArtiNovember 23, 2016 at 11:43 am #715847Hi!
Please feel free to let us know if we can do anything else for you.
Thanks a lot
Regards,
Basilis -
This topic was modified 9 years, 1 month ago by
-
AuthorPosts
- You must be logged in to reply to this topic.
