Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow specifying global context #22

Open
aldesantis opened this issue Mar 4, 2021 · 0 comments
Open

Allow specifying global context #22

aldesantis opened this issue Mar 4, 2021 · 0 comments

Comments

@aldesantis
Copy link
Member

aldesantis commented Mar 4, 2021

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.

@aldesantis aldesantis changed the title Allow specify global context (e.g., IP address) Allow specifying global context Mar 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant