Page 1 of 1

AdWords coversion tracking code

Posted: Wed Sep 05, 2012 6:53 am
by kuleszko
Hi, I can't find information where i have to paste adwords conversion tracking code. I think about to paste it in catalog/viev/theme/deaful/template/common/succes.tlp page( or maybe in differente location ) and dont have idea in which line or maybe at the end .I like to have information about amout of sale for each transaction. I have no idea about htlm so thats why I asking.
Thanks for any help.
Cris

Re: AdWords coversion tracking code

Posted: Thu Sep 06, 2012 4:52 am
by Avvici
The absolute best place to paste that javascript is on the success template. However the sucess template is used by more than one procedure. Simply make a copy of this file: catalog/view/theme/default/template/common/success.tpl and rename it to something like success_order.tpl.

Now open catalog/controller/checkout/success.php and find this code:

Code: Select all

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/success.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/common/success.tpl';
		} else {
			$this->template = 'default/template/common/success.tpl';
		}
Replace that with this:

Code: Select all

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/common/success_order.tpl')) {
			$this->template = $this->config->get('config_template') . '/template/common/success_order.tpl';
		} else {
			$this->template = 'default/template/common/success_order.tpl';
		}
Now go to the success_order.tpl and insert your google code and upload everything.

Re: AdWords coversion tracking code

Posted: Fri Sep 07, 2012 1:56 am
by kuleszko
Thanks, but where to paste the code at the end or between some tags?
Thanks

Re: AdWords coversion tracking code

Posted: Fri Sep 07, 2012 4:42 am
by kuleszko
My succes.tpl looks like this



<?php echo $header; ?><?php echo $column_left; ?><?php echo $column_right; ?>

<div id="content"><?php echo $content_top; ?>

<div class="breadcrumb">

<?php foreach ($breadcrumbs as $breadcrumb) { ?>

<?php echo $breadcrumb['separator']; ?><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a>

<?php } ?>

</div>

<h1><?php echo $heading_title; ?></h1>

<?php echo $text_message; ?>

<div class="buttons">

<div class="right"><a href="<?php echo $continue; ?>" class="button"><?php echo $button_continue; ?></a></div>

</div>

<?php echo $content_bottom; ?></div>

<?php echo $footer; ?>




So where i have to paste it?
Thanks

Re: AdWords coversion tracking code

Posted: Fri Sep 07, 2012 10:12 am
by Avvici
Below the $footer