App To Autofill Additional Scripts Section

Shopify Partner
2 0 4

I've been assigned to write/deploy an app that will plug in our tag into our clients' add'l scripts section to render on the thank-you page. Ex:

<iframe frameborder="0" scrolling="no" src="{{shop.currency }}&OID={{ order_number }}&{% for line_item in line_items%}&ITEM{{ forloop.index }}={{ line_item.sku }}&AMT{{ forloop.index }}={{line_item.price | money_without_currency }}&QTY{{ forloop.index }}={{line_item.quantity }}{% endfor %}&{% for discount in discounts%}DISCOUNT={{ discount.amount | money_without_currency }}&COUPON={{discount.title }}{% endfor %}" height="1"width="20" /> </iframe>

The 'XXXXXX' values are identifiers for us to recognize the advertiser.  We had instructions for them to copy and paste this but having an app do it has been requested (and assigned to me).  

The app will most likely prompt them to enter the XXXXXX values into a form field which will generate their tag (above) and put it into the add'l scripts.  Is there a way I can get this info to that field?  Right now, I'm doing an .append('body') and I believe it's going to be to clunky and slow to render on every machine correctly (resulting in lost tracking for us).

Any suggestions/thoughts are appreciated!  

Shopify Partner
4 0 1

Hey there,


I have the same problem as you. Did you find any solution at the time ? 

I need to have a script on the thank you page that will need some variables of the order. 


Let me know if you manage to find a solution. 


Thanks in advance