To do that I included this in my main.gsp layout file:
<g:if test="${!GrailsUtil.isDevelopmentEnv()}">
//Analytics code goes here
</g:if>
Pretty simple test but it now saves me from sorting out what traffic I
generated myself and what is real traffic.
Hope this saves someone some time.
-warner
http://www.google.com/support/analytics/bin/answer.py?hl=en&answer=55481
If you are using the google analytics plugin, you can specify a test
account for dev vs. test. vs. prod in config.groovy
google.analytics.webPropertyID = "UA-xxxxxx-x"
> --
> You received this message because you are subscribed to the Google Groups "Grails Startup Support Group" group.
> To post to this group, send email to grails-startup...@googlegroups.com.
> To unsubscribe from this group, send email to grails-startup-suppo...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/grails-startup-support-group?hl=en.
>
>
-warner
> That's true, I had never set that up and I'm also not sure if the
> other analytics package I'm using (KISSMetrics) would allow me to do
> that.
>
Hi Warner,
Good call. We actually parameterize our id for analytics per environment, which allows us to track usage on pre-production sites as well.
Marc
~ ~ ~
Marc Palmer
Blog > http://www.anyware.co.uk
Twitter > http://twitter.com/wangjammer5
Grails Rocks > http://www.grailsrocks.com
Hadn't thought of that, that's a great idea. Especially as I'm getting
ready for a limited dev beta. Good to see what's working and what
isn't to tweak for the next phase.
(And I'll be signing up for your beta shortly now that day-job has
calmed down a bit.)
Thanks!
-warner
>
> Marc
>
>
>
> ~ ~ ~
> Marc Palmer
> Blog > http://www.anyware.co.uk
> Twitter > http://twitter.com/wangjammer5
> Grails Rocks > http://www.grailsrocks.com
>
>
>
>
>
>