Tracking custom image links on WordPress website by Google Analytics -


i developed wordpress website give option admin upload image , give link shown advertisement in front end. basically, image clickable , links link provided admin.

what want track clicks on these advertisements via google analytics. possible? new google analytics , not have idea.

(function ($) {  $(document).ready(function() {   // attach onclick event document , catch clicks on elements.   $(document.body).click(function(event) {     // catch closest surrounding link of clicked element.     $(event.target).closest("a,area").each(function() {                 _gaq.push(['_trackevent', 'image click', $('img', this).attr('alt'), $(this).attr('href')]);     });   });   });  })(jquery); 

yeah possible can track image click via google analytics see reference more info. http://techatitsbest.com/blog/image-click-tracking-google-analytics-events

http://www.seotakeaways.com/event-tracking-guide-google-analytics-simplified-version/


Comments

Popular posts from this blog

html - How to style widget with post count different than without post count -

How to remove text and logo OR add Overflow on Android ActionBar using AppCompat on API 8? -

javascript - storing input from prompt in array and displaying the array -