• Welcome to Simple Machines Community Forum. Please login or sign up.
November 27, 2021, 09:43:01 PM

News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord


GoDaddy Analytics Code

Started by SMF Customization Team, December 13, 2009, 08:02:38 AM

Previous topic - Next topic

SMF Customization Team

December 13, 2009, 08:02:38 AM Last Edit: March 09, 2010, 06:46:15 PM by Norv
Link to Mod

GoDaddy Analytics




Original Author: Arantor | Current Author: SMF Customization Team
Supported Languages: English, Spanish

Link To Mod | Mod Discussion | Other SMF Customization Team Mods



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

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.

Liam.

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!

Liam.

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 ^_^

terrycsa

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!

allymcbeal

Sorry I can't understand this mod is for?
What is GoDaddy's Analytics codes? :(

allymcbeal

Ok, that's true, but I like to know what is this, can I?

allymcbeal

Ok, now I have understand. thank you. :)

TheListener

How does this work?

( partner has some godaddy accounts plus an iphone app).


Blade_Runner

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. :)

Selroth

Everything is built from imagination.

Martin12

When I install this mode on RC5 it breaks quick reply

petergariepy

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?

Spuds

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.

petergariepy

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>


Spuds

Attach your index.template.php file so I can take a look

petergariepy

find it attached.  I didnt modify, but i did put the above code immediately above the /body tag.

Spuds

I inserted both the godaddy and google code in this file, see if it works for you.

petergariepy

thanks, but in looking at the code i dont see where I am to inject my unique google analytics number. Please explain.

Spuds

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.

Advertisement: