I need to install some tracking pixel code for one of my checkout systems. This is the sample code for calling the tracking pixel <script src="https://xxxxxx.com/i_third_sale/xxxxxx/406/ORDER_AMOUNT/ORDER_NUMBER/EMAIL_ADDRESS"></script> <noscript><IMG SRC="https://xxxxxx.com/i_sale/xxxxxx/406/ORDER_AMOUNT/ORDER_NUMBER/EMAIL_ADDRESS"></noscript> HTML: Now my question is that I would like to dynamically create the data that needs to be in these URL's using PHP. Can I do a <script src="$script_src"></script>... I know PHP doesnt tend to play well with javascripts sometimes so I'm just wondering if this concept will even work. Thanks.
Ok this actually turned out to be super simple... Here is the following code which works as needed. $script_src = "https://xxxxxx.com/i_third_sale/xxxxxx/406/ORDER_AMOUNT/ORDER_NUMBER/EMAIL_ADDRESS"; echo <<<html <script src="$script_src"></script> html; PHP: