How to add Google Adwords Conversion Tracker code in ExpressionEngine

This is how you can add Google Adwords Conversion Tracker script in ExpressionEngine. First look up where your footer.php is placed in the filesystem. In my case it was ee_companyname/templates/_includes/footer.php

In the file you have to add a condition based on the URI. In ExpressionEngine you have a special kind of script and not regular PHP as you can see below. Segments of the path is stored in the variables like segement_[n]. In my case the condition was that the first part of the path should be tilaa-netin-kautta/kiitos to execute the conversion script.

{if segment_1=="tilaa-netin-kautta" && segment_2=="kiitos"}
script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = [your id code of digits];
google_conversion_language = "fi";
google_conversion_format = "2";
google_conversion_color = "ffffff";
google_conversion_label = "[your label code]";
google_conversion_value = 0;
    if (
5,00) {
google_conversion_value = 5,00;
/* ]]> */
    <script type="text/javascript" src="<a href="">
</a>    </script>
    <div style="display:inline;">
    <img height="1" width="1" style="border-style:none;" alt="" src="<a href="[your">[your</a> id code of digits]/?value=5,00&amp;label=[your label code]&amp;guid=ON&amp;script=0"/>
Knowledge keywords: