DigitalCrypto Posted November 1, 2007 Share Posted November 1, 2007 I love details and I love WHMCS. If you would like to be able to track your pages through Google Analytics you can do so by simply editing the header.tpl file in your templates folder. I use Portal mode so for me it is /templates/portal/header.tpl Near the top of the page you will want to insert the following code <script src="http://wxwxwx.google-analytics.com/urchin.js" type="text/javascript"></script> <script type="text/javascript"> _uacct = "XX-XXXXXXX-X"; urchinTracker(); </script> Where XX-XXXXXXX-X is your Google Analytics tracking number. Once you have done this you will then need to visit Google Analytics page and set up your goals. Even though each page shares the same header it is tracked uniquely by the page name such as order.php etc. Also remove the "x"s in the wxwxwx portion...I don't quite have 15 posts so it won't let me put the clean URL there. Maybe a moderator will fix this for me. To find where you would like to set your goals simply run through the checkout process and make a note of all the URLs in the process and you can set those up on Google Analytics. I hope this helps you with tracking your conversion rates. - DC 0 Quote Link to comment Share on other sites More sharing options...
MACscr Posted November 1, 2007 Share Posted November 1, 2007 Dont forget that you need to link to the https version for your checkout area if you use ssl, if not, its going to give errors your users. 0 Quote Link to comment Share on other sites More sharing options...
nka Posted November 3, 2007 Share Posted November 3, 2007 you should place this in footer not in header 0 Quote Link to comment Share on other sites More sharing options...
TerrasIOI Posted November 18, 2007 Share Posted November 18, 2007 Dont forget that you need to link to the https version for your checkout area if you use ssl, if not, its going to give errors your users. Does that mean that I need to create 2 diffrent profiles in Google Analytics panel?? One for http and one for https? Regards. 0 Quote Link to comment Share on other sites More sharing options...
uberhost Posted November 18, 2007 Share Posted November 18, 2007 Dont forget that you need to link to the https version for your checkout area if you use ssl, if not, its going to give errors your users. Does that mean that I need to create 2 diffrent profiles in Google Analytics panel?? One for http and one for https? Regards. All you have to do is change the URL for the script source in your footer to: https://ssl.google-analytics.com/urchin.js And you'll be good to go. 0 Quote Link to comment Share on other sites More sharing options...
TerrasIOI Posted November 18, 2007 Share Posted November 18, 2007 uberhost, Thanks for your reply. It make sense because I see on your site that you are using SSL version of code even on non-SSL pages. I have for now only placed code in 'order-complete.tpl template file'. However, I don't know if I need to add some special tags. My code there look like this: I will appreciate your answer. 0 Quote Link to comment Share on other sites More sharing options...
uberhost Posted November 18, 2007 Share Posted November 18, 2007 uberhost,It make sense because I see on your site that you are using SSL version of code even on non-SSL pages. True, the Google Analytics code uses the secure server address on every page. As for your code, can you repost? 0 Quote Link to comment Share on other sites More sharing options...
TerrasIOI Posted November 18, 2007 Share Posted November 18, 2007 As for your code, can you repost? Here it is: [b]»{$LANG.orderconfirmation}[/b]</p> {$LANG.orderreceived}</p> <blockquote> {$LANG.ordernumberis} {$ordernumber}</p> </blockquote> {$LANG.orderfinalinstructions}</p> {if $invoiceid}<p align="center">[url="viewinvoice.php?id={$invoiceid}"]{$LANG.invoicenumber}{$invoiceid}[/url]</p>{/if} <p align="center">[url="clientarea.php"]{$LANG.ordergotoclientarea}[/url]</p> <script src="https://ssl.google-analytics.com/urchin.js" type="text/javascript"> </script> <script type="text/javascript"> _uacct = "xxxxxx"; urchinTracker(); </script> I think that it works, but I can't see any result in statistic for about 24 hours. 0 Quote Link to comment Share on other sites More sharing options...
ctroyp Posted July 24, 2008 Share Posted July 24, 2008 All you have to do is change the URL for the script source in your footer to: https://ssl.google-analytics.com/urchin.js And you'll be good to go. I have used the https version of the Analytics tracking code, but I still get a security warning. But, it is only in IE! If I remove the code completely, the warning goes away which proves my SSL is setup correctly with my host account. How can I avoid the warning? 0 Quote Link to comment Share on other sites More sharing options...
uberhost Posted July 24, 2008 Share Posted July 24, 2008 I have used the https version of the Analytics tracking code, but I still get a security warning. But, it is only in IE! If I remove the code completely, the warning goes away which proves my SSL is setup correctly with my host account. How can I avoid the warning? It may not be related to the Google Analytics code, have you tried removing the code to see if the warning persists? Also, if you can provide a link to your site that would help us troubleshoot. Best, Rick 0 Quote Link to comment Share on other sites More sharing options...
ChrisGooding Posted July 24, 2008 Share Posted July 24, 2008 Without sounding patronising, have you ensured that all images etc ARE on the same machine/secured domain that your cart is (preferably in the WHMCS folder tree somewhere)? The best way to see is to use IE and then tell it to not load the insecure items, then have a good scour to see what's missing. 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.