Master Google Analytics & It’s Hidden Features In Less Than 5 Minutes

There is a little known hidden feature buried deep inside Google Analytics that is a goldmine of actionable ideas & insights.

If you are like most small website owners you probably use Google Analytics every now and then, poking about in random sections & looking at the graphs to give you anecdotal indicators about your users or trends. Did you know there is a mobile app too?

Most of use are not really scratching the surface with Google Analytics, let alone mastering it & using it for all it’s worth! Most of us honestly just don’t have (or make) the time needed to become a Google Analytics ninja.

Fortunately someone else has done all the hard work & with just a few clicks you can fill your Google Analytics account with useful reports & even an executive dashboard to tell you exactly how your site is doing. Just tell me how I hear you asking, well follow these easy steps…..

Login to your Google Analytics account now, click “Customization” (Google uses USA English spelling as you can see), then “Import from Gallery”.

Google Analytics Import From Gallery (custom reports)

 

The Google Analytics Solutions Gallery should be on screen now, there are lots of good ones to play with but we will try out “Occam’s Razor Awesomeness”, go ahead and click import.

Google Analytics Solutions Gallery (custom reports)

On the shared reports permissions page, choose which site you want to import the reports into, as you can see I’m applying this to the vigus.eu view.

Google Analytics Solutions Gallery Permissions (custom reports)

Once you’ve clicked create you will find a selection of new reports to play with in your Google Analytics account.

Google Analytics Custom reports

You will also find a fancy new executive dashboard.

Google Analytics Executive Dashboard

Another little gem that’s often left unused is the custom alerts function which can send you an email or text message based on defined criteria, such as an increase in 404 errors, or a % drop in traffic over a period of time.

Google Analytics Custom Alerts

 

So now you know how to supercharge your Google Anayltics use by creating custom reports, executive dashboards & alerts. It’s easier than you thought and can be setup in just a few minutes – enjoy!

Jason Vigus

Access you iCloud Photo Stream from your Mac

One of the best features of iCloud these days is it’s ability to automatically sync your photo’s between devices, so if you take a picture on your iPhone or IPad it will automatically appear on any other devices you have.

You can extend this functionality to your Mac too but unfortunately its not necessarily obvious how to do this at first glance.This quick guide will get you accessing your iCloud Photo Steam on your Mac in no time:

Turning on Photo Stream on in IOS (iPhone, iPod or iPad device)

The first step you will need to do is enable iCloud Photo Stream on your IOS device. To enable Photo Stream on your iOS device: Go to Settings > iCloud > Photo Stream. Slide the switch over so it reads “On.” That’s it!

Accessing Photo Stream on your Mac via iPhoto

This is the simplest way to access the iCloud Photo Steam on your Mac device, for this example I am using iPhoto 9.5.8:

1. Open iPhoto. On menu on the left at the bottom, click the “Photo Stream” option.
2. You will see a yellow notice on the screen that explaining what to do next.
3. Click the arrow icon at the end of the notice text, and click the box next to the “My Photo Stream” option. Your photos will begin to load into iPhoto, be patient – If you have a lot of photos already in your Photo Stream, it may take a while before for them all to sync.

 

Jason Vigus

How to easily disable WordPress pingbacks & comments for new & old posts

Today I decided to disable comments and pingbacks on my WordPress blog because the ratio of spam to real comments was in the region of 200:1, I’ve tried various anti-spam comment pluggin’s but with only limited success. So enough was enough & I’ve disabled pingbacks & comments on my WordPress blog now.

It’s easy enough to do this for new posts:
Screen Shot 2014-04-19 at 11.39.09

1. Click Settings
2. Uncheck “Allow link notification from other blogs (pingbacks and trackbacks)” & “Allow people to post comment on new articles”

You will also want to go and disable this for all your old posts, here is a quick & easy way to do that:
Screen Shot 2014-04-19 at 11.41.031. Go to your “Posts” page
2. Expand “Screen Options”
3. Change the options so you have a good number of posts displayed.
4. Apply the “Screen Options” change.
5. Select all posts.
6. Select “Edit” in the drop down option & click “Apply”.
7. Set “Comments” to “Do not allow” (this disables comments).
8. Set “Pings” to “Do not allow” (this disables pingbacks).
9. Click “Update” to apply changes.

Note: if you didn’t select a high enough number for option 3 you will need to repeat this process on Page 2, Page 3, Page 4 & so on.

Now you have turned off pingbacks & comments this will reduce the amount of spam that finds it’s way to your WordPress blog – that was easy wasn’t it!

 

Jason Vigus

Transfer SQL Server Logins Between instances of SQL Server 2005, 2008 or 2008R2

If you find yourself needing to transfer your SQL Server Logins between instances or SQL servers (SQL Server 2005, 2008, and 2008R2) for migration purposes, or simply want to make a backup of your SQL Server Logins for disaster recovery purposes just follow these easy steps:

Step 1: On the source server launch SQL Management Studio & connect to the instance of SQL from which you moved the database.

Step 2: Open Query Editor and run the following:

USE master
GO
IF OBJECT_ID ('sp_hexadecimal') IS NOT NULL
  DROP PROCEDURE sp_hexadecimal
GO
CREATE PROCEDURE sp_hexadecimal
    @binvalue varbinary(256),
    @hexvalue varchar (514) OUTPUT
AS
DECLARE @charvalue varchar (514)
DECLARE @i int
DECLARE @length int
DECLARE @hexstring char(16)
SELECT @charvalue = '0x'
SELECT @i = 1
SELECT @length = DATALENGTH (@binvalue)
SELECT @hexstring = '0123456789ABCDEF'
WHILE (@i <= @length)
BEGIN
  DECLARE @tempint int
  DECLARE @firstint int
  DECLARE @secondint int
  SELECT @tempint = CONVERT(int, SUBSTRING(@binvalue,@i,1))
  SELECT @firstint = FLOOR(@tempint/16)
  SELECT @secondint = @tempint - (@firstint*16)
  SELECT @charvalue = @charvalue +
    SUBSTRING(@hexstring, @firstint+1, 1) +
    SUBSTRING(@hexstring, @secondint+1, 1)
  SELECT @i = @i + 1
END

SELECT @hexvalue = @charvalue
GO

IF OBJECT_ID ('sp_help_revlogin') IS NOT NULL
  DROP PROCEDURE sp_help_revlogin
GO
CREATE PROCEDURE sp_help_revlogin @login_name sysname = NULL AS
DECLARE @name sysname
DECLARE @type varchar (1)
DECLARE @hasaccess int
DECLARE @denylogin int
DECLARE @is_disabled int
DECLARE @PWD_varbinary  varbinary (256)
DECLARE @PWD_string  varchar (514)
DECLARE @SID_varbinary varbinary (85)
DECLARE @SID_string varchar (514)
DECLARE @tmpstr  varchar (1024)
DECLARE @is_policy_checked varchar (3)
DECLARE @is_expiration_checked varchar (3)

DECLARE @defaultdb sysname

IF (@login_name IS NULL)
  DECLARE login_curs CURSOR FOR

      SELECT p.sid, p.name, p.type, p.is_disabled, p.default_database_name, l.hasaccess, l.denylogin FROM 
sys.server_principals p LEFT JOIN sys.syslogins l
      ON ( l.name = p.name ) WHERE p.type IN ( 'S', 'G', 'U' ) AND p.name <> 'sa'
ELSE
  DECLARE login_curs CURSOR FOR

      SELECT p.sid, p.name, p.type, p.is_disabled, p.default_database_name, l.hasaccess, l.denylogin FROM 
sys.server_principals p LEFT JOIN sys.syslogins l
      ON ( l.name = p.name ) WHERE p.type IN ( 'S', 'G', 'U' ) AND p.name = @login_name
OPEN login_curs

FETCH NEXT FROM login_curs INTO @SID_varbinary, @name, @type, @is_disabled, @defaultdb, @hasaccess, @denylogin
IF (@@fetch_status = -1)
BEGIN
  PRINT 'No login(s) found.'
  CLOSE login_curs
  DEALLOCATE login_curs
  RETURN -1
