In Mezzanine there's a template called "footer_scripts.html" that's
included at the bottom of every page, usually within "base.html", that
contains the Google Analytics code among other things. It looks like this
was removed from Drum - my best guess is that since Drum started out as a
demo/tutorial, all code that wasn't critical to the learning process was
removed.

You can see I've restored it in Drum just now, here:

https://github.com/stephenmcd/drum/commit/acda995db49ded4c7178f862344713c6d7c4b11c

It looks like in your project the corresponding file is
"customizations/templates/base.html" - you'll need to add the same line to
the end of it.


On Tue, Sep 2, 2014 at 5:34 AM, <[email protected]> wrote:

>
> Hello guys,
>
> I have a site based in Drum and I am trying to make Google Analytics work.
> I have included my GOOGLE_ANALYTICS_ID a couple of days ago in the admin
> area of the site, but up to now Google Analytics shows the message
> "tracking code not installed".
> Looking at the html code of my site I cannot find the related Google
> Analytics code. Not sure if it is not part of Drum or if this code was
> deleted by mistake (I asked someone to develop some features to my site).
>
> So my question is: What is the right way to include Google Analytics code
> into my project?
>
> Currently the directory structure of my site looks like below:
>
> │   .gitignore
>>
>> │   .hgignore
>>
>> │   dev.db
>>
>> │   fabfile.py
>>
>> │   local_settings.py
>>
>> │   manage.py
>>
>> │   requirements.txt
>>
>> │   settings.py
>>
>> │   urls.py
>>
>> │   wsgi.py
>>
>> │   __init__.py
>>
>> │
>>
>> ├───customizations
>>
>> │   │   __init__.py
>>
>> │   │   __init__.pyc
>>
>> │   │
>>
>> │   ├───static
>>
>> │   │   ├───css
>>
>> │   │   │       drum.css
>>
>> │   │   │
>>
>> │   │   └───img
>>
>> │   │           consoc-logo.png
>>
>> │   │
>>
>> │   └───templates
>>
>> │       │   base.html
>>
>> │       │
>>
>> │       ├───accounts
>>
>> │       │       account_profile.html
>>
>> │       │
>>
>> │       ├───generic
>>
>> │       │       threadedcomment_list.html
>>
>> │       │
>>
>> │       └───links
>>
>> │               post_form.html
>>
>> │
>>
>> ├───deploy
>>
>> │       crontab
>>
>> │       gunicorn.conf.py.template
>>
>> │       local_settings.py.template
>>
>> │       nginx.conf
>>
>> │       supervisor.conf
>>
>> │
>>
>> └───locale
>>
>>     └───pt_BR
>>
>>         └───LC_MESSAGES
>>
>>                 django.mo
>>
>>                 django.po
>>
>>  The code required by google is:
>
> <script>
>>
>> (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
>>   (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new
>> Date();a=s.createElement(o),
>>
>> m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
>>   })(window,document,'script','//www.google-analytics.com/analytics.js
>> ','ga');
>>   ga('create', 'UA-XXXXXXXX-X', 'auto');
>>   ga('send', 'pageview');
>> </script>
>
>
> Thanks in advance,
>
>
>
> --
> You received this message because you are subscribed to the Google Groups
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Stephen McDonald
http://jupo.org

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to