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

Add return of event in track method #569

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add return of event in track method #569

wants to merge 1 commit into from

Conversation

woto
Copy link

@woto woto commented Feb 12, 2025

Hi, we need get access to the created event. What do you think if there

begin
event.save!

will be instead?

        begin
          event.save!
          event

or at least to assign last tracked event somewhere to avoid making request to the DB.

@ankane
Copy link
Owner

ankane commented Feb 12, 2025

Hi @woto, thanks for the PR. Can you share more about your use case?

@woto
Copy link
Author

woto commented Feb 13, 2025

@ankane Sure, we want to send info about ahoy event (at least id) to external tracking/metrics systems.

By the second option of getting access to the event, I meant something like this:

        tracker.track('event', {})
        ahoy_visit = tracker.visit
        ahoy_event = tracker.event

like it is done for the tracker.visit.

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

Successfully merging this pull request may close these issues.

2 participants