How to track an internal link with Google Analytics

July 15th
stephanie
Nerd Alert! - Techy Stuff
0 Comments

1.  Placed the GA tracking script after the opening of the <body>  tag, and before your tagged links, to ensure your tagged links load after the GA tracking script.

2. Add this script for you links <a href="http://www.example.com" onClick="javascript: pageTracker._trackPageview(’/links/homepage/example.html’);">

 

Mobie Device JavaScript Detector and Redirect

July 1st
stephanie
Nerd Alert! - Techy Stuff
0 Comments

Here are some simple directions how to update your web site for a mobile device using javaScript to detect and redirect your visitors.

  1. Create your a new subdirectory on your web server and call it m.yoursite.com
  2. Design your new mobile site
  3. Download this js file
  4. Add a link to the javaScript in the head of the your html website (not your mobile website):
    <script type=”text/javascript” src=”js/redirection_mobile.js”></script>
    (if you copy and paste from here please retype the quotes if necessary)
  5. Add this script after your <body> tag:
    <script>
    SA.redirection_mobile ({
    redirection_paramName:”mobile_redirect”,
    mobile_prefix : “m”,
    cookie_hours : “2”
    });
    </script>

    (if you copy and paste from here please retype the quotes if necessary)

If you want further details about this topic refer to the following links:
https://github.com/sebarmeli/JS-Redirection-Mobile-Site
http://blog.sebarmeli.com/2010/11/02/how-to-redirect-your-site-to-a-mobile-version-through-javascript/