incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Weir <robw...@apache.org>
Subject Re: Google Analytics Calls [Was: Re: CSS debugging (ability to read Polish might help)]
Date Sun, 22 Jul 2012 16:48:12 GMT
On Sun, Jul 22, 2012 at 12:03 PM, Dave Fisher <dave2wave@comcast.net> wrote:
>
> On Jul 22, 2012, at 8:38 AM, Rob Weir wrote:
>
>> On Sat, Jul 21, 2012 at 7:16 PM, Dave Fisher <dave2wave@comcast.net> wrote:
>>> Hi Rob,
>>>
>>> Are you ready to for Google Analytics on every page of ooo-site? If so, then
the plan is below - which will finish a change that Ariel started.
>>>
>>> On Jul 21, 2012, at 3:17 PM, Rob Weir wrote:
>>>
>>>> On Sat, Jul 21, 2012 at 5:39 PM, Kay Schenk <kay.schenk@gmail.com>
wrote:
>>>>> On Sat, Jul 21, 2012 at 2:33 PM, Dave Fisher <dave2wave@comcast.net>
wrote:
>>>>>
>>>>>> Hi Kay,
>>>>>>
>>>>>> I continued these fixes through the rest of the top level of the
PL site.
>>>>>>
>>>>>
>>>>> well good -- how industrious of you! :)
>>>>>
>>>>>
>>>>>>
>>>>>> Rob - It looks like this has to do with bad changes in the far past
around
>>>>>> google analytics.
>>>>>>
>>>>>
>>>>> I saw that Rob intended (and did remove some old stuff) but I don't know
if
>>>>> that is what caused the problem.  I think it was bad HTML syntax to begin
>>>>> with that caused the automatic insertions (for the content div tag) to
>>>>> function incorrectly.
>>>>>
>>>>
>>>> Right.  I've never seen this page look right.   You can try removing
>>>> the GA code, but nothing there touches CSS, and it comes after both of
>>>> the CSS imports, so I don't see how it could be the issue here.
>>>>
>>>>>
>>>>>> Question: Are you inserting google analytic code into every header
and is
>>>>>> it always the same? If so, then the proper approach would be to make
that
>>>>>> part of the templates. Perhaps as part of the footer template?
>>>>>>
>>>>
>>>>
>>>> It is supposed to be the last item in the <head>.  It wasn't clear
>>>> whether this could be added via the template.
>>>
>>> Here is part of ooo-site/templates/skeleton.html
>>>
>>> {% if header %}
>>> {% autoescape off %}{{ header }}{% endautoescape %}{% else %}
>>> <title>{% block title %}{{ headers.title }}{% endblock %}</title>
>>> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
>>> {% if headers.css %}<link href="{{ headers.css }}" rel="stylesheet" type="text/css">{%
endif %}
>>>
>>> <script type="text/javascript">
>>>    var _gaq = _gaq || [];
>>>    _gaq.push(['_setAccount', 'UA-30193653-1']);
>>>    _gaq.push(['_setDomainName', 'openoffice.org']);
>>>    _gaq.push(['_trackPageview']);
>>>
>>>    (function() {
>>>        var ga = document.createElement('script'); ga.type = 'text/javascript';
ga.async = true;
>>>        ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www')
+ '.google-analytics.com/ga.js';
>>>        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga,
s);
>>>    })();
>>> </script>
>>> {% endif %}
>>>
>>> Here header is null if the file is mdtext and not null otherwise.
>>>
>>> If the {% endif %} is moved above the script then it will always be added.
>>>
>>> I would instead change this to:
>>>
>>> {% if header %}
>>> {% autoescape off %}{{ header }}{% endautoescape %}{% else %}
>>> <title>{% block title %}{{ headers.title }}{% endblock %}</title>
>>> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
>>> {% if headers.css %}<link href="{{ headers.css }}" rel="stylesheet" type="text/css">{%
endif %}
>>> {% endif %}
>>> <!--#include virtual="/google_analytics.ssi" -->
>>>
>>> And then put the google analytics code in: ooo-site/trunk/content/google_analytics.ssi
>>>
>>
>> It should be possible to work with MDText as well.
>
> MDText uses the same skeleton.html template.
>
> $ more html_page.html
> {% extends "skeleton.html" %}
>   {% block content %}{% autoescape off %}{{ content }}{% endautoescape %}{% endblock
%}
> {$ endextends $}
>
> $ more single_narrative.html
> {% extends "skeleton.html" %}
>
> The html_page template overrides the following in skeleton.html.
>
>     {% block content %}{{ content|markdown }}{% endblock %}
>
>
>>  I added it this
>> way to the incubator site a while ago:
>>
>> https://svn.apache.org/repos/asf/incubator/ooo/site/trunk/templates/skeleton.html
>
> I see the following in that file:
>
> <meta name="google-site-verification" content="wIHUbgA-JO5PaJHpR5jeI8N9E2y2iF94o4oUwpaAdk8"
/>
>
> Do we need to add something like that to the headers on ooo-site?
>

