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 Tue, 24 Jul 2012 00:47:25 GMT
On Sun, Jul 22, 2012 at 1:30 PM, Dave Fisher <dave2wave@comcast.net> wrote:
>
> On Jul 22, 2012, at 10:08 AM, Rob Weir wrote:
>
>> On Sun, Jul 22, 2012 at 12:09 PM, Dave Fisher <dave2wave@comcast.net> wrote:
>>>
>>> On Jul 22, 2012, at 8:49 AM, Kay Schenk wrote:
>>>
>>>> On Sun, Jul 22, 2012 at 8:38 AM, Rob Weir <robweir@apache.org> 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" -->
>>>>>
>>>>
>>>> I like this approach better...
>>>>
>>>>
>>>>>>
>>>>>> 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.  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
>>>>>
>>>>> 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.
>>>>>
>>>>
>>>>
>>>> ???? OK, let's identify these pages and fix first.
>>>
>>
>> We have over 1000 pages with broken <head>'s.  The main issue is they
>> don't have a <title>, and having a <title> is mandatory in HTML.
>> Browsers don't treat it as a fatal error, but it does lead to
>> suboptimal treatment in search engines.  Aside from lacking an
>> important clue about the contents of the page, the search engine also
>> expects to use the title to display in the search results page.  It
>> also breaks things when user bookmarks page, sends to a friend in FB
>> or Google+, etc.  Generally a bad thing not to have a <title>.
>
> OK, not the same as no head. Let me think about this. There are two approaches.
>
> (1) Identify the pages and insert <title> ... </title> tags in the source.
Preferred, but tedious.
>
> (2) Extract the title from the source and assure that one is always provided from the
view.pm functions to the template.
>
> I'll look at (2). It will involve perl in lib/view.pm along with changes to the templates.
>
> (a) In single_narrative check for headers.title and if missing create one.
> (b) In html_page. Extract the title and remove from the header extracted from the source
html. If missing create a title.
> (c) Skeleton template is changed to expect the headers.title to be set.
>
> OK. Some more to do. I'll let you know if I am ready tomorrow night or Tuesday. This
one is complex enough that I am going to work on it locally beforehand.
>

Hi Dave -- Are we doing this tonight?

-Rob

> Any other head items that you would like to control from mdtext and or html heads?
>
> Regards,
> Dave
>
>>
>> Here's a list of the pages currently lacking a title:
>>
>> https://docs.google.com/spreadsheet/ccc?key=0Av4Lhq3W5zKodHd6OVVEcGZISVl2Nlpzd2I1NTZhNVE
>>
>>> And if any are found please check that there is no header in the deployed www.openoffice.org
version.
>>>
>>> Any identified are different issue and perhaps a separate issue.
>>>
>>> Rob, do you have examples? And how do those look on the site?
>>>
>>>>
>>>>
>>>>>
>>>>>> 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 ....
>>>>>
>>>>
>>>>
>>>> hmmm... an interesting observation. We probably should attempt to remove
>>>> what's in place first before applying the new template I would think.
>>>
>>> Agreed.
>>>
>>> Regards,
>>> Dave
>>>
>>>>
>>>
>>>>
>>>>
>>>>>
>>>>>
>>>>> 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.
>>>>>
>>>>>
>>>>>> 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
>>>>>>
>>>>>
>>>>
>>>>
>>>>
>>>> --
>>>> ----------------------------------------------------------------------------------------
>>>> MzK
>>>>
>>>> "I'm just a normal jerk who happens to make music.
>>>> As long as my brain and fingers work, I'm cool."
>>>>                             -- Eddie Van Halen
>>>
>

Mime
View raw message