Created
June 3, 2018 16:19
-
-
Save prsanjay/6d8f6fd407721a7438e2cd6a08571e59 to your computer and use it in GitHub Desktop.
Customize Ahoy tracking method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Ahoy::Store < Ahoy::DatabaseStore | |
def track_visit(data) | |
data[:accept_language] = request.headers["Accept-Language"] | |
super(data) | |
end | |
def track_event(data) | |
data[:properties] = { key: 'value' } | |
super(data) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment