pod Posted October 12, 2009 Share Posted October 12, 2009 For those of you whom have integrated google analytics, how have you done it? What pages and specific setup. Also are you using goals or ecommerce stuff? 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Support Manager WHMCS John Posted October 13, 2009 WHMCS Support Manager Share Posted October 13, 2009 By reading the documentation http://wiki.whmcs.com/Google_Analytics_Integration 0 Quote Link to comment Share on other sites More sharing options...
pod Posted October 14, 2009 Author Share Posted October 14, 2009 are we able to put the code that goes into the complete.tpl template file into another file? We dont want to send the user to the complete page, as we like them to go directly to their invoice. 0 Quote Link to comment Share on other sites More sharing options...
Derek Posted October 17, 2009 Share Posted October 17, 2009 (edited) By reading the documentation http://wiki.whmcs.com/Google_Analytics_Integration John, do we need to set up anything in google analytics after we follow those steps ? As it seems you need to setup a goal to track conversion rates but I am not sure the URL for the complete page. Any ideas ? Edit. Found another post which stated how to do this. On a side note does the goals with google analytics show where the referal came from ? Edited October 17, 2009 by Derek 0 Quote Link to comment Share on other sites More sharing options...
mrl14 Posted October 30, 2009 Share Posted October 30, 2009 I've implemented that code and while orders have come in, they are not appearing in google analytics. Everything was setup according to the documentation. This should be automated anyways. 0 Quote Link to comment Share on other sites More sharing options...
kuntal Posted November 23, 2009 Share Posted November 23, 2009 yup, no solution to the goal conversion @ google analytics google analytics will track the visitor and page URL, but how can I set up the GOAL Conversion? 0 Quote Link to comment Share on other sites More sharing options...
ksstudio Posted December 7, 2009 Share Posted December 7, 2009 yup, no solution to the goal conversion @ google analyticsgoogle analytics will track the visitor and page URL, but how can I set up the GOAL Conversion? Hello Kuntal, To setup Google Analytics conversion, follow 2 steps below: 1. Add your Google Analytics code inside ../templates/footer.tpl 2. Configure your Goal inside your google analytics settings. 0 Quote Link to comment Share on other sites More sharing options...
juhogrey Posted January 4, 2010 Share Posted January 4, 2010 Hi, What are the exact goal steps you've configured into Google Analytics? I'm having qutie a few problems with these. 0 Quote Link to comment Share on other sites More sharing options...
pdpd Posted March 5, 2010 Share Posted March 5, 2010 Still cannot get this to work. We can see all our visitors etc. in Analytics by using the code from the Wiki. However, in the eCommerce section of Google Analytics, its only showing one order/transaction for yesterday when we had at least 10. Any ideas anyone? 0 Quote Link to comment Share on other sites More sharing options...
vchosting Posted March 7, 2010 Share Posted March 7, 2010 I have been trying with this one but no joy 0 Quote Link to comment Share on other sites More sharing options...
ravotech Posted March 14, 2010 Share Posted March 14, 2010 Hello Kuntal, To setup Google Analytics conversion, follow 2 steps below: 1. Add your Google Analytics code inside ../templates/footer.tpl 2. Configure your Goal inside your google analytics settings. How do we do step 2, configure the goals? 0 Quote Link to comment Share on other sites More sharing options...
ravotech Posted March 16, 2010 Share Posted March 16, 2010 How do we do step 2, configure the goals? I have setup the goals, still no lucks though... At least not with the code from the whmcs KB. 0 Quote Link to comment Share on other sites More sharing options...
ravotech Posted April 4, 2010 Share Posted April 4, 2010 you have to setup commerce with goals, and make sure that the URL of the goal is well defined. as this may be a reason https://www.mydomain.com/support/cart.php?a=confproduct&i=1 This is one of the goals I used.. Is it correct? (The link actually points to the real product) 0 Quote Link to comment Share on other sites More sharing options...
vincent1 Posted June 20, 2010 Share Posted June 20, 2010 Since Google changed to new GA code, asking for it to be placed before closing </head> now instead of </body>, maybe we could have the wiki updated for this and some instruction for best WHMCS practice ecommerce / goal settings please? http://wiki.whmcs.com/Google_Analytics_Integration Many thanks, - Vincent 0 Quote Link to comment Share on other sites More sharing options...
juhogrey Posted June 30, 2010 Share Posted June 30, 2010 One up for vincent1 0 Quote Link to comment Share on other sites More sharing options...
AndyW Posted June 30, 2010 Share Posted June 30, 2010 (edited) Since Google changed to new GA code, asking for it to be placed before closing </head> now instead of </body>, maybe we could have the wiki updated for this and some instruction for best WHMCS practice ecommerce / goal settings please?http://wiki.whmcs.com/Google_Analytics_Integration Many thanks, - Vincent I use the ordercomplete.tpl , but the </head> section is contained in header.tpl so did you just add the GA code in header.tpl sitewide???? Edited June 30, 2010 by AndyW typo 0 Quote Link to comment Share on other sites More sharing options...
Rob Lamog Posted July 1, 2010 Share Posted July 1, 2010 The new Asynchronous GA snippet seems to be working properly for me. I dropped the script just before the end of the </head> tag in my header.tpl and my sites header.php. Then I followed the instructions in the wiki http://wiki.whmcs.com/Google_Analytics_Integration and modified the code to look like the following in my complete.tpl of the active order form template. {php} $orderid = $this->get_template_vars('orderid'); $userid = $_SESSION["uid"]; // get client data $result = select_query("tblclients","city, state, country",array("id"=>$userid)); $data = mysql_fetch_array($result); $city = $data["city"]; $state = $data["state"]; $country = $data["country"]; $this->assign('city',$city); $this->assign('state',$state); $this->assign('country',$country); // get package name $result = select_query("tblhosting","packageid",array("orderid"=>$orderid)); $data = mysql_fetch_array($result); $packageid = $data["packageid"]; $result = select_query("tblproducts","name, type",array("id"=>$packageid)); $data = mysql_fetch_array($result); $name = $data["name"]; $type = $data["type"]; $this->assign('name',$name); $this->assign('type',$type); $this->assign('packageid',$packageid); {/php} <script type="text/javascript"> var _gaq = _gaq || []; _gaq.push(['_setAccount', 'UA-XXXXX-X']); _gaq.push(['_trackPageview']); _gaq.push(['_addTrans', '{$orderid}', // order ID - required '', // affiliation or store name '{$amount}', // total - required '0', // tax '0', // shipping '{$city}', // city '{$state}', // state or province '{$country}' // country ]); // add item might be called for every item in the shopping cart // where your ecommerce engine loops through each item in the cart and // prints out _addItem for each _gaq.push(['_addItem', '{$orderid}', // order ID - required '{$packageid}', // SKU/code - required '{$name}', // product name '{$type}', // category or variation '{$amount}', // unit price - required '1' // quantity - required ]); _gaq.push(['_trackTrans']); //submits transaction to the Analytics servers {literal} (function() { var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s); })(); {/literal} </script> I dropped that code block at the bottom of the complete.tpl page. Make sure you use your own web property ID in place of 'UA-XXXXX-X' located in the js portion. You should be good to go I think. I've only got two days of stats so far but it looks like everything is working including Ecommerce tracking. If you want to know what I modified keep reading. I didn't change any of WHMCS {php} because it didn't look like I needed to. I copied the variables from the example GA snippet in the wiki into the new GA snippet from Google. It has been my experience Google Analytics doesn't change the order of the array for their variables but always be sure to have at least the required variables (which are clearly marked in the code). I used the {literal} tag around the function ONLY so the page wouldn't break and the php variables would echo properly into the GA snippet. I'm pretty sure it's working properly. Like I said I've only got two days worth of stats so far. Ecommerce seems to be tracking properly including capturing revenue. The site is not live but I've got plenty of sources testing the site. I can post back later when I've got more stats to work with and verify. Hope this helps. 0 Quote Link to comment Share on other sites More sharing options...
mrl14 Posted July 1, 2010 Share Posted July 1, 2010 Matt & Team, You can't put a price on the importance of Analytics. This should be top priority either was a built in feature or some step by step wiki documentation with details on how to do this. It really is unacceptable that even basic analytic support is difficult to implement with goal functionality also a must given we are selling products and trying to track how they come in. 0 Quote Link to comment Share on other sites More sharing options...
SQGiz Posted July 1, 2010 Share Posted July 1, 2010 What's written in the Wiki is not working. Can you please correct the mistakes and let us know how to use Google Analytics on WHMCS pages? Thank you. Best Regards, Michael 0 Quote Link to comment Share on other sites More sharing options...
awardle Posted July 7, 2010 Share Posted July 7, 2010 Did you manage to get google Analytics and WHMCS to work tracking goals? I tried to implement it but when I receive an order google thinks it's a goal for all the products I listed. 0 Quote Link to comment Share on other sites More sharing options...
Nimitz1061 Posted July 7, 2010 Share Posted July 7, 2010 I setup ecommerce analytics on a regular basis for CRE Loaded sites. If the code we are instructed to place in the wiki instructions for WHMCS worked at all, it would (in theory) supply Google Analytics the data it needs to establish ecommerce tracking with or without goal funnel setup. The only additional instruction needed is to configure the GA account to allow ecommerce tracking. At that point, ecommerce data should start to flow. Despite multiple attempts to embed this code as per the wiki (and various other forum post) instruction sets, we have not ONCE seen a transaction passed to Google Analytics. Not once. So - telling WHMCS users that simply following the incomplete instructions will fix their problem is not terribly helpful for two reasons. The instructions are not complete - and they don't work. Should anyone setting up ecommerce tracking be able to understand from Google's documetntation that embedding this code but failing to configure the account for ecommerce tracking will result in failure of transaction reporting ? Sure. Should they also be able to figure out that the UA-xxxxx-x label in the script should be replaced with their actual site tracking ID ? Sure. But even addressing these issues, the code does not work in our installation and never has no matter what we've done with it. One question I have is whether any one, anywhere on any server confirm that an installation of the code as stated in the wiki instructions actually works as it is given with both the footer and the complete.tpl triggering ?? 0 Quote Link to comment Share on other sites More sharing options...
apignard Posted July 7, 2010 Share Posted July 7, 2010 anyone open support ticket about it since it's seems broken ? 0 Quote Link to comment Share on other sites More sharing options...
getnetworks Posted July 9, 2010 Share Posted July 9, 2010 The old GA code does not work and if you try to insert the new code in to the header.tpl as instructed, the site breaks. I opened a ticket last night about GA and they still directed me to their outdated wiki page. I informed them today to read their forums as there is plenty of talk about that wiki no longer being accurate. It just sucks that doing what GA now requires breaks WHMCS. So much for that. 0 Quote Link to comment Share on other sites More sharing options...
xeqution Posted July 20, 2010 Share Posted July 20, 2010 Stuck in the same boat, followed the wiki - sent an e-mail off the support - directed twice to the wiki! Not happy, anyway I attached my files and explained how I setup GA, so hopefully this will prove to them that it is not working and that they can fix it 0 Quote Link to comment Share on other sites More sharing options...
rider Posted July 30, 2010 Share Posted July 30, 2010 Since your report, did you got Google analytic working with Whmcs ? 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.