pod Posted August 20, 2009 Share Posted August 20, 2009 Will google analytics work with whmcs? 0 Quote Link to comment Share on other sites More sharing options...
DataHosts Posted August 20, 2009 Share Posted August 20, 2009 You mean tracking the number of visits to your WHMCS installation? You can put the google analytics JS in the footer tpl without issue. 0 Quote Link to comment Share on other sites More sharing options...
zoilodiaz Posted August 20, 2009 Share Posted August 20, 2009 hello, take a look here, http://wiki.whmcs.com/Google_Analytics_Integration 0 Quote Link to comment Share on other sites More sharing options...
pod Posted August 21, 2009 Author Share Posted August 21, 2009 thanks i found that now! 0 Quote Link to comment Share on other sites More sharing options...
pod Posted August 21, 2009 Author Share Posted August 21, 2009 I keep getting a '_gat' is undefined javascript error on the compelte page. 0 Quote Link to comment Share on other sites More sharing options...
pod Posted August 21, 2009 Author Share Posted August 21, 2009 found the problem: you can use: <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); var pageTracker = _gat._getTracker("UA-xxxxxxx-1"); pageTracker._trackPageview(); pageTracker._addTrans( "{$orderid}", "", "{$amount}", "0", "0", "{$city}", "{$state}", "{$country}" ); pageTracker._addItem( "{$orderid}", "{$packageid}", "{$name}", "{$type}", "{$amount}","1" ); pageTracker._trackTrans(); </script> it must be two script tags: <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> var pageTracker = _gat._getTracker("UA-xxxxxxx-1"); pageTracker._trackPageview(); pageTracker._addTrans( "{$orderid}", "", "{$amount}", "0", "0", "{$city}", "{$state}", "{$country}" ); pageTracker._addItem( "{$orderid}", "{$packageid}", "{$name}", "{$type}", "{$amount}","1" ); pageTracker._trackTrans(); </script> 0 Quote Link to comment Share on other sites More sharing options...
RackWire Posted August 21, 2009 Share Posted August 21, 2009 We followed the Wiki, and it is working great on our implementation. Great to see where the traffic is coming from. 0 Quote Link to comment Share on other sites More sharing options...
bdnero Posted August 21, 2009 Share Posted August 21, 2009 We also followed the wiki, and its working fine. 0 Quote Link to comment Share on other sites More sharing options...
albatroz Posted August 26, 2009 Share Posted August 26, 2009 What template are you using? Where do I find the complete.tpl file? Do I need to change 2 files? I changed the footer.tpl of the portal template and all I got was a blank page 0 Quote Link to comment Share on other sites More sharing options...
cyfered6 Posted August 27, 2009 Share Posted August 27, 2009 templates/orderforms/cart [complete.tpl] works great 0 Quote Link to comment Share on other sites More sharing options...
jnet Posted August 28, 2009 Share Posted August 28, 2009 the loading of the page becomes slow 0 Quote Link to comment Share on other sites More sharing options...
honesting Posted September 8, 2009 Share Posted September 8, 2009 Hello! I used the integration code of the wiki and it works but only shows a few visites for day. I have about 180/day but analytics just show 5-6, what could be? 0 Quote Link to comment Share on other sites More sharing options...
albatroz Posted September 13, 2009 Share Posted September 13, 2009 I have impression that my code is correct buy Google Analytics is tracking nothing... Could somebody please check my website? http://clientes.virtualorbis.com I followed the wiki instructions... 0 Quote Link to comment Share on other sites More sharing options...
Siddha Posted September 14, 2009 Share Posted September 14, 2009 Don't just copy paste the code. There is a slight change in code. Don't avoid it and it should work just fine. We have implemented it by following wiki instructions. 0 Quote Link to comment Share on other sites More sharing options...
honesting Posted September 20, 2009 Share Posted September 20, 2009 siddha, what code have change? the one in the wiki? or the analytics one? 0 Quote Link to comment Share on other sites More sharing options...
Siddha Posted October 3, 2009 Share Posted October 3, 2009 I have impression that my code is correct buy Google Analytics is tracking nothing... Could somebody please check my website? http://clientes.virtualorbis.com I followed the wiki instructions... Hi, As I could see some tags are missing in the code. So, I'll suggest you to copy paste the code from wiki as it is, and just update/replace this code - ("UA-xxxxx-x") <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); {literal} try { var pageTracker = _gat._getTracker("UA-[color="red"]xxxxx-x[/color]"); pageTracker._trackPageview(); } catch(err) {} {/literal} </script> This will save you from typos and all. @honesting Original code from analytics gives you in two separate script forms. You need to merge those in single script as shown in wiki. That's only the difference, I can see. 0 Quote Link to comment Share on other sites More sharing options...
mrl14 Posted October 19, 2009 Share Posted October 19, 2009 I did all this. Followed the instructions from the manual, and had 3 orders placed, but none are showing up in google. I even did a test and viewed the source code and saw the variables being generated. And yes I have my proper UA code inserted. Any ideas? 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.