Skip to content

this.$matomo doesn't load when refreshing page manually #119

@nickeblewis

Description

@nickeblewis

We've been having an intermittent issue when using vue-matomo and Nuxt together. Sometimes when refreshing a page, Matomo doesn't load correctly, whereas when routing via the site's navigation, it is fine. So when trying to use this.$matomo we get "id" is undefined, simply because the plugin hasn't loaded at that point.

We've tied instantiating it in different places, mounted(), beforeUpdated() etc but the problem still happens if the user chooses to refresh the page manually.

One option we've thought of, is to implement a timeout but there must be a better way. Please advise. Thanks!

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