-
Notifications
You must be signed in to change notification settings - Fork 215
CORS - Shopify Customer Events #278
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Setup Context: Using Docker on a hetzner instance With my own nginx infront with the config: # API requests
location /api/ {
proxy_pass http://localhost:8080/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
# Client app
location / {
proxy_pass http://localhost:8081;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
} |
Noticed the Cors server is setup in Lines 75 to 84 in a99e7a2
I realize it would hurt performance to do a check with each site every request, albeit could be mitigated with some caching Though it would greatly improve the usability + setup of new sites without the requirement of a domain. In Theory the CORS part is the only thing thats causing these Domain requirements. Opening up the CORS would also allow for server side tracking for applications that want to use Rybbit for that type of analytics, like Apps |
I will look into this. |
That specifically broke me. If a site is registered as www.site.com in the UI, why would we trim it? That's what hit me. I had to rename my site in rybbit to site.com rather than www.site.com I'd say that users that wish to have the "normalized" version could simply strip the www in the admin panel. I explicitly prefer to have different sites, a.foo.com, b.foo.com, c.foo.com each of which has their own site registration. |
@WebKenth why would you track ur local environment... |
@WebKenth 's proposal of having a per-site CORS list makes sense to me. It would allow us to make a site name purely a human readable label, and let a CORS list be the source of truth for which domains are meant to by tracked on a per-property basis. Additionally, it may allow non-standard ports to also function with CORS, in case someone is doing https on a non-443 port, too. There may be situations where an automation-driven browser integration test would need to be tracked on custom domains. Or when you use A/B domains for prod experiments. etc. The problem right now is that the concept of a site is explicitly tied to a single domain, and we currently even break "www.site.com" by normalizing it to site.com. |
Greetings!
I am attempting to create a Shopify Customer Event Pixel but i am running into CORS Issues and i don't really understand why there's CORS involved, perhaps we can get some clarifications surrounding how tracking is actually handled.
I'ved created a site without www. but my site had www. i can see #148 and #172 both mentions something about having www. or not

I'ved tried creating a new site without www. but same result as below:
The script loads without issue but then the first event triggers and breaks due to CORS


If i use the script in the theme files there are no issues
Side note: It seems the script is attempting to push an event with the event name as blank, with a type of "page_view" even though
data-track-spa
is false? is this expected or a bugHere's the full script if you want to debug it, though i breaks :
The text was updated successfully, but these errors were encountered: