librelist archives

« back to archive

Google Analytics

Google Analytics

From:
Roy Duff
Date:
2012-04-11 @ 18:50
Hi,

Google Analytics code shows up both in development version and production
version. I added Google Analytics code only to production part of
configuration file but still shows up in both areas any ideas...

Also how do I add code to the header, footer and CSS...


Thanks.

Re: [nesta] Google Analytics

From:
Graham Ashton
Date:
2012-04-12 @ 09:15
On 11 Apr 2012, at 19:50, Roy Duff wrote:

> Google Analytics code shows up both in development version and 
production version. I added Google Analytics code only to production part 
of configuration file but still shows up in both areas any ideas...

Hi Roy. How are you launching Nesta in development?

I just double checked my local copy of effectif.com and it behaves 
properly. I'm just using shotgun (version 0.9) like this:

    $ shotgun config.ru

If that doesn't shed any light on it, can we get access to the repo? We 
could check that your site behaves properly on somebody else's machine...

Cheers,
Graham

Re: [nesta] Google Analytics

From:
Roy Duff
Date:
2012-04-12 @ 11:36
Hi,

I use Nesta in development same as you: $ shotgun config.ru.

I am using Heroku and therefore not sure how or where the git repo is
stored as I just: git push heroku master and it works...

Another question I do have is, most of the files in the views folder are in
haml and sass.. I normally use just html and css.. I can not really find
much info on haml and sass and wondered if you have any ideas of where to
look.

Thanks. Roy.

On Thu, Apr 12, 2012 at 10:15 AM, Graham Ashton <graham@effectif.com> wrote:

> On 11 Apr 2012, at 19:50, Roy Duff wrote:
>
> > Google Analytics code shows up both in development version and
> production version. I added Google Analytics code only to production part
> of configuration file but still shows up in both areas any ideas...
>
> Hi Roy. How are you launching Nesta in development?
>
> I just double checked my local copy of effectif.com and it behaves
> properly. I'm just using shotgun (version 0.9) like this:
>
>    $ shotgun config.ru
>
> If that doesn't shed any light on it, can we get access to the repo? We
> could check that your site behaves properly on somebody else's machine...
>
> Cheers,
> Graham
>

Re: [nesta] Google Analytics

From:
Jake Subs
Date:
2012-04-12 @ 11:49
On 12 April 2012 12:36, Roy Duff <royduff84@gmail.com> wrote:
> Another question I do have is, most of the files in the views folder are in
> haml and sass.. I normally use just html and css.. I can not really find
> much info on haml and sass and wondered if you have any ideas of where to
> look.

The Haml website has really good documentation:
http://haml-lang.com/docs.html

And Sass too:
http://sass-lang.com/docs.html

There's lots of info out there about Sass. A nice intro is a
comparison of CSS preprocessors:

http://net.tutsplus.com/tutorials/html-css-techniques/sass-vs-less-vs-stylus-a-preprocessor-shootout/

Also plenty of Sass mixins on Github - just do a search for them.

I'm new to Sass myself and find the basic syntax (variables for colour
names, mixins for different browser extensions etc) very easy to pick
up and useful. Haml took me a little while to get used to but it is
nice and terse once you get used to it.

hth, Jake


-- 
[~] Jake Rayson
[w] www.jrayson.co.uk
[e] subs@growdigital.org
[t] @growdigital

Re: [nesta] Google Analytics

From:
Graham Ashton
Date:
2012-04-12 @ 11:46
On 12 Apr 2012, at 12:36, Roy Duff wrote:

> I use Nesta in development same as you: $ shotgun config.ru
> 
> I am using Heroku and therefore not sure how or where the git repo is 
stored as I just: git push heroku master and it works...

Okay; then it's stored on Heroku. Don't worry about it.

I can't reproduce your problem in development with a freshly created site 
either. If you really want to track down what's causing it for you, put 
some debugging print statements in this code (you'll need to find the 
files inside the nesta gem and edit those):

