We have third party tracking pixels that we have to include. These tracking pixels are on all pages but have various values that depend on contents either within the page, or the environment itself (staging vs production).
So far I have been unable to make this work. I filed a bug but I’m not sure it’s going to be solved at all/ in time for when we need to launch. Does anyone know how to work around this?
For example, we have a Twitter tracking pixel. I’ve included it in the index.stache file. I tried moving the twttr.conversion.trackPid call to the app.js file but encountered a race condition. How do I do this properly?
<script src="//platform.twitter.com/oct.js" type="text/javascript"></script>
<script type="text/javascript">
twttr.conversion.trackPid({{id}}, {
tw_sale_amount: {{saleAmount}},
tw_order_quantity: {{orderQuantity}}
});
</script>