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:
Use the Search Feature. Maybe there is already a solution to your issue.
1. Update Lay Theme and all Lay Theme Addons
2. Disable all Plugins
3. Go to Lay Options → Custom CSS & HTML, click "Turn Off All Custom Code ", click "Save Changes"
4. When using a WordPress Cache plugin, disable it or clear your cache.
Now see if your problem solved itself.
Go here, see if your problem is listed here:
Troubleshooting
When you post:
1. Post a link to where the problem is
2. If the problem is difficult to explain, post screenshots / link to a video to explain it
I don't answer or check forum DMs, please just post on the forum.