Closed smadeja closed 6 years ago
@bumi Would you like me to make some more changes?
I personally don't like the use of a constant in the facebook handler. Since constants are hard to mock etc... I would prefer something like a hook method on the top handler class. If we do it on the class level it would also become more macro/dsl like.
But maybe this is something we can refactor later... and go with this solution for now...
nice! looks great! thanks again for the contribution.
@DonSchado I actually agree. also it would then be similar to the self.position=
call.
But that's also used in the other PR for the google stuff (https://github.com/railslove/rack-tracker/pull/97/files#diff-8c96bad81146eddcac1965e5645e68f3R2)
@smadeja what do you think?
we could do that the same way as: https://github.com/railslove/rack-tracker/blob/master/lib/rack/tracker/handler.rb#L13-L14
should actually be simple to replace, and I think it is more consistent then.
The constant is dead. ;-)
awesome! let's merge! @DonSchado you're last chance to comment.
💚
Finally this is included in the last release 1.6.0
, sorry that it took so long :/
Sweet, thanks!
This allows the Facebook Pixel id (as well as other tracker options) to be dynamic, and change on a per-request basis. It's based on some other trackers that offer this functionality (
:user_id
on the Google Analytics one, for example).