so assuming you are going to build a upsell / crossell app, and assume you like to tag the item that the user added to cart using your app generated “add to cart” element.
to do that please use product “properties” (more here -https://shopify.dev/docs/api/ajax/reference/cart#post-locale-cart-add-js) with some unique text. so when someone add to cart item from your app suggested, then the property will be there, after fullfill the order, you can track that.