Skip to content

Custom events not working #4

@paymog

Description

@paymog

I've successfully installed Segment using this tool which is amazing - I'm seeing page views appear in the Segment debugger.

However, when I try to perform event tracking the events never appear in the Segment debugger. I've verified that there are no problems in the console but I'm not sure how to continue debugging.

Here's how I'm firing the custom event

export const emitMetric = (category, action, label) => {
  analytics.default.track(category, {
    action: action,
    label: label,
  })
};

this function is called from various parts of my codebase. I've verified with the chrome debugger that these lines of code are hit during navigation of the website. Even still, I don't see the events appear in the Segment debugger.

I've verified that the debugger has all event types filtered too.

image

@anishmprasad any chance you know why I might not be getting events here? Could it be a problem with the package or how I'm using it?

EDIT: and here's the chrome debugger successfully hitting the function with string values

image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions