Unable to track conversions from Buy It Now checkout in Back-in-Stock app

Hi everyone,

I’m currently working on building a Back-in-Stock–type app for Shopify. I’m still fairly new to development, but I’ve already managed to publish one app, and now I’m trying to improve my next one.

Right now my app sends WhatsApp notifications with a product link. When users open the store through that link, I update the cart attributes so I can later track whether the purchase came from our notification.

Here’s where I’m stuck:

If customers follow the normal flow (add to cart → checkout), everything works fine and I can read the cart attributes and track the conversion.

But when a customer clicks Buy It Now on the product page, they go straight to checkout and in this case the cart attributes don’t seem to carry over, so I can’t track the purchase.

I’ve been trying to debug this for about a week now and I’m not sure if this is expected behavior with dynamic checkout buttons or if I’m missing something.

I’d really appreciate any advice on:

whether this is the normal Shopify behavior for Buy It Now flows, and

if there’s a safer or more reliable way to track conversions instead of relying on cart attributes set when users enter through our link.