def _supply_model_hook

      # 3.2.1 -> adwords auto-tagging - (show hint to manual tag adwords):
      #  ?gclid=xxxx   
      # 3.2.2 -> manual tagging 
      #  ?utm_source=google&utm_medium=cpc&utm_term=my_keyword&utm_campaign=my_summerdeal  
      # 3.2.3 -> manual url-tagging specific for piwik 
      #  ?pk_campaign=my_summerdeal&pk_kwd=my_keyword  
      # cookie / session persisted:
      # e.g.: "req=http://foo/baz?utm_campaign=plonk|ref=http://google.com/search|count=0"
      
      tmp = session[:__reqref]
      _struct = nil
      if tmp
        arr = tmp.split('|')
        _struct = OpenStruct.new(
                    request_url: arr[0].split('=',2)[1],
                    referrer_url: minlength_or_nil(arr[1].split('=',2)[1]),
                    visit_count: arr[2].split('=',2)[1].to_i
                    )
      end

      ActiveRecord::Base.send(
                              :define_method, 
                              '_get_reqref', 
                              proc{ _struct }   
                             )
    end
def _supply_model_hook

      # 3.2.1 -> adwords auto-tagging - (show hint to manual tag adwords):
      #  ?gclid=xxxx   
      # 3.2.2 -> manual tagging 
      #  ?utm_source=google&utm_medium=cpc&utm_term=my_keyword&utm_campaign=my_summerdeal  
      # 3.2.3 -> manual url-tagging specific for piwik 
      #  ?pk_campaign=my_summerdeal&pk_kwd=my_keyword  
      # cookie / session persisted:
      # e.g.: "req=http://foo/baz?utm_campaign=plonk|ref=http://google.com/search|count=0"
      
      tmp = session[:__reqref]
      _struct = nil
      if tmp
        arr = tmp.split('|')
        _struct = OpenStruct.new(
                    request_url: arr[0].split('=',2)[1],
                    referrer_url: minlength_or_nil(arr[1].split('=',2)[1]),
                    visit_count: arr[2].split('=',2)[1].to_i
                    )
      end

      ActiveRecord::Base.send(
                              :define_method, 
                              '_get_reqref', 
                              proc{ _struct }   
                             )
    end
The before_filter which processes necessary data for
 +acts_as_referred+ - models