Skip to content

feature: Allow extra properties per tracking handler#84

Open
pedrocarmona wants to merge 1 commit into
ankane:masterfrom
pedrocarmona:feature/extra-properties-per-event-handler
Open

feature: Allow extra properties per tracking handler#84
pedrocarmona wants to merge 1 commit into
ankane:masterfrom
pedrocarmona:feature/extra-properties-per-event-handler

Conversation

@pedrocarmona

Copy link
Copy Markdown

Hi @ankane,

Yet another way to allow custom properties on events.

Usage:

import "ahoy"

function otherEventProperties(element, event) {
  return {
    test: "here"
  };
}

ahoy.trackClicks("a, button", otherEventProperties);

Notice:
Internal functions of ahoy are not exposed, so not possible to use getClosest(), page(), presence(), etc.

@pedrocarmona

Copy link
Copy Markdown
Author

Could also remove visitParams and have a default hook for $view...

@bborn

bborn commented Dec 18, 2024

Copy link
Copy Markdown

👍 on this. @ankane any thoughts on merging this in?

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