https://github.com/gma/nesta/blob/master/lib/nesta/config.rb#L66

I wouldn't worry though; having Google Analytics on localhost is not 
really a problem unless you spend hours navigating around your site. You 
can also filter localhost out of the reports in the Google Analytics admin
interface.

> Another question I do have is, most of the files in the views folder are
in haml and sass.. I normally use just html and css.. I can not really 
find much info on haml and sass and wondered if you have any ideas of 
where to look.

Googling "haml tutorial" turns up a bunch of links.

Here's a great site (running Nesta, as it goes) that's dedicated to Sass:

http://thesassway.com/

Re: [nesta] Google Analytics

From:
Roy Duff
Date:
2012-04-12 @ 16:46
I ended up going with Gaug.es for the time being anyway. But I managed to
play around with NestaCMS an for someone which hasn't used haml or sass
before here's what I came up with:
blog.royduff.com. It is still pretty basic but getting there.

On Thu, Apr 12, 2012 at 12:46 PM, Graham Ashton <graham@effectif.com> wrote:

> On 12 Apr 2012, at 12:36, Roy Duff wrote:
>
> > I use Nesta in development same as you: $ shotgun config.ru
> >
> > I am using Heroku and therefore not sure how or where the git repo is
> stored as I just: git push heroku master and it works...
>
> Okay; then it's stored on Heroku. Don't worry about it.
>
> I can't reproduce your problem in development with a freshly created site
> either. If you really want to track down what's causing it for you, put
> some debugging print statements in this code (you'll need to find the files
> inside the nesta gem and edit those):
>
> https://github.com/gma/nesta/blob/master/lib/nesta/config.rb#L66
>
> I wouldn't worry though; having Google Analytics on localhost is not
> really a problem unless you spend hours navigating around your site. You
> can also filter localhost out of the reports in the Google Analytics admin
> interface.
>
> > Another question I do have is, most of the files in the views folder are
> in haml and sass.. I normally use just html and css.. I can not really find
> much info on haml and sass and wondered if you have any ideas of where to
> look.
>
> Googling "haml tutorial" turns up a bunch of links.
>
> Here's a great site (running Nesta, as it goes) that's dedicated to Sass:
>
> http://thesassway.com/
>

Re: [nesta] Google Analytics

From:
Jake Subs
Date:
2012-04-12 @ 16:52
On 12 April 2012 17:46, Roy Duff <royduff84@gmail.com> wrote:
> But I managed to play around with NestaCMS an for someone which hasn't used
> haml or sass before here's what I came up with:
> blog.royduff.com. It is still pretty basic but getting there.

Nice, I like the handwritten font. Must have taken you ages ;)

-- 
[~] Jake Rayson
[w] www.jrayson.co.uk
[e] subs@growdigital.org
[t] @growdigital

Re: [nesta] Google Analytics

From:
Max Sadrieh
Date:
2012-04-12 @ 17:45
On Thu, Apr 12, 2012 at 12:52 PM, Jake Subs <subs@growdigital.org> wrote:
> On 12 April 2012 17:46, Roy Duff <royduff84@gmail.com> wrote:
>> But I managed to play around with NestaCMS an for someone which hasn't used
>> haml or sass before here's what I came up with:
>> blog.royduff.com. It is still pretty basic but getting there.
>
> Nice, I like the handwritten font. Must have taken you ages ;)
>

Just FYI, the handwritten font doesn't seem to work on Chrome (but it
does on Firefox).

Re: [nesta] Google Analytics

From:
Roy Duff
Date:
2012-04-12 @ 18:07
Max,

What OS are you using.. I checked on Firefox and Chrome on Linux and it
seems ok...

On Thu, Apr 12, 2012 at 6:45 PM, Max Sadrieh <max.sadrieh@gmail.com> wrote:

