Google Analytics Track Outbound Links
-
Hi,
I would like to track outbound links with Google Analytics.
Is there a way to set links on images like this?
////////////////
<a href="http://outgoinglink.com" onclick="ga('send','event','Outgoing Links','outgoinglink.com')" target="_blank">Link Text</a>
////////////////
Source: https://www.axllent.org/docs/view/track-outbound-links-with-analytics-js/
I've already tried to install https://wordpress.org/plugins/google-analytics-for-wordpress/ but this plugin don't work with Lay Theme (but work with other plugins).
Thank you!
-
Hey!
Hmm, you could insert an image in the gridder using "+More" -> "+HTML". There you can write your image markup with an anchor and your onclick event.
Before you post:
- When using a WordPress Cache plugin, disable it or clear your cache.
- Update Lay Theme and all Lay Theme Addons
- Disable all Plugins
- Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code", click "Save Changes"
This often solves issues you might run into
When you post:
- Post a link to where the problem is
- Does the problem happen on Chrome, Firefox, Safari or iPhone or Android?
- If the problem is difficult to explain, post screenshots / link to a video to explain it
Forgot your key, lost your files, need a previous Lay Theme or Addon version?
Go to www.laykeymanager.com