Jump to content
RESET Forums (homeservershow.com)
  • How to track web visitors on your Windows Home Server using Google Analytics


    Dave
     Share

    image

     

    by:  David McCabe, Windows Home Server MVP 2009

     

    I’ve often wondered if anyone has viewed my Windows Home Server Web front-end.  You know, the front end page that you use to log into your WHS console while you are remote.  Maybe you have put links there, websites even.

     

    How would you like a graphical representation that shows you the visitors to your site, what country, state, and city they surfed in from.  Oh, how about keywords.  If someone searches a keyword and lands on your site, you would want to know right?

     

    Enter Google Analytics

     

    Google Analytics shows you how people found your site, how they explored it, and how you can enhance their visitor experience.   It is free to anyone who wishes to use it.  Oh, it’s limited to 5 million pageviews a month.  If you have this problem you have a busy WHS!  You will need a Google account to sign up for Analytics.  Visit here to get started.

     

    Getting Started

     

    After you have signed up for a Google account and used this account to sign up for Analytics it’s very easy to get started.

     

    image

     

    Enter the name of your domain, i.e., yourservername.homeserver.com.  Click Finish and Google you will be taken to a page that has the code you need for the rest of this process.   You will need to place this code snippet in every page that you wish to be tracked by Analytics.

     

    image

     

    This is the screen you will see that contains the tracking code.  Right click in the box and “Copy” the text for the next steps.  This code snippet will contain your original tracking ID.  It is a code like: UA-1234567-8.  This code ties the site back to the Google Analytics ID.  Click Finish again and you are done on the Google Analytics site.

     

    I recommend creating a new text file on your desktop or in your WHS shares and paste this code snippet and save it.  This way you don’t have to go hunting the code for every webpage you would like to put it in.  Inevitably you will use copy/paste and clear the snippet from your clipboard without even thinking about it.

     

    Placing the Google Analytics code into your WHS Website

     

    If you are not comfortable with Remote Desktop or viewing HTML code you should probably get some help at this point.  Mistakes in this area could render your Remote Access Website inoperable.  Proceed with caution and at your own risk!

     

    Log in to your Windows Home Server via Remote Desktop.  Click Start, My Computer, and then the C: drive.

     

    Locate the Inetpub directory.

     

    image

     

    The page that greets you when you initiate a Remote Access session is found in the “home” directory.  You probably want to track this page and see how much traffic is coming to your Remote Access page.

     

    In the “home” directory locate the file, “default.aspx.”  This is the file we are going to edit.  It’s a good idea to make a backup copy of this file before you edit it.  Right click it and select Copy.  Right click in explorer and click paste.  You will now see your backup copy.

     

    image

     

    This is the HTML editing portion.  See the warning above!

     

    Rick click “default.aspx.” file and click Edit.

     

    Scroll down to the bottom of this file and locate the </body> tag.

     

    image

     

    Go back to the text file you created that contains your Google Analytics code snippet.  Select all, and copy.  Make sure you get it all.

     

    In the default.aspx file you have located the </body> tag.  Click right before the leading < and paste in the Analytics code.  Check to make sure the pasted code did not overwrite existing code or get put in the wrong place.  It might not be lined up nicely but it will work.

     

    image

     

    Notice in this image that the end of the tracking script comes right before the end of body.

     

    </script></body> If yours looks any different Click Edit, Undo and try again.

     

    Click Save!

     

    Tracking Whiist Sites

     

    Whiist is a great website management Add-In for Windows Home Server.  I highly recommend it.  With Whiist you can create a website or a photo album that can be accessed from the Internet.  The Add-In allows you choose the directory in which you place your website.  I put mine in the Public Share on my WHS.  I created a folder called Websites and that’s where I put all my public sites which are hosted on my WHS.

     

    You can also add links to your Remote Access landing page.  I usually add a link to my newly created photo albums so I can get to them directly from my Remote Access page.  Put your favorite links up as well.  For more information on Whiist click here.

     

    Navigate to the folder where your Whiist websites are and simply add the Google code snippet as described above.

     

    Back to Google Analytics

     

    Open a browser and navigate to your WHS page.  Make sure that it looks ok.  This should also send information to Analytics and the Tracking Status should change to receiving data.

     

    It may take up to 24 hours but you can always return to the Analytics setup and have Google look for the code manually.  Once it’s found it you will see a checkmark on the Tracking Status.

     

    Now you need to wait another 24 hours or so for data to come in.  Access your remote page and then come back the next day to see if you have any hits beyond what you have generated.  Here is where the fun part starts!

     

    image

     

    In Analytics click View Report to see your data.  You will have a ton of data at your fingertips.  Click the Map Overlay to see where your traffic is coming from.  It’s probably all generated by you but if your sharing your WHS with others you can see exactly when they accessed your server.

     

    image

     

    Wordpress and other blogging software have plug-ins that do all this work automatically.  Wouldn’t it be cool if this could be wrapped up in a WHS Add-In?  Simply paste your Analytics code into the add-in and it does the rest!

     

    I’m not a coder so there could possibly be some improvements in my methods.  If you are good at this stuff let me know if you seem room for improvement.  If this article helped you please comment!

     

    by:  David McCabe, Windows Home Server MVP 2009

     

    Originally Posted - May 1st, 2009

     Share


    User Feedback

    Recommended Comments



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

  • Our picks

    • I throw this out every once in a while.  Is anyone interested in writing up "semi-formal" reviews here on the forums?  I say semi-formal because they don't have to be pro level, just a good attempt at telling the story about the gear.  Something you have purchased lately.  You don't have to go buy stuff, just incorporate what you have already have purchased.  Hit me up with any questions.  You never know where it will lead!
        • Like
      • 3 replies
    • D-Link has dropped a couple of new products and additions to their lineup of smart home gear.  Hold on because there is a lot of gear!
      Let's start with cameras.  D-Link has new Wi-Fi cameras, the Full HD Pan and Tilt Pro Wi-Fi Camera (DCS-8302LH) and Full HD Indoor and Outdoor Pro Wi-Fi Camera (DCS-8526LH).  These are not just new, and good looking cams, they can now perform people detection and glass break detection.  The new cameras also feature expanded ways for customers to save video, including ONVIF Profile S, which enables custom storage and streaming options to personal NAS devices, built-in storage microSD capacity up to 256 GB, as well as free and paid cloud storage options. 
       

       
      This year's camera models include both an indoor and an outdoor model. The outdoor model features a spotlight and siren that can be triggered when motion is detected, deterring potential intruders. The indoor model pans around to give a full 360-degree view of any room and tracks motion. Both include two-way audio. 
      Full HD Pan and Tilt Pro Wi-Fi Camera is the model (DCS-8302LH), available in Q2, 2020, and retail pricing will be $99.99.
      Full HD Indoor and Outdoor Pro Wi-Fi Camera is the model (DCS-8526LH), available in Q3, 2020, and retail pricing will be $119.99.
      One of my favorite products is Wi-Fi.  D-Link has a whole lot of new products coming including Wi-Fi 6, Mesh, Alexa and Google Assistant integration, IFTTT, Parental Controls, and more!
       

       
      There are so many new SKU's that I can't make heads or tails of them!  I'm going to be speaking with D-Link more this week and will sort all of these out. I do want you to see all they are offering and what the release date and projected retail pricing will be.

      AC1900 Scalable Mesh Wi-Fi Router (COVR-1900-US), Q1 2020, $119.99
      AC1750 Mesh Wi-Fi Router (DIR-1750-US), Q1 2020, $99.99
      AC1900 Mesh Wi-Fi Router (DIR-1950-US), Q1 2020, $119.99
      AC1750 Mesh Wi-Fi Range Extender (DAP-1755-US), Q1 2020, $99.99
      AC1950 Mesh Wi-Fi Range Extender (DAP-1955-US), Q1 2020, $109.99
      Smart AX1500 Mesh Wi-Fi 6 Router (DIR-X1560-US), Q1 2020, $119.99
      Smart AX1800 Mesh Wi-Fi 6 Router (DIR-X1870-US), Q2 2020, $139.99
      Smart AX2400 Mesh Wi-Fi 6 Router (DIR-X2460-US), Q3 2020, $159.99
      Smart AX5400 Mesh Wi-Fi 6 Router (DIR-X5460-US), Q1 2020, $279.99
      AX1800 Mesh Wi-Fi 6 Range Extender (DAP-X1870-US), Q2 2020, $129.99
      AX1800 Whole Home Mesh System (COVR-X1872-US), QX22020, $269.99
        • Like
      • 0 replies
    • RESET Merch Shop
      Get ya Merch here!  I've created a T-Shirt shop with the famous RESET paperclip. I've pasted that clip on just about everything so you can wear it around town!  Cable bags, Coffee Mugs, T-Shirts, and more. 
       
      https://reset.threadless.com/
       
      or you can get it it via
       
      https://reset.fm/store
       
      Here is the main design.
       

       
      Below is a part of the order that I put in!  
       
       

       
      The Heather Grey above is the Extra Soft version and it is awesome.  I highly recommend the softness!    The "Chili Red" is the Tri-Blend and probably my favorite feel and color.

       
      This is the Zip-Up Hoody, Heather Indigo, Sponge Fleece, Men's, Large.  In my podcast I couldn't remember what style it was but it is Sponge Fleece. It's REALLY soft on the inside. Soft outside as well. The only problem is with the zip up hoody the logo is on the back. Regular hoody, it will be on the front.
       
      https://reset.threadless.com/
       
      or you can get it it via
       
      https://reset.fm/store
       
      Thank you for supporting this community. Everything you purchase will help keep the lights on the hard drives spinning.
       
      • 0 replies
    • OneDrive Personal Vault and expandable storage
      Microsoft's OneDrive has a few new features and options worth pointing out.  Personal Vault and Expandable Storage.
       
      Personal Vault is a protected area in OneDrive that can only be accessed with a strong authentication method or a second step of identity verification, such as your fingerprint, face, PIN, or a code sent to you via email or SMS. 
       
      Personal Vault gives you an added layer of protection for your most important files, photos, and videos—for example, copies of documents such as your passport, driver’s license, or insurance information—should someone gain access to your account or device.
      Plus, this added security won’t slow you down. You can quickly access your important documents, photos, and files with confidence wherever you are, on your PC, OneDrive.com, or your mobile device.

       
      Beyond a second layer of identity verification, Personal Vault also includes the following security measures:
       
      Scan and shoot—Using the OneDrive app, you can scan documents or shoot photos directly into your Personal Vault, keeping them off less secure areas of your device, like your camera roll.
      Automatic locking—No need to worry about whether you left your Personal Vault or your files open—both will close and lock automatically after a period of inactivity.
      BitLocker encryption—On Windows 10 PCs, OneDrive automatically syncs your Personal Vault files to a BitLocker-encrypted area of your local hard drive.
      Restricted sharing—To prevent accidental sharing, files in Personal Vault and shared items moved into Personal Vault cannot be shared.
       
      Taken together, these security measures help ensure that Personal Vault files are not stored unprotected on your PC, and your files have additional protection, even if your Windows 10 PC or mobile device is lost, stolen, or someone gains access to it or to your account.
       
      Expandable Storage
       
      If you are and Office 365 Subscriber you get 1 TB of OneDrive storage space with all the other Office goodies like Word, Excel, etc.  I know personally that I have gone over the 1TB limit and have always wanted to be able to add additional storage to my account.  Now you can!

       
      Pick and option and keep on hoarding, errr, I mean saving! Cancel anytime, upgrade at any moment.
      • 1 reply
    • Ubiquiti adds new items to the Unifi Line including UAP Flex HD and the Unifi Dream machine
      Ubiquiti has been busy.  There area ton of new items to recently released and I'm going to share two of my favorites.
       
      The UAP Flex HD and the Unifi Dream machine. The Flex HD is a mouthful of descriptors like most of UI gear is.  It's a 2Ghz 2x2 MIMO, 5GHz 4x4 MU-MIMO, POE, Indoor/Outdoor, multi mount, mesh point that is no bigger than a can of Coke.

       
      You will still need the Unifi controller although you can configure it with basic functionality with the Unifi App.  I've always found it's best to configure with your controller and then use the app as an add-on.  There are several mounting options that include sitting it on a shelf! That is something that Unifi has not had before unless you count the ceiling AP I have awkwardly mounted placed on top of a few books.  It can be found on the Unifi store for $179.
       
      https://store.ui.com/collections/wireless/products/unifi-flexhd
       
      The Dream Machine is an altogether different beast that I hope lives up to its naming.  This is the gateway drug, for lack of a better term, to the Unifi world.  The starter kit.  It is an Access Point, Gigabit Switch, Security Gateway, and the Cloud Key all in one package.  The latter being the most significant as this is something that has deterred new users from getting started with Unifi.  Requiring new users to purchase a $100 item just to run the AP's has been somewhat of a roadblock in the past.  Granted, that is improving every year with the ability to run it in the cloud, on a NAS, a Pi, Docker, MacOS, and of course Windows, it is still a barricade to getting up and running when manufacturers such as Eero offer simplicity in an app.
       

       
      The switch includes 4 LAN Ports and 1 WAN port.  All of which are Gigabit and security services such as IPS are rated at Gigabit speed. It's $299 in the Unifi store but I'm unsure how nicely it will play with other Unifi gear.  This may be a nice "first AP" with its built in Cloud Key if you can add additional units or other Unifi access points.
       
      https://store.ui.com/collections/routing-switching/products/unifi-dream-machine
      • 4 replies
×
×
  • Create New...