This needs to be on the home page.  So we already have it on
openoffice.org/index.html.  But that is because this is HTML, so
adding it was easy.  I didn't see anyway to add a meta tag to the
<head> of an markdown text page, so with the incubator site it is
added to every page.  So more than needed, but harmless.  If you know
a more elegant way, I'd love to hear it.  (IMHO, writing perl code to
treat the home page as an exception and adding this single tag via the
template would not be more elegant.)

>>
>> The instructions from Google say to put it immediately before the
>> closing </head>.  We have additional complexity here, since some HTML
>> pages don't have a <head> and some do.
>
> All of the html pages that go through this CMS template will be made to have a <head>.
Any that don't are SSI includes.
>
> See ooo-site/trunk/lib/path.pm
>
> our @patterns = (
>         [qr!doctype.mdtext$!, single_narrative => { template => "doctype.html"
}],
>         [qr!brand.mdtext$!, single_narrative => { template => "brand.html" }],
>         [qr!footer.mdtext$!, single_narrative => { template => "footer.html" }],
>         [qr!topnav.mdtext$!, single_narrative => { template => "navigator.html"
}],
>         [qr!leftnav.mdtext$!, single_narrative => { template => "navigator.html"
}],
>         [qr!rightnav.mdtext$!, single_narrative => { template => "navigator.html"
}],
>         [qr!\.mdtext$!, single_narrative => { template => "single_narrative.html"
}],
>         [qr!\.html$!, html_page => { template => "html_page.html" }],
>         [qr!\.htm$!, html_page => { template => "html_page.html" }],
> ) ;
>
> Anything that does not match those patterns is moved as is.
>
> single_narrative and html_page are functions in ooo-site/trunk/lib/view.pm.
>
> I've shown the two important templates above - html_page.html and single_narrative.html.
The special 6 mdtext filenames have one of four special templates.
>
>>
>>> Warning this is a sledgehammer and at a similar moment all of the google analytics
code can be removed. I suppose done properly the doubles won't matter much, but ....
>>>
>>
>> Right.  So we should coordinate on a date/time.   I can prepare the
>> unwrapping of the manual GA locally and be ready to check that in.
>> Then it should be a matter of checking in your template changes, and
>> forcing an update on the server.
>
> On the agreed date:
>
> (1) Ask that no one publish any ooo-site changes.
> (2) You check in your staged changes and let those go through to staging.
> (3) The template changes are checked in, triggering a staging sledgehammer.
> (4) Review staging build.
> (5) Publish
>
> This coming week is good. I suggest one evening early in the week. (The following week
is bad as I have business travel to corp HQ)
>

I'll aim to have my changes ready locally for tomorrow night.

-Rob

