Your post is great help.
It looks we let Google know about every sales on our web site. How can we accomplish to run this snippets only when the customer really comes from Google ads? Probably we need to check some values in cookies. What cookies Google use?
By the way, I would create two different .tpl file for your two snippets as they can be used many times in different pages.
and would call them like this:
<include file="file1.tpl" conversion="1">
<include file="file2.tpl" type="Purchase"> whereever I need
change in file1.tpl
var google_conversion_format = "$conversion";
change in file2.tpl