Using Google Analytics to Track PDF Views

I currently build and manage a pro-bono site for Greenwood Christian Academy where they have a lot of PDF documents.  The users click on documents for enrollment, calendars, educational forms, health documents, etc.  Just recently they also announced an event that offers sponsorships.  The question that has come up lately is how to use Google Analytics to track how many people view the pdf documents and how many people click on the sponsor links.  This may sound simple but then I realized that Google does not track counts for links that go away from the site or to pdf views.  Not accepting this as failure, I started looking around and came across a “cool” feature that Google offers called ‘_trackEvent’.  You can use this for a multitude of things but I believe this is what I need.  The key is to realize that you need to attach something to the <a href> before the actual redirect.  Since I always use the pdf and external links with a target=’_blank’ I decided to attach an event handler to the <a href>.  The problem is this could take a while, especially if you have a lot of links and pdf.  Thank goodness for jquery.  I attached the code below as close to the end of the page as possible (preferably right before the </body>).  This script attaches a click event to every <a href> if there is a target=’_blank’.  I then determine if it is a pdf or just a “plain” link. Learn More

Tags: , , , , , , , , | Posted under ASP .NET 2, ASP .NET 3.5, ASP .NET 4.0, DotNet/Windows Hosting, Programming/Coding | Leave a comment

How to Create New Pages in Prestashop

Prestashop has lots of pages to display specific stuff, but it may not be enough. What if we want to show all of our products to the customer, for example? We’d need a brand new page with its controller. Let’s see how easy it’s become to add new pages to Prestashop since 1.5.

Download Project Files

Introduction Learn More

Tags: , , , , , | Posted under PrestaShop | 10 Comments

How to Install WordPress Without Using FTP

WebsitePanel control panel enables you to manually install WordPress without using any FTP software such as FileZilla. Follow the steps given below:

(1) Download the latest version of WordPress

(2) Extract the ZIP file and locate wp-config.php file Learn More

Tags: , , , , , , , , , | Posted under DotNet/Windows Hosting, WordPress | Leave a comment