How to Track Outbound Links in WordPress

I have a few pages on a website where some sections use a JavaScript slider to display content and I was wondering if it's possible for Google Analytics to track those sections?

For now when a section is clicked on the URL changes to

I'm trying to figure out a way I can track those sections with Analytics as well as have Google properly crawl them, any suggestions?

  • 1 See also this question re GA and hash fragments

Since the sections are revealed by JavaScript, you can use the pageTracker in Google Analytics to manually log a hit. For example:

// Log this usage in Google Analytics. pageTracker._trackPageview('/slider-page/part1'); 

Add that to the JavaScript which triggers the change in the page. The parameter given to the trackPageview method will be used as the path of the page in the content lists in Google Analytics, so be sure to use a different one for each section.

fungert for deg: Charles Robertson | Ønsker du å kontakte oss?