Our Shopify app includes two custom JavaScript codes: first to capture and store Google click ID (gclid) if present in URL (if visitor comes from Google Adwords ad) and second one to send this gclid to our API in order to bind it to order for performance statistics. We achieved this by ScripTags, but recently we were notified that ScripTags are old and should be replaced with App Embeded Blocks (https://shopify.dev/apps/online-store/theme-app-extensions/extensions-framework#app-embed-blocks). We can use App Embeded block for the first script (to store gclid in cookie), but those blocks do not work in checkout pages. We were trying to use Post Purchase Checkout Extensions (https://shopify.dev/apps/checkout/post-purchase), but it looks like this options does not allow us to include custom script, only DOM elements, available from "
@Shopify_77 /post-purchase-ui-extensions-react".
So the question is how can we pick up stored gclid from cookie, get order ID and send it to our API on final page of checkout.