charlotte-ruby / impressionist

Rails Plugin that tracks impressions and page views
MIT License
1.54k stars 313 forks source link

Empty Values Tracking Model #261

Open Hamdan85 opened 6 years ago

Hamdan85 commented 6 years ago

Im tracking a model in my controller by using

impressionist(@real_estate)

but the record created misses some important parameters:

{
                     "id" => 10,
    "impressionable_type" => "RealEstate",
      "impressionable_id" => 16,
                "user_id" => 2,
        "controller_name" => "real_estates",
            "action_name" => "show",
              "view_name" => nil,
           "request_hash" => "062c569989572ee3eb3512ca82953e7c228e13bcebfc483e8a6c9db6100eb510",
             "ip_address" => "127.0.0.1",
           "session_hash" => "7550b8587fea4c2de8f155c077da0b71",
                "message" => nil,
               "referrer" => nil,
                 "params" => {},
             "created_at" => Fri, 17 Nov 2017 02:03:13 -02 -02:00,
             "updated_at" => Fri, 17 Nov 2017 02:03:13 -02 -02:00
}

How can i guarantee that Ill have the referer and params logged correctly? Am I missing something?