Add Dynamic Script to Order Completed Page using Shopify App

Add Dynamic Script to Order Completed Page using Shopify App

rockstar08
Shopify Partner
5 0 0

Hello,

How can I add Dynamic Script tags to Shopify order completed page.. 

I have a script url which has the script, and another inline script tag, which calls the function with the order id, amount etc, to trigger the function..

 

Example code, I need to run after order complete 

<script src="script.js"> // sendapi is in this file

<script>sendapi(orderid,amount)</script>

 

I am using Shopify php api.. I am able to add script tags urls, but how to do the dynamic part of it.. what would be the best approach.. pls suggest 

Replies 0 (0)