                 return true;
             }
             
-            if( referrer.indexOf("://") > -1 )
-            {
-                var url:URL = new URL( referrer );
-                
-                if( (url.protocol == Protocols.file) ||
-                    (url.protocol == Protocols.none) )
-                    {
+            var url:uri = new uri( referrer );
+            
+            if( (url.scheme == "file") ||
+                (url.scheme == "") )
+            {
+                return true;
+            }
+            
+            return false;
+        }
+        
+        /**
+         * Checks if the document referrer is from the google custom search engine.
+         * @private
+         * @return <code class="prettyprint">true</code> if the referrer is from google custom search engine.
+         */
+        public static function isFromGoogleCSE( referrer:String, config:Configuration ):Boolean
+        {
+            var url:uri = new uri( referrer );
+            
+            if( url.host.indexOf( config.google ) > -1 )
+            {
+                if( (url.path == "/"+config.googleCsePath ) &&
+                    (url.query.indexOf( config.googleSearchParam+"=" ) > -1) )
+                {
                     return true;
-                    }
-            }
-            
-            return false;
-        }
-        
-        /**
-         * Checks if the document referrer is from the google custom search engine.
-         * @private
-         * @return <code class="prettyprint">true</code> if the referrer is from google custom search engine.
-         */
-        public static function isFromGoogleCSE( referrer:String, config:Configuration ):Boolean
-        {
-            var url:URL = new URL( referrer );
-            
-            // verify that the referrer is google cse search query.
-            if( url.hostName.indexOf( config.google ) > -1 )
-            {
-                if( url.search.indexOf( config.googleSearchParam+"=" ) > -1 )
-                {
-                    // check if this is google custom search engine.
-                    if( url.path == "/"+config.googleCsePath )
-                    {
-                        return true;
-                    }
                 }
             }
             

            }
            
            // get host name from referrer
            var ref:URL = new URL( _referrer );
            var hostname:String = ref.hostName;
            var content:String  = ref.path;
            
            if( hostname.indexOf( "www." ) == 0 )
            {

                var currentOrganicSource:OrganicReferrer = _config.organic.getReferrerByName( name );
                
                // extract keyword value from query string
                var keyword:String = _config.organic.getKeywordValue( currentOrganicSource, ref.query );
                
                camp = new CampaignTracker();
                camp.source = currentOrganicSource.engine;