> Out for the day today.
>
> Regards,
> Dave
>
>>
>>
>>> BTW - This was Ariel's change to add GS to the head in the template/skeleton
- it's nice to see some else making a change!
>>>
>>> ------------------------------------------------------------------------
>>> r1347646 | arielch | 2012-06-07 07:41:31 -0700 (Thu, 07 Jun 2012) | 1 line
>>>
>>> Add Google Analytics code to template
>>> ------------------------------------------------------------------------
>>> r1346837 | arielch | 2012-06-06 04:56:53 -0700 (Wed, 06 Jun 2012) | 1 line
>>>
>>> Add support for custom css per file
>>>
>>> Should I JFDI these fixes or wait? It doesn't look like you've manually added
it to too many pages.
>>>
>>> Here are the files that need editing to remove legacy and Rob's additions.
>>>
>>> $ find . -name "*.html" -type f -exec grep -l google-analytics.com {} \;
>>> ./about/index.html
>>> ./ar/index.html
>>> ./ast/index.html
>>> ./contact_us.html
>>> ./cs/index.html
>>> ./da/01-10-2003 OpenOffice.org 1.1.html
>>> ./da/2.3.0_og_SELinux.html
>>> ./da/21-10-2003 Dansk OpenOffice.org 1.1.html
>>> ./da/about-documentation.html
>>> ./da/about-downloads.html
>>> ./da/about-helping.html
>>> ./da/about-issuezilla.html
>>> ./da/about-mailinglist.html
>>> ./da/about-product.html
>>> ./da/adresses.html
>>> ./da/faq.html
>>> ./da/index.html
>>> ./da/leverandoerydelser.html
>>> ./da/links.html
>>> ./da/opendocument.html
>>> ./da/referencer.html
>>> ./da/translation.html
>>> ./de/aoo34.html
>>> ./de/index.html
>>> ./de/index_new.html
>>> ./development/releases/eol.html
>>> ./development/releases/index.html
>>> ./distribution/cdrom/distributors.html
>>> ./distribution/cdrom/index.html
>>> ./distribution/index.html
>>> ./documentation/index.html
>>> ./download/archive.html
>>> ./download/checksums/3.4.0_checksums.html
>>> ./download/common/instructions.html
>>> ./download/contribute.html
>>> ./download/index-tr.html
>>> ./download/index.html
>>> ./download/legacy/index.html
>>> ./download/legacy/notes.html
>>> ./download/legacy/other.html
>>> ./download/notes.html
>>> ./download/other.html
>>> ./download/sdk.html
>>> ./download/test/index_new_dl.html
>>> ./download/test/index_newfs_dl.html
>>> ./download/test/other_new_dl.html
>>> ./download/test/other_print.html
>>> ./download/windows-odf/index.html
>>> ./el/about-cdrom.html
>>> ./el/about-documentation.html
>>> ./el/about-downloads.html
>>> ./el/about-helping.html
>>> ./el/about-issuezilla.html
>>> ./el/about-legal.html
>>> ./el/about-mailinglist.html
>>> ./el/about-spellcheck.html
>>> ./el/adresses.html
>>> ./el/background.html
>>> ./el/contr_spellch.html
>>> ./el/credits.html
>>> ./el/downloads.html
>>> ./el/faq.html
>>> ./el/index.html
>>> ./el/old-downloads.html
>>> ./el/targets.html
>>> ./el/test.html
>>> ./el/test2.html
>>> ./el/test3.html
>>> ./el/translate3.html
>>> ./es/descargar/index.html
>>> ./es/extensiones/index.html
>>> ./es/index-new.html
>>> ./es/index.html
>>> ./es/noticias/aoo34.html
>>> ./es/noticias/index.html
>>> ./es/participar/index.html
>>> ./es/social/index.html
>>> ./es/soporte/documentacion.html
>>> ./es/soporte/index.html
>>> ./es/soporte/listas.html
>>> ./extensions/index.html
>>> ./fi/index.html
>>> ./fi/mallit.html
>>> ./fi/tuleva341/index.html
>>> ./fr/about-downloads.html
>>> ./fr/index.html
>>> ./fr/Telecharger/index.html
>>> ./gl/index.html
>>> ./hu/about-documentation.html
>>> ./hu/about-downloads.html
>>> ./hu/about-issues.html
>>> ./hu/about-product.html
>>> ./hu/about-spellcheck.html
>>> ./hu/aoo34.html
>>> ./hu/background.html
>>> ./hu/base.html
>>> ./hu/calc.html
>>> ./hu/draw.html
>>> ./hu/get_legal-hu.html
>>> ./hu/impress.html
>>> ./hu/index.html
>>> ./hu/localisation.html
>>> ./hu/math.html
>>> ./hu/press_kit.html
>>> ./hu/reqts.html
>>> ./hu/reviews.html
>>> ./hu/suite.html
>>> ./hu/whatsnew-2.0.html
>>> ./hu/whatsnew-3.0.html
>>> ./hu/writer.html
>>> ./index.html
>>> ./it/download/3.4.0/download340.html
>>> ./it/download/index.html
>>> ./it/index.html
>>> ./it/stampa/comunicati/aoo34-1M.html
>>> ./it/stampa/comunicati/aoo34.html
>>> ./ja/download/index.html
>>> ./ja/index.html
>>> ./license.html
>>> ./lingucomponent/download_dictionary.html
>>> ./lv/index.html
>>> ./marketing/marketing_bouncer.html
>>> ./mk/3.0.html
>>> ./mk/3.1.0.html
>>> ./mk/3.1.1.html
>>> ./mk/index.html
>>> ./news/aoo34-1M.html
>>> ./news/aoo34.html
>>> ./news/index.html
>>> ./nl/downloaden.html
>>> ./nl/index.html
>>> ./no/index.html
>>> ./pl/addons.index.html
>>> ./pl/archive.html
>>> ./pl/contact.developers.html
>>> ./pl/contact.users.html
>>> ./pl/docs.index.html
>>> ./pl/docs.licencja.html
>>> ./pl/help.install.html
>>> ./pl/helping.credits.html
>>> ./pl/helping.how.html
>>> ./pl/index.html
>>> ./pl/marketing.logo.html
>>> ./pl/product.download.html
>>> ./pl/product.download.lpack.html
>>> ./pl/product.download1.html
>>> ./pl/product.other.html
>>> ./pl/product.sources.html
>>> ./pl/www/addons.index.html
>>> ./pl/www/archive.html
>>> ./pl/www/contact.developers.html
>>> ./pl/www/contact.users.html
>>> ./pl/www/docs.index.html
>>> ./pl/www/docs.licencja.html
>>> ./pl/www/help.install.html
>>> ./pl/www/helping.credits.html
>>> ./pl/www/helping.how.html
>>> ./pl/www/index.html
>>> ./pl/www/marketing.logo.html
>>> ./porting/mac/index.html
>>> ./projects/accepted.html
>>> ./projects/incubator.html
>>> ./projects/index.html
>>> ./projects/native-lang.html
>>> ./pt-br/index.html
>>> ./pt-br/news/aoo34.html
>>> ./qa/issue_handling/submission_gateway.html
>>> ./qa/ooQAReloaded/Docs/QA-Reloaded-BasicRules.html
>>> ./ro/descarca_ro.html
>>> ./ro/descarc─â_ro.html
>>> ./ro/langtools.html
>>> ./ro/localization.html
>>> ./ru/about-downloads.html
>>> ./ru/index.html
>>> ./security/bulletin.html
>>> ./sk/index.html
>>> ./social/index.html
>>> ./sr/index.html
>>> ./sr/lat/prosirenja/slovima/index.html
>>> ./sr/lat/stajeto/index.html
>>> ./sr/project_tools.html
>>> ./support/index.html
>>> ./sv/index.html
>>> ./welcome/readme.html
>>> ./zh/index.html.html
>>> ./zh/new/index.html.html
>>> ./zh-cn/index.html
>>> ./zh-cn/news/aoo34-1M.html
>>> ./zh-cn/news/aoo34.html
>>> ./zh-cn/news/index.html
>>> ./zh-tw/index.html
>>> ./zh-tw/news/aoo34-1M.html
>>> ./zh-tw/news/aoo34.html
>>> ./zh-tw/news/index.html
>>>
>>>
>>> Regards,
>>> Dave
>>>
>>>>
>>>>>> Regards,
>>>>>> Dave
>>>>>>
>>>>>>
>>>>>> On Jul 21, 2012, at 1:26 PM, Kay Schenk wrote:
>>>>>>
>>>>>>> On Fri, Jul 20, 2012 at 3:23 PM, Dave Fisher <dave2wave@comcast.net>
>>>>>> wrote:
>>>>>>>
>>>>>>>>
>>>>>>>> On Jul 20, 2012, at 8:35 AM, Andrea Pescetti wrote:
>>>>>>>>
>>>>>>>>> Rob Weir wrote:
>>>>>>>>>> http://www.openoffice.org/pl/
>>>>>>>>>> there is some CSS issue causing the text to be white-on-white
or
>>>>>>>>>> something.
>>>>>>>>>> I stared at it but did not see the source of the
problem.
>>>>>>>>>
>>>>>>>>> The source of the problem is the first non-comment line
here:
>>>>>>>>> http://www.openoffice.org/css/ooo.css
>>>>>>>>>
>>>>>>>>> body {
>>>>>>>>> color: white;
>>>>>>>>> ...
>>>>>>>>> }
>>>>>>>>>
>>>>>>>>> but the reason we set it to white (to override it, of
course, in all
>>>>>>>> other languages through specialized CSS classes) is not clear
to me.
>>>>>>>>
>>>>>>>> All the pages have some bad html.
>>>>>>>>
>>>>>>>> After the <body> tag there are the following on the
all PL site pages.
>>>>>>>>
>>>>>>>> </div>
>>>>>>>> </td></tr></table>
>>>>>>>>
>>>>>>>> Add the css for
>>>>>>>>
>>>>>>>> <td id="plcontent">
>>>>>>>>
>>>>>>>> to http://www.openoffice.org/pl/style.css
>>>>>>>>
>>>>>>>> The footer is missing on all the pages as well. So something
else is
>>>>>> wrong.
>>>>>>>>
>>>>>>>> There's some work, but I don't have time at the moment.
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>> Dave
>>>>>>>>
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>> Andrea.
>>>>>>>>
>>>>>>>>
>>>>>>> This is displaying correctly now I think.
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>> ----------------------------------------------------------------------------------------
>>>>>>> MzK
>>>>>>>
>>>>>>> "I would rather have a donkey that takes me there
>>>>>>> than a horse that will not fare."
>>>>>>>                                        -- Portuguese proverb
>>>>>>
>>>>>>
>>>>>
>>>>>
>>>>> --
>>>>> ----------------------------------------------------------------------------------------
>>>>> MzK
>>>>>
>>>>> "I would rather have a donkey that takes me there
>>>>> than a horse that will not fare."
>>>>>                                         -- Portuguese proverb
>>>
>

Mime
View raw message