Salman75 Posted June 19, 2007 Share Posted June 19, 2007 We need to define a Thank You page to google which will serve as a completion of a "goal". This needs to be any page which shows after completion of a sale. We also need to run some custom tracking scripts. Which page can we add them to? 0 Quote Link to comment Share on other sites More sharing options...
tracktor Posted June 19, 2007 Share Posted June 19, 2007 too i need this 0 Quote Link to comment Share on other sites More sharing options...
bucketshop Posted June 20, 2007 Share Posted June 20, 2007 Same here. 0 Quote Link to comment Share on other sites More sharing options...
Gears Posted June 20, 2007 Share Posted June 20, 2007 What about a goal as "htlps://wvw.paypal.com/cgi-bin/webscr"? Or htlps://wvw.example.com/whmcs/subscriptionforward.php Or even just htlps://wvw.example.com/whmcs/order.php?step=5 * I don't have 15 posts so I can't submit htlps or wvw * 0 Quote Link to comment Share on other sites More sharing options...
Gears Posted June 20, 2007 Share Posted June 20, 2007 I think you can also use funneling to track the order progression. You can find this on the Goal page. You'll have to do this as well: google.com/support/analytics/bin/answer.py?answer=27203 (is it possible to add/use that code in whmcs order pages? 0 Quote Link to comment Share on other sites More sharing options...
Salman75 Posted June 20, 2007 Author Share Posted June 20, 2007 Funnelling will help you narrow down goals but will not provide a very accurate conversion rate. For an accurate conversion rate, you MUST use a page AFTER payment has been completed. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted June 20, 2007 WHMCS CEO Share Posted June 20, 2007 So the order-complete.tpl template file? Matt 0 Quote Link to comment Share on other sites More sharing options...
Salman75 Posted June 20, 2007 Author Share Posted June 20, 2007 Hi Matt, Actually, we need the URL of the final page after order completion. Thanks 0 Quote Link to comment Share on other sites More sharing options...
Salman75 Posted June 20, 2007 Author Share Posted June 20, 2007 Matt, Please tell me what is this (general config options): Run Script on CheckOut. Tick this box to run the script in the file "includes/checkoutscript.php" on checkout 0 Quote Link to comment Share on other sites More sharing options...
Gears Posted June 20, 2007 Share Posted June 20, 2007 Hi Matt, Actually, we need the URL of the final page after order completion. Thanks Well for PayPal don't you have an option of sending the customer to a webpage once the payment has been made? I think you can send them to a new webpage or have them return to the page they came from. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted June 20, 2007 WHMCS CEO Share Posted June 20, 2007 The final url of the order process is order.php?step=complete Matt 0 Quote Link to comment Share on other sites More sharing options...
Salman75 Posted June 20, 2007 Author Share Posted June 20, 2007 Matt, Please tell me what is this (general config options): Run Script on CheckOut. Tick this box to run the script in the file "includes/checkoutscript.php" on checkout 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted June 20, 2007 WHMCS CEO Share Posted June 20, 2007 You enable that if you want that file to be run when a user checks out and you inserted your own PHP code into it. Matt 0 Quote Link to comment Share on other sites More sharing options...
Gears Posted June 21, 2007 Share Posted June 21, 2007 Salman75, I think you would be fine using order.php?step=complete as the goal. 0 Quote Link to comment Share on other sites More sharing options...
Salman75 Posted June 21, 2007 Author Share Posted June 21, 2007 Salman75,I think you would be fine using order.php?step=complete as the goal. Thanks Matt & Ace, will try 0 Quote Link to comment Share on other sites More sharing options...
rodeoXtreme Posted June 27, 2007 Share Posted June 27, 2007 Hey Salman, I am using order.php?step=complete as my goal with Google and it is tracking fine. 0 Quote Link to comment Share on other sites More sharing options...
bucketshop Posted June 27, 2007 Share Posted June 27, 2007 Thanks rodeoXtreme, Thats one more thing I need to put on my task list now 0 Quote Link to comment Share on other sites More sharing options...
brianr Posted November 4, 2007 Share Posted November 4, 2007 The final url of the order process is order.php?step=complete Is this still correct? It seems as though the final order URL (that loads a page) is order.php?step=5 -- There seems to be a step=6 as well but it's a 302... Edit: I just ran through a new order to test... I never get a page load after step 4, just a redirect to the invoice to pay it, then off to PayPal... So I guess the question still stands - how do we track a new order? Edit2: Ok, apparently the auto redirect to invoice setting has to be off for this to work, and I end up at a URL (for a PayPal payment) of step=checkout 0 Quote Link to comment Share on other sites More sharing options...
brianr Posted November 4, 2007 Share Posted November 4, 2007 I don't have time to finish this tonight (or next week for that matter) but someone will be able to take this and run with it... I'm also going to try to get the Ecommerce reporting working as well in Analytics. (http://www.google.com/support/googleanalytics/bin/answer.py?answer=55528&topic=11002) The good news is it should be possible. The bad news is that (almost) none of the data Google needs/wants is available in the smarty variables in the step=checkout stage. (Which uses the order-complete.tpl file) We do have access to the order number, and from there can use a pair of MySQL queries to get the data. We need to use the Smarty {php} function, and have alot of work to do... First, here's the basic queries: select o.ordernum as `order-id`, null as affiliation, i.total as total, i.tax as tax, 0 as shipping, c.city as city, c.state as `state/region`, c.country as country FROM tblorders o LEFT JOIN tblinvoices i ON o.invoiceid = i.id LEFT JOIN tblclients c ON o.userid = c.id; select o.ordernum as `order-id`, null as `sku/code`, ii.description as `product name`, ii.type as category, ii.amount as price, 1 as quantity from tblorders o LEFT JOIN tblinvoiceitems ii ON o.invoiceid = ii.invoiceid; The first gets the transaction information, the second the items on the invoice for the order. (The where clauses, and query alias cleanup are left as an exercise for the reader.) In the smarty {php} block you need to get the order number by using the function get_template_vars ($varname). In this case "$ordernum = $this->get_template_vars('ordernumber');" should do the trick. Once you have the data back form MySQL you need to push the data back into smarty. $this->assign($var, $val) will do that. Now if you handle the Google form creation in the {php} tag, or push the raw MySQL return and use smarty to iterate, is up to you. If anyone else has any better ideas, I'm all ears. 0 Quote Link to comment Share on other sites More sharing options...
Salman75 Posted November 10, 2007 Author Share Posted November 10, 2007 The final url of the order process is order.php?step=complete Matt This is no longer the case. In 3.4, the final page is: https://www.qualityhostonline.com/clients/viewinvoice.php?id=XXXX So now what do we use? 0 Quote Link to comment Share on other sites More sharing options...
WHMCS CEO Matt Posted November 10, 2007 WHMCS CEO Share Posted November 10, 2007 Only if you have the automatically redirect to invoice at the end of an order option selected - and this option isn't new in 3.4.1 - it's always been there. Matt 0 Quote Link to comment Share on other sites More sharing options...
brianr Posted November 10, 2007 Share Posted November 10, 2007 So Matt, How do you recommend we do this then? 0 Quote Link to comment Share on other sites More sharing options...
Salman75 Posted November 10, 2007 Author Share Posted November 10, 2007 Only if you have the automatically redirect to invoice at the end of an order option selected - and this option isn't new in 3.4.1 - it's always been there. Matt There are 3 options in 3.4: 1. Select to not automatically redirect and just show the order completed page2. Select to automatically redirect the user to the invoice 3. Select to automatically redirect the user to the gateway I just checked all three options and each time I was redirected back to the PAID invoice after payment. I never got to order.php?step=complete Is this due to the single page order form? 0 Quote Link to comment Share on other sites More sharing options...
newbie Posted November 14, 2007 Share Posted November 14, 2007 What is the nicest manner to fix it? We like to have the code before the redirect to any payment gateways, because we use several gateways and not any one of them supports redirects back to us after payment. So is there a universal method that works. 0 Quote Link to comment Share on other sites More sharing options...
tartan Posted November 15, 2007 Share Posted November 15, 2007 Yes, I need the google conversion scripts to work too. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.