Quantcast
Channel: Opinion: Shopify Community - Shopify APIs & SDKs
Viewing all articles
Browse latest Browse all 25503

Access transaction attributes on confirmation page via an app using ScriptTag by Allan Gourdie

$
0
0

I am trying to build an affiliate network app to allow a 1 click install of our tracking software.  I've got our tracking working by manually editing my template to add javascript and also manually added the following text within Admin -> Settings -> Checkout -> Order Processing section, "Additional content & scripts" box

<script> var data = ["{{ order_number }}", "{{ total_price | money_without_currency }}", "{{ shop.currency }}"];</script>
<script src="//s3-eu-west-1.amazonaws.com/...script.js" async defer></script>

I've read up on ScriptTag and that seems like the best way for my app to inject the Javascript.

But how can my ScriptTag code get access to {{ order_number }} etc without making each app installer paste the code above into their admin panel?

I saw an older post stating that the API doesn't let you update that area http://ecommerce.shopify.com/c/shopify-apps/t/is-there-api-access-to-additional-content-scripts-46077


Viewing all articles
Browse latest Browse all 25503

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>