drupal 7: include javascript with rules I have: drupal 7 - php module enabled - rules module enabled

On one of my rules I have the action: custom php code

when I enter &lt;?php echo 'test code'; ?&gt; it correctly shows the text

I want to include javascript, I've attempted:

&lt;?php
    drupal_add_js('var google_conversion_id = 1003933475; var google_conversion_language = "en"; var google_conversion_format = "3"; var google_conversion_color = "ffffff"; var google_conversion_label = "IC5cCMXVqwcQo57b3gM"; var google_conversion_value = 0;', 'inline');
    drupal_add_js('http://www.googleadservices.com/pagead/conversion.js', 'external');
?&gt;


and

&lt;?php 
echo '&lt;script src="http://www.googleadservices.com/pagead/conversion.js"&gt; &lt;/script&gt;';
?&gt;


but when I view the source, there's nothing included. It's somehow stripped out or something. 

What am I doing wrong? Is there a better approach? 

Thanks for your advice
You can use hook init to check for the path and add JavaScript in custom module.

&lt;?php

function yourmodule_init() {
  if (arg(0) == "checkout" &amp;&amp; arg(2) == "complete" &amp;&amp; is_numeric(arg(1))) {
    drupal_add_js('var google_conversion_id = 1003933475; var google_conversion_language = "en"; var google_conversion_format = "3"; var google_conversion_color = "ffffff"; var google_conversion_label = "IC5cCMXVqwcQo57b3gM"; var google_conversion_value = 0;', 'inline');
    drupal_add_js('http://www.googleadservices.com/pagead/conversion.js', 'external');
  }
}

?&gt;


OR

You can edit template.php and add below code.

function yourtheme_preprocess_page(&amp;$variables) {
     if (arg(0) == "checkout" &amp;&amp; arg(2) == "complete" &amp;&amp; is_numeric(arg(1))) {
        drupal_add_js('var google_conversion_id = 1003933475; var google_conversion_language = "en"; var google_conversion_format = "3"; var google_conversion_color = "ffffff"; var google_conversion_label = "IC5cCMXVqwcQo57b3gM"; var google_conversion_value = 0;', 'inline');
        drupal_add_js('http://www.googleadservices.com/pagead/conversion.js', 'external');
      }

}