END
SET @tmpstr = '/* sp_help_revlogin script '
PRINT @tmpstr
SET @tmpstr = '** Generated ' + CONVERT (varchar, GETDATE()) + ' on ' + @@SERVERNAME + ' */'
PRINT @tmpstr
PRINT ''
WHILE (@@fetch_status <> -1)
BEGIN
  IF (@@fetch_status <> -2)
  BEGIN
    PRINT ''
    SET @tmpstr = '-- Login: ' + @name
    PRINT @tmpstr
    IF (@type IN ( 'G', 'U'))
    BEGIN -- NT authenticated account/group

      SET @tmpstr = 'CREATE LOGIN ' + QUOTENAME( @name ) + ' FROM WINDOWS WITH DEFAULT_DATABASE = [' + @defaultdb + ']'
    END
    ELSE BEGIN -- SQL Server authentication
        -- obtain password and sid
            SET @PWD_varbinary = CAST( LOGINPROPERTY( @name, 'PasswordHash' ) AS varbinary (256) )
        EXEC sp_hexadecimal @PWD_varbinary, @PWD_string OUT
        EXEC sp_hexadecimal @SID_varbinary,@SID_string OUT

        -- obtain password policy state
        SELECT @is_policy_checked = CASE is_policy_checked WHEN 1 THEN 'ON' WHEN 0 THEN 'OFF' ELSE NULL END FROM sys.sql_logins WHERE name = @name
        SELECT @is_expiration_checked = CASE is_expiration_checked WHEN 1 THEN 'ON' WHEN 0 THEN 'OFF' ELSE NULL END FROM sys.sql_logins WHERE name = @name

            SET @tmpstr = 'CREATE LOGIN ' + QUOTENAME( @name ) + ' WITH PASSWORD = ' + @PWD_string + ' HASHED, SID = ' + @SID_string + ', DEFAULT_DATABASE = [' + @defaultdb + ']'

        IF ( @is_policy_checked IS NOT NULL )
        BEGIN
          SET @tmpstr = @tmpstr + ', CHECK_POLICY = ' + @is_policy_checked
        END
        IF ( @is_expiration_checked IS NOT NULL )
        BEGIN
          SET @tmpstr = @tmpstr + ', CHECK_EXPIRATION = ' + @is_expiration_checked
        END
    END
    IF (@denylogin = 1)
    BEGIN -- login is denied access
      SET @tmpstr = @tmpstr + '; DENY CONNECT SQL TO ' + QUOTENAME( @name )
    END
    ELSE IF (@hasaccess = 0)
    BEGIN -- login exists but does not have access
      SET @tmpstr = @tmpstr + '; REVOKE CONNECT SQL TO ' + QUOTENAME( @name )
    END
    IF (@is_disabled = 1)
    BEGIN -- login is disabled
      SET @tmpstr = @tmpstr + '; ALTER LOGIN ' + QUOTENAME( @name ) + ' DISABLE'
    END
    PRINT @tmpstr
  END

  FETCH NEXT FROM login_curs INTO @SID_varbinary, @name, @type, @is_disabled, @defaultdb, @hasaccess, @denylogin
   END
CLOSE login_curs
DEALLOCATE login_curs
RETURN 0
GO

This script will create two SP’s (stored procedures) in your master database called “sp_hexadecimal” & “sp_help_revlogin“.

Step 3: Clear Query Editor & run the following statement:

EXEC sp_help_revlogin

Step 4: Copy the output script generated by sp_help_revlogin and either save to file or run this on your new server, this script creates logins that have the original SID (Security Identifier) and password.

If you want to read more check out the following Microsoft Knowledge Base article: http://support.microsoft.com/kb/918992

You’re done already – I told you it was easy!

Jason Vigus

Change SQL 2008R2 Server Collation Setting on Failover Cluster

Many people believe to change the default SQL Server collation setting from the one chosen when SQL Server was originally installed requires SQL Server to be re-installed again, this is not true from SQL 2005 onwards as I shall explain using SQL 2008R2 (in a cluster configuration) as an example.

To change the default SQL Server collation you can simply rebuild the system databases. When you rebuild the master, model, msdb and tempdb system databases, the databases are actually dropped and recreated in their original location. If a new collation is specified in the rebuild statement the system databases are rebuilt using that collation setting. Any user modifications to theses databases will be lost so it is important to backup any of this you wish to retain, eg SQL Server logins.

If you are running a non-clustered (standalone) SQL Server, you can simply skip step 3.


Step 1: Review the Microsoft MSDN documentation regarding “Before You Rebuild The System Databases” & complete the steps to backup your server configuration.

Step 2: Backup your SQL server logins. (How to Backup/Transfer your SQL Logins)

Step 3: Open Cluster Failover Administrator & put your SQL Server resource offline, I also recommend you pause the secondary node to prevent any accidental failovers & the resource coming online.

Step 4: Login to the active SQL node in the cluster & run the following command:
setup.exe
/Q
/ACTION=REBUILDDATABASE
/SQLSYSADMINACCOUNTS=”DomaineName\UserAccount”
/SQLCOLLATION=CollationName
/INSTANCENAME=”OnlyInstanceName”
/SAPWD=StrongPassword

Note the following:
-The INSTANCENAME parameter takes only the SQL server instance, without any server/virtual name, the default instance will be MSSQLSERVER.
-The SA password must meet strong password requirements
-The SAPWD parameter is required if the instance it to use mixed mode authentication.
-The SQLCOLLATION parameter must be set to a correct SQL Collation: http://msdn.microsoft.com/en-us/library/ms180175.aspx 

Step 5: Apply the required service packs & cumulative updates to bring SQL server back to the correct patch level.

You can also simply change the database collation settings for individual databases, this is sometimes suitable rather than changing the default server collation for the entire SQL server.

Troubleshooting:
If you run the command from “C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\SQLServer2008R2\” and experience the following error when rebuilding the system databases in SQL 2008R2 “Exception has been thrown by the target of an invocation”, the work around is to run the command using the setup.exe which exists on the local media (installation disc).

Jason Vigus

Mac OSX Tips: launch VNC from terminal

OSX has a VNC tool built in called Screen Sharing, this lets you access other machines running a VNC server.

You can use the GUI but I’ve found the best way to is simply to launch it via terminal (while connecting to a VNC server), here are some examples:

open vnc://www.myserver.com
open vnc://192.168.111.145
open vnc://mylocalserver.com

Safari supports these urls as bookmarks for easy VNC url management or you can use something like quicksilver for quick key stroke launching of VNC sessions.

Jason Vigus

Basic Foundry ServerIron Load Balancer Commands

All of these commands are show commands, I use them regularly on Foundry ServerIron XL & 4G models. It is worth noting the commands that utilise | inc will not work on the ServerIron XL model.

Display running config:
show run

Display all bound VIPs on the Load Balancer:
show server bind

Search and display VIP information:
show server bind | inc <searchstring>
You will want to replace the <searchstring> with any information that you have that will help you find the VIP. Such as VIP IP, VIP name, real IP, etc.

Provides the full VIP configuration. (you will also be able to check here if reals are failing):
show server bind vip.name

Http information for the real. (you will be able to see here if the load balancer is able to hit the health check on the server, too see if something is failing) :
show server real http real.name

Check VIP Configuration:
show run virtual vip.name.com

Check real’s configuration:
show run real real.name.com

Show all real sessions on the load balancer:
show server sessions

Searches for session information:
show server sessions | inc <searchstring>

Display the total and concurrent connections for a specific VIP:
show server virtual vip.name.com

Jason Vigus

Casio Exilim EX-S770 charging problem (& 9v battery fix)

After 6 months without use (or charging), unsurprisingly our Casio EX-S770 digital camera had a completely flat battery & wouldn’t power on, what I didn’t expect (but probably should have thought about) was for it to refuse to charge because it was so discharged – the dock’s red charging light would simply “blink” at me when the camera was docked.

Turns out there is a fairly simple work around to this, you just need to get a tiny bit of power into the battery to kick-start the charge, to do this I simply grabbed a 9v (square) battery, connected the camera’s positive terminal with the positive on the 9v, the negative to the negative, let it transfer power for about 45 seconds & when the camera was docked again the solid red charging light returned, a few hours later the camera was fully charged and working as if nothing had ever happened.

I thought I’d share this here just incase anyone else has the same issue and wants to give this a go before shelling out for a brand new battery, good luck!

Jason Vigus

Iomega Storecentre IX2-200 – enable SSH access (how to guide)

If you were wondering how to enable SSH access on your shinny new Iomega Storecentre IX2-200, despite the limited amount of information available online explaining how to do this (& a few misleading websites that go through an unnecessary process of removing the drive & attaching it to a computer to edit the files to gain SSH access) it’s actually quiet easy by following these simple steps:

1. First login to the IX2-200 via the normal admin page.
2. Next browse to https://The_NAS_IP/support.html
3. Click “Support Access”
4. Check the box next to “Allow remote access for support (SSH and SFTP)”

IX2-200 Enable SSH

IX2-200 Enable SSH

Now you have enabled SSH you can connect via SSH. You’ll need to use user “root”, if you use Linux already you’ll be thinking 😉

The password for “root” is soho and your normal admin user password for the web interface. So for example if your password is “Vigus1” then the root password will be “sohoVigus1”

Now remember while your enjoying your SSH access, support mode is still enabled. To continue enjoying SSH access with support mode switched off you will need to make a few more changes:

1. SSH to your IX2-200 and type the following to change the write permissions on the file sshd (start script for the ssh daemon):
cd /etc/init.d/
chmod u+w sshd
pico sshd

2. Next we need to make some changes to the sshd file:
vi sshd

3. Remove the four # (comments) from the following lines:
Note: If this is the first time you’ve used vi before just be careful (cheat sheet here), use the arrow keys to scroll around, use x to delete the character to the right of the curser & this sequence to exit saving changes:

escape
😡
return key 

before:

start() {
        echo -n "Starting sshd: "
        # /usr/sbin/sshd
        # touch /var/lock/sshd
        echo "OK"
}
stop() {
        echo -n "Stopping sshd: "
        # killall       sshd
        # rm -f /var/lock/sshd
        echo "OK"

after:

start() {
        echo -n "Starting sshd: "
         /usr/sbin/sshd
         touch /var/lock/sshd
        echo "OK"
}
stop() {
        echo -n "Stopping sshd: "
         killall       sshd
         rm -f /var/lock/sshd
        echo "OK"

Now go back into the web interface and disable the support mode. SSH should start automatically each time the NAS starts up. To test reboot your NAS via the power button or if you still have SSH open use the Debian (yes Debian, thats what it runs!) reboot command:

shutdown -r now

Now crack open a can of Stongbow as its your Bowtime! 🙂

Get yours on Amazon here:

Jason Vigus