In many cases, it's useful to send some global context along with an event, such as the request's IP or user agent.
This is usually done via a before_action in a controller, e.g.:
before_action :set_tracking_context
def set_tracking_context
SolidusTracking.set_context(user_ip: request.remote_ip)
end
We should support this to allow for integrating additional plugins, such as Segment.
In many cases, it's useful to send some global context along with an event, such as the request's IP or user agent.
This is usually done via a
before_actionin a controller, e.g.:We should support this to allow for integrating additional plugins, such as Segment.