Was announced in V3.6 that it will work with Google Conversion Tracking. How do you use it?
Was announced in V3.6 that it will work with Google Conversion Tracking. How do you use it?
yeah have been looking for this myself
templates/orderforms/cart/complete.tpl is the file. There is a section in there:
The HTML code you place there only runs once the user has paid and fully completed the order process.Code:{if $ispaid} <!-- Enter any HTML code which needs to be displayed once a user has completed the checkout of their order here - for example conversion tracking and affiliate tracking scripts --> {/if}
Matt
In your example it's for "/cart/"
Will it work with /singlepage/order-complete.tpl ?
Or even if I use "/singlepage/" I have to add tracking code to /cart/complete.tpl ?
Will this code runs always or we have to enable it in "GENERAL SETTINGS" ?
(for example "Auto Redirect on Checkout" I use "automatically redirect the user to the invoice", will it work for me?
What variables can we use for tracking codes?
like payment amount, domain name, invoice num etc.
I have tested,
and for "/singlepage/" we can add tracking code to /cart/complete.tpl
without additional settings,
But it's not work with Braces {, } in the tracking codes.
And still question how to add payment sum ?
oh,
"Just need to enclose it in {literal} and {/literal} ..."
and it works![]()
Hi Dimak,
the code in complete.tpl work with "Auto Redirect on Checkout"??
regards
No matter what checkout option is used, the order process will now always end on the order complete page once paid for - that was the new feature.
Matt
Does anyone know what variables are available to use on this page? I'm sure there is a Smarty command you can use that will show the variables that are available for you, but my mind has gone blank![]()
I'm not sure, but I think it's {debug} - i've seen it posted around a lot here.
Jason
» Hosting4Network.co.uk
» Web Hosting from £1.50 per month
» Teamspeak Hosting from £0.25 per slot
Cheers, That's it
I've got a list of variables here, one thing that's missing is the order total, which would be very useful for Google Analytics, would this be possible to include Matt?
Here's the list for the rest of you, I'm copy/pasting straight from the debug console so lets see how it comes out....
{$SCRIPT_NAME} /clients/cart.php
{$breadcrumbnav} <a href="cart.php">Shopping Cart</a>
{$charset} iso-8859-1
{$clientsdetails} Array (3)
id => 152
firstname => Dan
lastname => Thompson
{$companyname} D9 Hosting
{$currency} USD
{$currencysymbol} $
{$invoiceid} empty
{$ispaid} empty
{$langchange} true
{$language} English
{$loggedin} true
{$orderid} 160
{$ordernumber} 7939606241
{$pageicon} images/support/order.gif
{$pagetitle} Shopping Cart
{$setlanguage} <form method="post" action="/clients/...
{$systemsslurl} empty
{$systemurl} http://www.d9hosting.com/clients
{$template} d9hosting
{$todaysdate} Wednesday, 13th February 2008
Odd... shouldn't $invoiceid and $ispaid not be empty after the person has paid? Or did you get his from a different step?
I paid with credit rather than a standard gateway if that makes any difference?
I'll do another check tomorrow using a normal gateway and see what the results are.
If you need the total amount the order was for then you would use a code block like the below one to assign the {$amount} variable for use elsewhere in the template
So that would then enable you to do something like this in your tracking code:Code:{php} $orderid = $this->get_template_vars('orderid'); $result = select_query("tblorders","amount",array("id"=>$orderid)); $data = mysql_fetch_array($result); $amount = $data["amount"]; $this->assign('amount',$amount); {/php}
MattCode:<img src="http://order-tracker.com/?ordernumber={$orderid}&amount={$amount}" width="1" height="1" border="0" />
Cheers Matt,
That looks like it should do the trick![]()