Skip to main content
Contributor I
July 6, 2021
Solved

Using Klaviyo on http site

  • July 6, 2021
  • 2 replies
  • 1072 views

Hello,

anyone know how to use Klaviyo on a http site? Klaviyo is added to the site, but an error is thrown:

“Access to XMLHttpRequest at 'http://a.klaviyo.com/api/onsite/identify?c=xxxxx' from origin 'http://xxx.xxx.xx' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.”

It only works if the site has https.

Cheers,

Danny

    This topic has been closed for replies.
    Best answer by David To

    Hello @DannyDan,

    Thanks for sharing your question with the Klaviyo Community!

    If you were trying to integrate and connect Klaviyo with an HTTP site, Klaviyo does support doing so. 

    Regarding your CORS policy error, I would recommend taking a look at some Community threads along the same subject, notably one answered by @jallain which i’ve included below:

    I hope this helps!

    David

    2 replies

    David To
    Klaviyo Employee
    David ToAnswer
    Klaviyo Employee
    July 6, 2021

    Hello @DannyDan,

    Thanks for sharing your question with the Klaviyo Community!

    If you were trying to integrate and connect Klaviyo with an HTTP site, Klaviyo does support doing so. 

    Regarding your CORS policy error, I would recommend taking a look at some Community threads along the same subject, notably one answered by @jallain which i’ve included below:

    I hope this helps!

    David

    DannyDanAuthor
    Contributor I
    July 6, 2021

    Thanks david for your answer.

    But unfortunately I already found them and wasnt satisfied with the answer. It would be nice if some kind of development mode could be enabled to just be able to use it on a local machine without https.

    I think my best option is to get my local shop running on https. :)

    Chers,

    Danny