News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Google Analytics Code

Started by SMF Customization Team, October 15, 2009, 12:10:12 PM

Previous topic - Next topic

Uncle Buck

With the change from ga.js to analytics.js (see https://developers.google.com/analytics/devguides/collection/upgrade/reference/gajs-analyticsjs [nofollow]) are we going to see an upgrade to this mod or are we going to have to modify the Subs.php file ourselves?

How easy would it be to modify the Subs.php file?
Has anyone using this mod made the change to analytics.js yet?

xehoigiatot

#221
Never used the Google Analytics Code before.   When signing up, it gives you a code to put on your forum.  Do I still need to do this?

Or, do I simply take out the UA string and put it in the textbox here once I install this mod?

Or, do I do both?  (If I have to do something else other than this mod, where do I paste the code that google gave me?)

Sorry, like I said.  N00b here regarding this.

Uncle Buck

Once you have installed the mod, there is a text field under Admin > Features and Options. Paste the UA code you got into there and bobs your uncle.

akc42

Quote from: Uncle Buck on April 21, 2014, 09:50:30 AM
With the change from ga.js to analytics.js (see https://developers.google.com/analytics/devguides/collection/upgrade/reference/gajs-analyticsjs) are we going to see an upgrade to this mod or are we going to have to modify the Subs.php file ourselves?

How easy would it be to modify the Subs.php file?
Has anyone using this mod made the change to analytics.js yet?

I came here to ask the same question.  I suspect it might make the mod more complicated, because ideally you would want a switch in the admin panel to switch between the two forms.  My initial reading of the google requirements is that you have to first change your account at google, and THEN update the code on your site - only after what they call the "Property Transfer" has completed.

Uncle Buck

You are correct with that...
Google properties updated first and then the code on your site.

I changed the Subs.php file directly and the replacement code I used can be found at http://www.simplemachines.org/community/index.php?topic=504723.msg3691055#msg3691055

akc42

Quote from: Uncle Buck on April 30, 2014, 02:55:16 AM
You are correct with that...
Google properties updated first and then the code on your site.

I changed the Subs.php file directly and the replacement code I used can be found at http://www.simplemachines.org/community/index.php?topic=504723.msg3691055#msg3691055

Thanks for that link. 

I manage two web sites with smf, and one I went down the route of using my version control system (git) to manage all mods as a separate branch to the base distribution (to be fair this site uses a lot of mods and personal hacks to support things - all the way from when we first set it up with an early version 1 of SMF).  It means all SMF upgrades have to go through my source control system before loading the update on the site

With the other site, I use SMF package management - and its so much easier.

I am therefore reluctant to make the mods directly into the Subs.php file for the second site (the original site I can) , but perhaps see if I can synthesise the equivalent modification package to do the same job.

Uncle Buck

I was thinking of modifying the package so it could be done by the package manager but my coding experience is only intermediate so am not really confident in doing it this way.
The other part to that was that in the new code it needs the domain name so the code I replaced it with should really be modified so that it does not require to be hard coded as I did. Once again, not really confident in doing that.

SaltedWeb

Is this 2.0.8 compatible ?
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

radu81

sorry for my bad english

SaltedWeb

Yes it does work with 2.0.8, I tried it installed no errors. Looks like its just Language files and worked on all themes.
Knowing your limitations makes you human, exceeding these limitations makes you worthy of being human.

WhiteEagle

I'll be using this with 2.0.9, assuming it works just fine with it?
I fold for team 52482. Do you Fold@Home?
SMF powered sites: Leet Link LeetSpace.com

CableTool

Ive got this loaded in and the code is in there correctly but the GA page says :
Status: Tracking Not Installed
Last checked: Nov 10, 2014 1:37:21 PM PST

I had this loaded before and it worked fine, I have since re installed the whole forum. That being said, same URL, Fresh SMF install.

waplist


Arantor


waplist

@Arantor its installed on 2.0.9 .when it redirect after installing where we have put code it shows admin/index.php not found :-[

turgayt

not work on 2.0.9

forum.alyans.org.tr


sbryantgb

Also using 2.0.9 but do not get the option to place code in relevant box in the features and options section.

I am using the default forum template.

ApplianceJunk

It's working fine for me on 2.0.9 but that's just me. ;)

Dragon41673

Arantor...the link "to this mod" is pointing to the GoDaddy Analytics Mod. Need to update the link.

To everyone else, I was confused as you were as to where to put the Google Analytics code. It is NOT where the images on the mod page show it should be. Check in Configuration ~> Modification Settings ~> Miscellaneous. That's where I've found the entry box for the Google Analytics Code.
Owner - Aries Games & Miniatures

Advertisement: