Page 1 of 5 123 ... LastLast
Results 1 to 15 of 65

Thread: Using Conversion Tracking

  1. #1
    Join Date
    Sep 2007
    Posts
    44

    Default Using Conversion Tracking

    Was announced in V3.6 that it will work with Google Conversion Tracking. How do you use it?

  2. #2
    Join Date
    Sep 2007
    Posts
    411

    Default

    yeah have been looking for this myself

  3. #3
    Join Date
    Jul 2005
    Location
    UK
    Posts
    8,437

    Default

    templates/orderforms/cart/complete.tpl is the file. There is a section in there:

    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}
    The HTML code you place there only runs once the user has paid and fully completed the order process.

    Matt
    WHMCompleteSolution
    The Complete Client Management, Billing & Support Solution
    www.whmcs.com

  4. #4
    Join Date
    Sep 2007
    Posts
    44

    Default

    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.

  5. #5
    Join Date
    Sep 2007
    Posts
    44

    Default

    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 ?

  6. #6
    Join Date
    Sep 2007
    Posts
    44

    Default

    oh,
    "Just need to enclose it in {literal} and {/literal} ..."
    and it works

  7. #7
    Join Date
    Apr 2007
    Posts
    117

    Default

    Hi Dimak,

    the code in complete.tpl work with "Auto Redirect on Checkout"??

    regards

  8. #8
    Join Date
    Jul 2005
    Location
    UK
    Posts
    8,437

    Default

    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
    WHMCompleteSolution
    The Complete Client Management, Billing & Support Solution
    www.whmcs.com

  9. #9
    Join Date
    Nov 2007
    Posts
    195

    Default

    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

  10. #10
    Join Date
    Jan 2008
    Location
    Ashford, Kent, UK
    Posts
    426

    Default

    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

  11. #11
    Join Date
    Nov 2007
    Posts
    195

    Default

    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

  12. #12
    Join Date
    Aug 2007
    Posts
    186

    Default

    Odd... shouldn't $invoiceid and $ispaid not be empty after the person has paid? Or did you get his from a different step?

  13. #13
    Join Date
    Nov 2007
    Posts
    195

    Default

    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.

  14. #14
    Join Date
    Jul 2005
    Location
    UK
    Posts
    8,437

    Default

    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

    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}
    So that would then enable you to do something like this in your tracking code:

    Code:
    <img src="http://order-tracker.com/?ordernumber={$orderid}&amount={$amount}" width="1" height="1" border="0" />
    Matt
    WHMCompleteSolution
    The Complete Client Management, Billing & Support Solution
    www.whmcs.com

  15. #15
    Join Date
    Nov 2007
    Posts
    195

    Default

    Cheers Matt,
    That looks like it should do the trick

Page 1 of 5 123 ... LastLast

Similar Threads

  1. Google Analytics Conversion Tracking
    By datex in forum Feature Requests
    Replies: 11
    Last Post: 08-15-10, 12:47 AM