> On Thu, Apr 12, 2012 at 12:52 PM, Jake Subs <subs@growdigital.org> wrote:
> > On 12 April 2012 17:46, Roy Duff <royduff84@gmail.com> wrote:
> >> But I managed to play around with NestaCMS an for someone which hasn't
> used
> >> haml or sass before here's what I came up with:
> >> blog.royduff.com. It is still pretty basic but getting there.
> >
> > Nice, I like the handwritten font. Must have taken you ages ;)
> >
>
> Just FYI, the handwritten font doesn't seem to work on Chrome (but it
> does on Firefox).
>

Re: [nesta] Google Analytics

From:
Max Sadrieh
Date:
2012-04-12 @ 18:17
Roy,

Google Chrome (not Chromium) 18.0.1025.151 and Iceweasel 10.0.3, both
on on Debian sid.

-Max

PS: Just tested in Chromium and it seems to work. This might be an
issue with my Chrome configuration..

On Thu, Apr 12, 2012 at 2:07 PM, Roy Duff <royduff84@gmail.com> wrote:
> Max,
>
> What OS are you using.. I checked on Firefox and Chrome on Linux and it
> seems ok...
>
>
> On Thu, Apr 12, 2012 at 6:45 PM, Max Sadrieh <max.sadrieh@gmail.com> wrote:
>>
>> On Thu, Apr 12, 2012 at 12:52 PM, Jake Subs <subs@growdigital.org> wrote:
>> > On 12 April 2012 17:46, Roy Duff <royduff84@gmail.com> wrote:
>> >> But I managed to play around with NestaCMS an for someone which hasn't
>> >> used
>> >> haml or sass before here's what I came up with:
>> >> blog.royduff.com. It is still pretty basic but getting there.
>> >
>> > Nice, I like the handwritten font. Must have taken you ages ;)
>> >
>>
>> Just FYI, the handwritten font doesn't seem to work on Chrome (but it
>> does on Firefox).
>
>

Re: [nesta] Google Analytics

From:
Jake Subs
Date:
2012-04-12 @ 18:21
On 12 April 2012 18:45, Max Sadrieh <max.sadrieh@gmail.com> wrote:
> Just FYI, the handwritten font doesn't seem to work on Chrome

FWIW handwritten font displays okay on Chromium on Linux:
18.0.1025.142 (Developer Build 129054 Linux) Built on Ubuntu 11.10,
running on LinuxMint 12

-- 
[~] Jake Rayson
[w] www.jrayson.co.uk
[e] subs@growdigital.org
[t] @growdigital

Re: [nesta] Google Analytics

From:
Max Sadrieh
Date:
2012-04-12 @ 18:35
It seems to work on Google Chrome 20.0.1096.1 dev but not on
19.0.1084.15 beta. Once again, it might be me since it seems to work
fine on Chromium 18.0.1025.151 for me too.


On Thu, Apr 12, 2012 at 2:21 PM, Jake Subs <subs@growdigital.org> wrote:
> On 12 April 2012 18:45, Max Sadrieh <max.sadrieh@gmail.com> wrote:
>> Just FYI, the handwritten font doesn't seem to work on Chrome
>
> FWIW handwritten font displays okay on Chromium on Linux:
> 18.0.1025.142 (Developer Build 129054 Linux) Built on Ubuntu 11.10,
> running on LinuxMint 12
>
> --
> [~] Jake Rayson
> [w] www.jrayson.co.uk
> [e] subs@growdigital.org
> [t] @growdigital

Re: [nesta] Google Analytics

From:
Max Sadrieh
Date:
2012-04-11 @ 19:55
Hi Roy,

To add code  relatively painlessly, follow the documentation [1].

About your second problem, I can't find code that reads the production
subpart in the config.yml file and overrides the default settings.
Graham might be more helpful.

-Max

[1] http://nestacms.com/docs/design/editing-default-templates

On Wed, Apr 11, 2012 at 2:50 PM, Roy Duff <royduff84@gmail.com> wrote:
> Hi,
>
> Google Analytics code shows up both in development version and production
> version. I added Google Analytics code only to production part of
> configuration file but still shows up in both areas any ideas...
>
> Also how do I add code to the header, footer and CSS...
>
>
> Thanks.