Adding Google Analytics Challenge

OK, here is my order of actions.

  1. I logged into my site.
  2. Under look and feel I selected “Layouts”.
  3. The active layout is “ContentBox Goodness”. There is an entry box for “googleAnalyticsAPI”. I pasted the code from Google Analytics there.
  4. The opening “” tag shows as “” after save and in the browser.

This might be a script protect issue with host settings. If it is then do we need to file an enhancement selection for the layout box to smartly embed the script in a script tag pair or spot the to correct that?

Right now the Google Analytics are useless to me (well anyone if my understanding is that it is a script protect issue) when it is on. It seems simple enough to catch this in the page code and correct it.

P.S.
I would be seeking to post code updates like this back but there is one thing about Git I have not figured out yet.

  1. Fork a Git repository.
  2. The original repository is updated.
  3. ??? how do I update my fork

I get how to submit changes back but not how to update the fork.

(Sometimes our tools make it so hard to focus on our code, you know what I mean?)

I don’t know of a way in code to “detect” and correct this. could be any number of stripped tags. The only thing to do is turn the setting off. If you don’t have access to the CF administrator, turn it off in your Application.cfc for your site.

this.scriptProtect = "none|all|*list*"

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Yes, that looks like the only option also. It is itching in my mind to use the URL in Application.cfc to set the protect based on is the login Admin or not. That will not work though because it is Application scope when this is translated so other live sessions will mess with that as people hit the live side. In the end it means we hope all the modules I use have properly protected things on the dev end of code. :slight_smile:

Thanks

P.S.

Will the Application.cfc file be overwritten on any updates?

If you want Google analytics, there is a module on Forgebox for it.

Unlikely. I think the updaters only affect the core modules. I’m sure we could try to default that setting in the Application.cfc for people who install the full site. For people who drop the modules in an existing application, we would have no control over their settings.

What method of installation were you using with your site?

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

Updates don’t affect application.cfc so not to mess with people’s setup.

Luis Majano
CEO
Ortus Solutions, Corp
Toll Free/Fax: 1-888-557-8057
Direct: 909-248-3408
www.ortussolutions.com
Twitter: @lmajano, @ortussolutions

Version 0.1, What’s up with the project? Is there anywhere that talks about what it is and how it works?

John, it is very self explanatory. When you install the module, it will create a admin section that you configure it with. Mind you I need to update the module to work with the new admin changes.

That’s all there is to it. What do you expect or would you like to see in it?

John you can also use the global HTML section to drop in your google anatlitcs code or any code per say

Luis Majano
CEO
Ortus Solutions, Corp
Toll Free/Fax: 1-888-557-8057
Direct: 909-248-3408
www.ortussolutions.com
Twitter: @lmajano, @ortussolutions

I am using the global HTML section currently and learning to use the Google API. Here is a link to my blog to let anyone interested know what is available in the API.

IMO a “good CMS” is about campaigns, allowing for monitization or audience analytics. The reason for the research is to help make ContentBox more than just a CMS but rather a rich and powerful business solution. Posting content is half the job. Reaching the audience and knowing what is going on is the other half. This will be done with analytics, socializing tools and API integrations. (My wish list would be to dedicate myself full time to creating these tools for the community and beyond.)

P.S.
I am also thinking the global HTML is not working as desired for two reasons.

  1. The hit count on ContentBox admin doesn’t match the hit count on Google Analytics. They are much lower in numbers.
  2. Google Analytics has a section called “Real-Time” in the admin screen. I watch the hit count climb on the ContentBox admin screen but it doesn’t show activity on the GA screen.

Hmm, not sure, the update bit is on the viewing page, so every time somebody hits the page it logs

signature0.jpg

Luis F. Majano
CEO
Ortus Solutions, Corp
www.ortussolutions.com

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

Social: twitter.com/lmajano facebook.com/lmajano

The difference in ContentBox and GA is not a ContentBox issue, this is with all websites.

OK, in the case of ContentBox, what is the difference. It is an issue but I can agree that it is not a ContentBox bug. Yet, if the numbers do not match up and there is no explanation then we will have PR issues with our site owners. :slight_smile: It is good to be able to explain these things.

First of all, is Google counting ALL hits or unique visitors? Also Google isn’t going to count bot like itself indexing the page that don’t run JavaScript, but ContentBox will. I’ve also found that GA is always a bit behind due to the asynchronous nature of their huge data sets. As long as you can confirm that the Ajax call is going out to GA on every page load I wouldn’t worry about it. Debugging the internals of GA is a battle you can’t win.

Thanks!

~Brad

ColdBox Platform Evangelist
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com

I am more after the business information I get from GA. It’s not about the itch of solving the technical differences personally. My goal is to run some of my CMS sites like a business which means understanding what is happening with analytics. If there is a way to get anything near as close to GA then we may go that way.

Note: In another post we are looking at seeing what we can do without GA. We are also looking at the GA API to see what we can retrieve that way.

John,

The problem is that GA relies on JavaScript to capture what it needs, any device who doesn’t use JS will not be captured by GA, nor will any bots, search engines and other things be counted in actual hits.

There are many factors involved in the stats, but at the end of the day, most hosts these days or at least decent hosts provide their clients with SmarterStats that provide more accurate information about your site than GA does. But then SmarterStats isn’t 100% accurate either.

This will explain it much better.

http://help.smartertools.com/SmarterStats/v7/Default.aspx?qq=%2fSmarterStats%2fv7%2fTopics%2fConcepts%2fGoogleAnalyticsComparison.aspx

I perceive we have different definitions of what a bug or debugging are. :slight_smile:

Would it be helpful if ContentBox ignored bots? I have a script that is pretty good at that. (And personally I don’t want bot hits to show in my count… thinking others would feel the same.)