Add custom attributes from Script Tag

aespinosa
New Member
3 0 0

Hi! I'm trying to add custom attributes to orders through query params in the url. For example, I want to know the client's username in the app from where I redirected them.

I tried creating a script tag that takes the query param and adds it to the cart as an attribute using the Ajax API. The problem is that if the client clicks the "Buy it now" button instead of using the cart, my approach doesn't work. Does anyone know any other way of achieving this?

0 Likes