roman-kudinov1 / swiss-attorneys-online

3 stars 0 forks source link

Google AdWords: track purchases #20

Closed daniel-gato closed 7 years ago

daniel-gato commented 7 years ago

We need to add this code to the <body> of the page showing just after a purchase. This will help us to calculate our CPA in GG Adwords

<!-- Google Code for Conversion purchase Conversion Page -->
<script type="text/javascript">
/* <![CDATA[ */
var google_conversion_id = 847798161;
var google_conversion_language = "en";
var google_conversion_format = "3";
var google_conversion_color = "ffffff";
var google_conversion_label = "23oiCJ6RpnMQkb-hlAM";
var google_conversion_value = 0.00;
var google_conversion_currency = "CHF";
var google_remarketing_only = false;
/* ]]> */
</script>
<script type="text/javascript" src="//www.googleadservices.com/pagead/conversion.js">
</script>
<noscript>
<div style="display:inline;">
<img height="1" width="1" style="border-style:none;" alt="" src="//www.googleadservices.com/pagead/conversion/847798161/?value=0.00&amp;currency_code=CHF&amp;label=23oiCJ6RpnMQkb-hlAM&amp;guid=ON&amp;script=0"/>
</div>
</noscript>

Be aware of the variable var google_conversion_value = 0.00; which as to be set to the transaction price.

daniel-gato commented 7 years ago

For debug, you can use https://chrome.google.com/webstore/detail/tag-assistant-by-google/kejbdjndbnbjgmefkgdddjlbokphdefk

bogoslavskiy commented 7 years ago

I need to know what endpoint after purchase. On what URL redirects the payment system, after purchase. Ask this question to the programmer who introduced the payments.

bogoslavskiy commented 7 years ago

Done.

daniel-gato commented 7 years ago

Good

daniel-gato commented 7 years ago

Good