Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: SMF Customization Team on December 13, 2009, 08:02:38 AM

Title: GoDaddy Analytics Code
Post by: SMF Customization Team on December 13, 2009, 08:02:38 AM
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=2312)

GoDaddy Analytics




Original Author: Arantor (https://www.simplemachines.org/community/index.php?action=profile;u=265135) | Current Author: SMF Customization Team (https://www.simplemachines.org/community/index.php?action=profile;u=1)
Supported Languages: English, Spanish

Link To Mod (https://custom.simplemachines.org/mods/index.php?mod=2312) | Mod Discussion (http://www.simplemachines.org/community/index.php?topic=353698.0) | Other SMF Customization Team Mods (https://custom.simplemachines.org/mods/index.php?action=profile;u=1)



Summary:
This mod allows a user to specify their GoDaddy Analytics code, in the admin panel and the appropriate loader code will be added automatically.

With 2.0 RC4 forward it should work on any theme (no theme edits).

Compatibility:
Compatible with SMF 1.1 & 2.0

Installation Information:
The Package Manager should work in most cases, if you have problems installing please use the discussion thread as well as Manual Installation of Mods (http://docs.simplemachines.org/index.php?topic=402)

Change Log:
1.2 - 4 March 2011
! Fixed error with mod breaking XML responses

1.1 - 10 February 2011
+ 2.0 RC4 support added, no theme edits required
+ Updated language support

1.0 - December 7, 2009
  First release



Copyright (c) 2015, Simple Machines, under BSD 3-Clause License.
All rights reserved.
Title: Re: GoDaddy Analytics Code
Post by: Liam. on December 13, 2009, 10:14:33 AM
Great! I was looking at GoDaddy's Analytics codes the other day and I thought I wouldn't know how to integrate them. The one time I say, amazing timing for releasing this mod!
Title: Re: GoDaddy Analytics Code
Post by: Liam. on December 13, 2009, 03:43:34 PM
So a +1 post count for you, hehe :P I'll download and try this mod out tomorrow on my live site, I really need it ^_^
Title: Re: GoDaddy Analytics Code
Post by: terrycsa on December 28, 2009, 01:17:30 AM
Thank you Arantor and the SMF team!

Please pardon my lack of php knowledge.

In installing this mod does the code go
['withing the brackets']  or
='within the quotes'

$txt['godaddyAnalyticsCode'] = 'GoDaddy Analytics code';

Thanks for your help!
Title: Re: GoDaddy Analytics Code
Post by: allymcbeal on January 06, 2010, 03:06:43 PM
Sorry I can't understand this mod is for?
What is GoDaddy's Analytics codes? :(
Title: Re: GoDaddy Analytics Code
Post by: allymcbeal on January 07, 2010, 07:09:00 AM
Ok, that's true, but I like to know what is this, can I?
Title: Re: GoDaddy Analytics Code
Post by: allymcbeal on January 07, 2010, 06:10:18 PM
Ok, now I have understand. thank you. :)
Title: Re: GoDaddy Analytics Code
Post by: TheListener on March 06, 2010, 09:36:20 PM
How does this work?

( partner has some godaddy accounts plus an iphone app).
Title: Re: GoDaddy Analytics Code
Post by: Blade_Runner on February 11, 2011, 05:31:00 AM
Why would anyone wants to pay for GoDaddy Analytics Code when Google one is free?
Title: Re: GoDaddy Analytics Code
Post by: Blade_Runner on February 11, 2011, 05:47:08 AM
Quote from: Arantor on February 11, 2011, 05:39:28 AM
*shrug* Some people don't like Google, some places Google Analytics is blocked (my old employer for one) so using a lesser known analytics might reveal things Google Analytics wouldn't.

All I know is, it came up a few times in the support board so I threw this mod together based on the Google Analytics mod I did and published it via the Cust team account.

Thank you for the reply and mod. :)
Title: Re: GoDaddy Analytics Code
Post by: Selroth on February 20, 2011, 05:56:21 PM
Quote from: Arantor on February 20, 2011, 05:19:32 PM
That's Google code, not GoDaddy code.

My bad.
Title: Re: GoDaddy Analytics Code
Post by: Martin12 on February 22, 2011, 11:23:08 PM
When I install this mode on RC5 it breaks quick reply
Title: Re: GoDaddy Analytics Code
Post by: petergariepy on April 19, 2011, 12:20:24 AM
I've installed the mod and the google analytics code.

However, when i view the source of the page i dont see the google code.

Any feedback?
Title: Re: GoDaddy Analytics Code
Post by: Spuds on April 19, 2011, 10:37:03 AM
Looks like you are using a custom 1.1 theme?  ... if so you will need to manually make the edits to install the mod for your theme.  There is a block of code that that needs to be added before the </body> tag in the index.template.php file for your theme.
Title: Re: GoDaddy Analytics Code
Post by: petergariepy on April 20, 2011, 07:01:46 PM
Looks like you are using a custom 1.1 theme?

---Yup. a modified theme.

....you will need to manually make the edits to install the mod for your theme.  There is a block of code that that needs to be added before the </body> tag in the index.template.php file for your theme.

---I added the following code to the index.template.php file immediately above the /body tag and it hosed my forum until i removed it.

---Now what?


<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-00000000-1']);
  _gaq.push(['_trackPageview']);

  (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);
  })();

</script>

Title: Re: GoDaddy Analytics Code
Post by: Spuds on April 21, 2011, 12:17:40 AM
Attach your index.template.php file so I can take a look
Title: Re: GoDaddy Analytics Code
Post by: petergariepy on April 21, 2011, 01:45:54 AM
find it attached.  I didnt modify, but i did put the above code immediately above the /body tag.
Title: Re: GoDaddy Analytics Code
Post by: Spuds on April 21, 2011, 11:01:33 AM
I inserted both the godaddy and google code in this file, see if it works for you.
Title: Re: GoDaddy Analytics Code
Post by: petergariepy on April 21, 2011, 11:52:29 AM
thanks, but in looking at the code i dont see where I am to inject my unique google analytics number. Please explain.
Title: Re: GoDaddy Analytics Code
Post by: Spuds on April 21, 2011, 12:03:13 PM
After you install the mod, in the admin panel under features & settings there is a place to enter the code.  Of course you have to have the mod installed, all I did was the theme edit since you are running a custom theme.
Title: Re: GoDaddy Analytics Code
Post by: petergariepy on April 21, 2011, 12:07:29 PM
NOW i get it. I'll try it now.
Title: Re: GoDaddy Analytics Code
Post by: petergariepy on April 21, 2011, 12:12:16 PM
its installed and appears to be functioning.  I'll let you know it data collection starts working.