matomo-org / matomo-nodejs-tracker

A Node.js wrapper for the Matomo (Piwik) tracking HTTP API
MIT License
117 stars 42 forks source link

CORS problem with this module and cloud version #46

Open manelet opened 6 years ago

manelet commented 6 years ago

Hi there!

We're trying the beta of your cloud version;

Our innocraft url is: apartum.innocraft.cloud

We're using matomo-tracker

And the problem is that each request to Matomo servers return with this error:

No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'xxxx' is therefore not allowed access. If an opaque response serves your needs, set the request's mode to 'no-cors' to fetch the resource with CORS disabled.

Sessions looks like are being tracked, but we're afraid of possible colateral problems due to this error.

How can we change this?

I've read this: https://matomo.org/faq/how-to/faq_18694/

But as this is a cloud version, we don't have any access to config.ini.php

Any help please?

Thanks in advance!

Findus23 commented 6 years ago

I'll look into the issue later. Until then, can you please provide more details on how you use the library? Technically the tracker is only intended for use in NodeJS. Are you using it in the browser?

What do you mean by "We're trying the beta of your cloud version"?

manelet commented 6 years ago

It's a react application server-side rendered

What do you mean by "We're trying the beta of your cloud version"?

I meant trial, my bad.

samermurad commented 3 years ago

@manelet The cloud version has this option in the app settings, it works for the trial version as well (had the same problem today) once you create a trial account you get an email with your creds to the dashboard, once in the dashboard, click on the settings (cogwheel upper right), and then go to System -> General settings, the third section there will be the CORS domains... just add the domain you need without suffix slashes so sub.domain.com