pdpd Posted August 9, 2008 Share Posted August 9, 2008 Getting Google Analytics working is crucial to us, but nothing seems to work. Anybody out there got this working correctly? 0 Quote Link to comment Share on other sites More sharing options...
brianr Posted August 10, 2008 Share Posted August 10, 2008 This is a PITA.... But.... I *think* I've got it working correctly. I have it working for a $0.00 item, but there are a few tweaks that I had to make. First, you *cannot* auto-redirect the user to either the invoice or gateway. Your tracking code may fire *before* the user pays. If a user pays with PayPal they never go (back) to the order complete screen. I don't know about others. My code ended up having to walk the invoice items via a DB call to get the details needed for the Google tracker. It looks good on paper, now I'm going to give it a bit and see if/how it works.... more later. Edit: Also, keep in mind this doesn't track recurring payments at all. (I.E. WHMCS generates an invoice and they come back to pay it.) 0 Quote Link to comment Share on other sites More sharing options...
brianr Posted August 11, 2008 Share Posted August 11, 2008 Ok, I'm willing to let this code out a bit for others to test. If you're interested please PM me. 0 Quote Link to comment Share on other sites More sharing options...
pdpd Posted February 27, 2009 Share Posted February 27, 2009 Anybody got Google Analytics / Converstion tracking working successfully? 0 Quote Link to comment Share on other sites More sharing options...
Inetbiz Posted March 1, 2009 Share Posted March 1, 2009 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 {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: <img src="http://order-tracker.com/?ordernumber={$orderid}&amount={$amount}" width="1" height="1" border="0" /> Matt Now what about paypal where they may not be redirected back to order complete? Do something in paypal IPN? 0 Quote Link to comment Share on other sites More sharing options...
paradoxic Posted April 20, 2009 Share Posted April 20, 2009 Has anyone got a complete solution for this? 0 Quote Link to comment Share on other sites More sharing options...
mira99 Posted April 20, 2009 Share Posted April 20, 2009 do I also have problems with it, someone decided a question? 0 Quote Link to comment Share on other sites More sharing options...
DimaK Posted April 20, 2009 Author Share Posted April 20, 2009 Yes, I don't understand why developer don't want to show it in Documentations... You can place tracking code to templates/orderforms/default/complete.tpl (if you are using "default" order form) ========================== {if $ispaid} {literal} <!-- Google Code for Purchase Conversion Page --> <script language="JavaScript" type="text/javascript"> <!-- var google_conversion_id = 12313131313; var google_conversion_language = "en_US"; var google_conversion_format = "1"; var google_conversion_color = "666666"; if (1.0) { {/literal} var google_conversion_value = {$amount}; {literal} } var google_conversion_label = "Purchase"; //--> </script> <script language="JavaScript" src="http://www.googleadservices.com/pagead/conversion.js"> </script> <noscript> <img height=1 width=1 border=0 src="http://www.googleadservices.com/pagead/conversion/12313131313/?value=1.0&label=Purchase&script=0"> </noscript> {/literal} {/if} =============================== 0 Quote Link to comment Share on other sites More sharing options...
mediademon Posted June 19, 2009 Share Posted June 19, 2009 Hi Dimak Thanks for the code! Don't you also need to post the amount for noscript? {/literal} <img height=1 width=1 border=0 src="http://www.googleadservices.com/pagead/conversion/12313131313/?value={$amount}&label=Purchase&script=0"> {literal} 0 Quote Link to comment Share on other sites More sharing options...
raj@sbglobal.info Posted June 23, 2009 Share Posted June 23, 2009 its very helpful for us. 0 Quote Link to comment Share on other sites More sharing options...
annomander Posted July 23, 2009 Share Posted July 23, 2009 I put the code thats in the whmcs wiki into the complete.tpl in the cart template I made two different goals in google just be on the safe side /complete.php and cart.php?a=complete and nothing happened? What am I missing? Cheers 0 Quote Link to comment Share on other sites More sharing options...
Inetbiz Posted August 8, 2009 Share Posted August 8, 2009 Any updates on this? 0 Quote Link to comment Share on other sites More sharing options...
juhogrey Posted August 14, 2009 Share Posted August 14, 2009 I have the same issue. Would be great to have a complete tutorial on how to do this. 0 Quote Link to comment Share on other sites More sharing options...
pdpd Posted August 14, 2009 Share Posted August 14, 2009 Yep its a major problem for us too not being able to integrate with Google Analytics. Would be great to get a proper solution. 0 Quote Link to comment Share on other sites More sharing options...
paradoxic Posted September 8, 2009 Share Posted September 8, 2009 If anyone out there can help with this, it would be much appreciated. 0 Quote Link to comment Share on other sites More sharing options...
mrl14 Posted October 30, 2009 Share Posted October 30, 2009 Can we get an official response from Matt on this? This should be a built in feature, but if not, some final code posted as the wiki code doesn't seem to work. 0 Quote Link to comment Share on other sites More sharing options...
chrissts Posted November 10, 2009 Share Posted November 10, 2009 i didn't have any idea about this. thanks for sharing this with us. 0 Quote Link to comment Share on other sites More sharing options...
rasta Posted January 5, 2010 Share Posted January 5, 2010 bump, Anyone got a final solutions for google analytics? 0 Quote Link to comment Share on other sites More sharing options...
BryanB Posted February 5, 2010 Share Posted February 5, 2010 Any update on this? With no response from WHMCS I'm assuming they either dont care or don't have an answer. The wiki information on this topic is very basic and not very good either. I'm testing something out now but a definite answer would be helpful because it takes a few days to collect data and be able to tell if its working. 0 Quote Link to comment Share on other sites More sharing options...
pdpd Posted February 6, 2010 Share Posted February 6, 2010 It is odd - its a very important aspect thats not working, but it seems nobody has any answers yet. 0 Quote Link to comment Share on other sites More sharing options...
niels Posted February 19, 2010 Share Posted February 19, 2010 You'll have to remove {if $ispaid} so Google can check your page. Mine said "Unverified" for months until I removed that. It's not ideal, but it's better than no tracking at all. 0 Quote Link to comment Share on other sites More sharing options...
Sny Posted April 28, 2010 Share Posted April 28, 2010 {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} Is this still what we'd use to track conversions, or have things changed over the past 2 years? 0 Quote Link to comment Share on other sites More sharing options...
hostnine Posted May 9, 2010 Share Posted May 9, 2010 We're receiving inaccurate results all over the place. We want to add all of our tracking pixels to where they're executed before the payment redirect. Basically, once the user checks the box to agree to the TOS and clicks Submit it then executes all of our tracking pixels etc regardless of payment. We can write scripts to go through and validate valid conversions later. This current setup is just too unreliable as people will pay with paypal and not come back to the complete page. Some people pay via credit card later on and don't see the complete page as they login through /billing/ to do it etc Is there any way this can be possible? 0 Quote Link to comment Share on other sites More sharing options...
pdpd Posted May 11, 2010 Share Posted May 11, 2010 Has anybody got this working yet? We understand until Google implement some kind of PHP tracking code, its not going to be possible 0 Quote Link to comment Share on other sites More sharing options...
ksstudio Posted May 11, 2010 Share Posted May 11, 2010 We're receiving inaccurate results all over the place. We want to add all of our tracking pixels to where they're executed before the payment redirect. Basically, once the user checks the box to agree to the TOS and clicks Submit it then executes all of our tracking pixels etc regardless of payment. We can write scripts to go through and validate valid conversions later. This current setup is just too unreliable as people will pay with paypal and not come back to the complete page. Some people pay via credit card later on and don't see the complete page as they login through /billing/ to do it etc Is there any way this can be possible? You may put your Google Conversion Tracking Code in complete.tpl and under settings, set " Just show the order completed page (no payment redirect)" 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.