Skip to content

Support to track custom events #111

Description

@dana-c0914

Matomo has support to create triggers of 'Custom event' type, which would work as the following:

Triggered when a custom event is pushed to the Data-Layer. Allows developers to define manually when this trigger should be triggered by pushing an event to the Data-Layer. This way you can for example execute certain actions when a product is added to the cart, or when a user logs in.

One can normally do this by accessing the mtm object attached to the window and push an event:
window['_mtm'].push({ event: 'myCustomEvent' });

What I am wondering is if there is any way to do this via the library, to avoid working with the low level objects.

Thanks in advance for any information.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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