How to get rid of "has been blocked by CORS policy:" in console

SOLVE
Highlighted
New Contributor

Hi

 

My website is giving the following error when Hubspot is linked to it:

 

Access to XMLHttpRequest at 'https://t.hs-growth-metrics.com/reporting/v1/tracking/forms/view/tracking.gif?event=%7B%22portalId%2...' from origin 'https://www.xpedition.fi' has been blocked by CORS policy: Response to preflight request doesn't pass access control check: No 'Access-Control-Allow-Origin' header is present on the requested resource.

 

I found some discussions about how you need to setup a proxy server. But since I don't have technical knowledge to do that, what do I need to disable to get rid of that error?

 

Thanks!

 

Reply
0 Upvotes
1 Accepted solution

Accepted Solutions
New Contributor

Hi!

 

Sorry for late reply - I think the problem was solved by enabling the cross-domain tracking in the Hubspot settings page. I don't get the error anymore.

 

Reply
0 Upvotes
3 Replies 3
HubSpot Product Team

Hyvää iltaa, @vekman

 

Could you tell me a bit more about what you mean by "when HubSpot is linked to it?" I can see that the tracking code for your portal is installed and firing on your website, and I'm not seeing that error message currently, so I want to make sure we get on the same page. 

 

I suspect that there's a much simpler solution than setting up a proxy server, so just let me know about the above question and we'll go from there. 

 

All the best,

Blake

 

Reply
0 Upvotes
New Contributor

Hi!

 

Sorry for late reply - I think the problem was solved by enabling the cross-domain tracking in the Hubspot settings page. I don't get the error anymore.

 

Reply
0 Upvotes
HubSpot Product Team

I'm very glad to hear! Thank you for the update. 

Have a great day. 

Reply
0 Upvotes