You basically have to tag the <a>
link
Google Analytics provides an easy way
to track clicks on links that lead to
file downloads.Because these links do
not lead to a page on your site
containing the tracking code, you’ll
need to tag the link itself with the
_trackPageview() JavaScript if you would like to track these downloads.
This piece of JavaScript assigns a
pageview to any click on a link – the
pageview is attributed to the filename
you specify.For example, to log every click on a
particular link to
www.example.com/files/map.pdf as a
pageview for /downloads/map you would
add the following attribute to the
link’s tag:
<a href="http://www.example.com/files/map.pdf" onClick="javascript: pageTracker._trackPageview('/downloads/map'); ">
http://www.google.com/support/analytics/bin/answer.py?hl=en&answer=55529
Hope that helps 🙂
Related Posts:
- How to add a custom metabox to the Menu Management admin screen?
- Add column to pages table
- Add column to pages table
- Admin top level menu, pointing to an external url
- Admin menu success message
- Can I rename the wp-admin folder?
- How to restrict dashboard access to Admins only?
- How to remove screen options and help links in the admin area?
- I’m getting a 404 message when I try to access wpadmin
- wordpress wp-admin css not loading
- wp_list_tables bulk actions
- .htaccess in wp-admin produces a redirect loop
- Edit specific nodes in WP_Admin_Bar
- Filter Custom Post Type in Admin
- Using Image insert control in code
- Wrong canonical link on wp-admin pages
- How can I make WordPress work with a Symfony app?
- Using the loop inside admin
- Easiest way to make post private by default
- Display sortable User meta column in admin panel user’s page
- Can’t access admin dashboard with wp-admin without /index.php after it
- How to change “wp-admin” to something else without search-replacing the core?
- Hooking into register_admin_color_schemes
- Hide pages depending on role
- How can I add an extra admin column showing the word-count of a page or post?
- Which actions can update/change .php files?
- Blank page for edit.php
- Upload media file problem
- comment_form – show all fields when logged in
- Always show same size tags for Tag Cloud in WordPress Admin
- Why should I password protect WP-Admin?
- How to change how long items are kept in the trash?
- Using /wp-admin works, using /login gives a 404. Why?
- Custom role based users are not able to access wp-admin
- How can I add ‘view mode’ to screen options for pages and cpts?
- Using List Table Filters for ALL Custom Post Types
- WP /wp-admin/admin-ajax.php produces 404
- Cannot log into WordPress Dashboard after removing/adding .htaccess
- My wp-admin stops working suddenly
- How to debug “You do not have sufficient permissions to access this page”? [closed]
- What is the practical difference between is_admin() and is_blog_admin()?
- How do I set the homepage to the WordPress Admin Dashboard login?
- How to check if upload window came from the featured image link?
- Today, without warning, all admin panel logins redirect to home page after login. non-admin users logins work well
- Stopping user deletion from running on error
- Admin search not working for any type of post
- admin_post action not usable if admin access denied to user
- Can’t log into wp-admin after migration from localhost to server
- Adding Custom Capabilites
- Why is unfiltered_upload not working despite being enabled?
- Can I add my own profile.php?
- Wp-admin is giving me an error “Sorry, you are not allowed to access this page.”. I do have access to the wp-admin besides the dashboard itself
- Linking table cells to network folders
- Remove bulk option row
- Admin menu in front-end
- How to remove menu installed in wp-admin by a theme? [closed]
- Require Login Redirect to Login Page
- ASCII to Unicode conversion and then save the data into database using WP post editor field
- How to fix ob_end_flush() failed to send buffer of zlib output compression (1)?
- 100+ terms in any taxonomy slows down post updates?
- Is WordPress Suitable for my site?
- Delete the “wp-admin” folder – what could go wrong?
- Nickname field isn’t appearing in Admin
- How to Find The Email of a WP Admin Account
- how can I change the font on Edit Post area (admin dashboard)
- External HTTP API calls slowing down WordPress admin [closed]
- Why is my ‘export’ option missing?
- Change users.php WP_User_Query
- Blank page when viewing wp-admin
- Is it possible to display my theme sidebar in wordpress admin?
- How to access wordpress from domainB which is installed at domainA
- How to optimize the opening speed of admin panel?
- WordPress /wp-admin redirect to wrong port in docker
- How to change the URL of sub menu page?
- Change wordpress admin home page
- Strange wp admin edit buttons issue
- Cannot access wp-admin after migration to another place
- Regular users logs in as ADMIN if Admin logged in recently
- Enable Excerpt field inside the post editor for pages
- Failed to load resource: the server responded with a status of 500 (Internal Server Error)
- Strange Popup Ad on my WordPress Admin Dashboard
- WordPress switch domains
- Menus not visible in Appearance after being registered
- Not able to access WP admin Page, redirected and a drop down login menu appears 401 error
- OSX El Capitan local install Maximum upload file size: 2 MB But php.ini set to 64M
- Get Post ID in Admin Edit screen otherwise generate it?
- Cannot login in WordPress even after changing hash password in phpmyadmin
- Is it possible to outsource wp-admin to another server?
- Wp mwnu not works at all
- Can’t log into WordPress after domain change
- Customizing label/title output of admin nav_menu selecter
- Search box for hierarchical taxonomies in admin interface
- Custom Admin Message from external source to multiple users
- How can visitors redirect wp-admin to the homepage?
- Creating your own options-general.php page
- I want to know if it’s good for SEO [closed]
- My website’s wp-admin redirects to another website’s wp-admin after pointing the site url to a subdirectiory
- Add custom fields to specific menus
- Redirecting the user to the admin table area after publishing a post, getting an invalid response error?
- WordPress Localhost migration issue