From mboxrd@z Thu Jan 1 00:00:00 1970 From: ishi soichi Subject: Google Analytics tracking code for org-export-as-html Date: Wed, 1 Jun 2011 12:10:51 +0900 Message-ID: Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=bcaec51dd0ef38aa1404a49dde48 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:34664) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRbph-0003to-5t for emacs-orgmode@gnu.org; Tue, 31 May 2011 23:10:58 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QRbpe-0004KG-MN for emacs-orgmode@gnu.org; Tue, 31 May 2011 23:10:56 -0400 Received: from mail-pz0-f41.google.com ([209.85.210.41]:51076) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRbpe-0004Jh-5O for emacs-orgmode@gnu.org; Tue, 31 May 2011 23:10:54 -0400 Received: by pzk4 with SMTP id 4so2845237pzk.0 for ; Tue, 31 May 2011 20:10:52 -0700 (PDT) List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org --bcaec51dd0ef38aa1404a49dde48 Content-Type: text/plain; charset=ISO-8859-1 Hi. I would like to add a Google Analytics tracking code to the exported html file from an org-file. According to the instruction of GAnalytics, the tracking code must be right before "" tag. And I assume it's OK as long as the code is between and . The tracking code needs to be in the html file every time I export it as html. So, I need to somehow add the code segment in the org-file. #+BEGIN_HTML ... #+END_HTML This seems to add whatever between to a location after tag. Is there anyway to achieve this? soichi --bcaec51dd0ef38aa1404a49dde48 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi. I would like to add a Google Analytics tracking code to the exported ht= ml file from an org-file.
According to the instruction of GAnalytics, t= he tracking code must be right before "</head>" tag. And I = assume it's OK as long as the code is between <head> and </hea= d>.

The tracking code needs to be in the html file every ti= me I export it as html. =A0So, I need to somehow add the code segment in th= e org-file.

#+BEGIN_HTML
...
#+END_HTML

This seems to add whatever b= etween to a location after <body> tag.=A0

Is= there anyway to achieve this?

soichi
--bcaec51dd0ef38aa1404a49dde48-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tomas Hlavaty Subject: Re: Google Analytics tracking code for org-export-as-html Date: Wed, 01 Jun 2011 07:06:34 +0200 Message-ID: <87oc2ii1id.fsf@logand.com> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from eggs.gnu.org ([140.186.70.92]:41836) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRe5q-00054R-Kw for emacs-orgmode@gnu.org; Wed, 01 Jun 2011 01:35:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QRe5p-0003Tm-8H for emacs-orgmode@gnu.org; Wed, 01 Jun 2011 01:35:46 -0400 Received: from [212.110.171.227] (port=43912 helo=brahms.logand.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRe5o-0003TK-SN for emacs-orgmode@gnu.org; Wed, 01 Jun 2011 01:35:45 -0400 Received: from tom by brahms.logand.com with local (Exim 4.69) (envelope-from ) id 1QRdbN-00028L-4F for emacs-orgmode@gnu.org; Wed, 01 Jun 2011 06:04:17 +0100 In-Reply-To: (ishi soichi's message of "Wed, 01 Jun 2011 05:10:51 +0200 (CEST)") List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: emacs-orgmode@gnu.org Hi soichi, > Hi. I would like to add a Google Analytics tracking code to the > exported html file from an org-file. ah, please don't do that. > code is between and . You could sneak it in using #+STYLE or org-publish-project-alist :style. Cheers, Tomas From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: Google Analytics tracking code for org-export-as-html Date: Wed, 01 Jun 2011 09:42:21 +0200 Message-ID: <80r57eq9pe.fsf@somewhere.org> References: <87oc2ii1id.fsf@logand.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Tomas, Tomas Hlavaty wrote: >> Google Analytics code is between and . > > You could sneak it in using #+STYLE or org-publish-project-alist :style. Wouldn't it make more sense to put it in `org-export-html-scripts'? (untested) Best regards, Seb -- Sebastien Vauban From mboxrd@z Thu Jan 1 00:00:00 1970 From: ishi soichi Subject: Re: Google Analytics tracking code for org-export-as-html Date: Thu, 2 Jun 2011 09:52:33 +0900 Message-ID: References: <87oc2ii1id.fsf@logand.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=bcaec51f8fd975aaf704a4b00de0 Return-path: Received: from eggs.gnu.org ([140.186.70.92]:38953) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRw9N-0001tS-Bd for emacs-orgmode@gnu.org; Wed, 01 Jun 2011 20:52:38 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QRw9M-00075U-A3 for emacs-orgmode@gnu.org; Wed, 01 Jun 2011 20:52:37 -0400 Received: from mail-px0-f179.google.com ([209.85.212.179]:35872) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRw9L-00074i-IO for emacs-orgmode@gnu.org; Wed, 01 Jun 2011 20:52:35 -0400 Received: by pxi2 with SMTP id 2so217922pxi.38 for ; Wed, 01 Jun 2011 17:52:34 -0700 (PDT) In-Reply-To: <87oc2ii1id.fsf@logand.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Tomas Hlavaty Cc: emacs-orgmode@gnu.org --bcaec51f8fd975aaf704a4b00de0 Content-Type: text/plain; charset=ISO-8859-1 Thanks for your reply. >> Hi. I would like to add a Google Analytics tracking code to the >> exported html file from an org-file. >ah, please don't do that. May I ask why I shouldn't do this ? 2011/6/1 Tomas Hlavaty > Hi soichi, > > > Hi. I would like to add a Google Analytics tracking code to the > > exported html file from an org-file. > > ah, please don't do that. > > > code is between and . > > You could sneak it in using #+STYLE or org-publish-project-alist :style. > > Cheers, > > Tomas > > --bcaec51f8fd975aaf704a4b00de0 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Thanks for your reply.
=

>> Hi. I would like to = add a Google Analytics tracking code to the
>> exported html file = from an org-file.

>ah, please don't do that.

May I ask w= hy I shouldn't do this ?



2011/6/1 Tomas Hlavaty <tom@logand.com>
Hi soichi,

> Hi. I would like to add a Google Analytics tracking code to the
> exported html file from an org-file.

ah, please don't do that.

> code is between <head> and </head>.

You could sneak it in using #+STYLE or org-publish-project-alist :sty= le.

Cheers,

Tomas


--bcaec51f8fd975aaf704a4b00de0-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: ishi soichi Subject: Re: Google Analytics tracking code for org-export-as-html Date: Thu, 2 Jun 2011 16:33:28 +0900 Message-ID: References: <87oc2ii1id.fsf@logand.com> <87k4d4zo3y.fsf@logand.com> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=bcaec51dd0ef38e12b04a4b5a7be Return-path: Received: from eggs.gnu.org ([140.186.70.92]:37908) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QS2PM-0003XN-5W for emacs-orgmode@gnu.org; Thu, 02 Jun 2011 03:33:33 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QS2PK-0004F9-RI for emacs-orgmode@gnu.org; Thu, 02 Jun 2011 03:33:31 -0400 Received: from mail-px0-f179.google.com ([209.85.212.179]:41141) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QS2PK-0004E1-EJ for emacs-orgmode@gnu.org; Thu, 02 Jun 2011 03:33:30 -0400 Received: by pxi2 with SMTP id 2so356809pxi.38 for ; Thu, 02 Jun 2011 00:33:28 -0700 (PDT) In-Reply-To: <87k4d4zo3y.fsf@logand.com> List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Tomas Hlavaty , emacs-orgmode@gnu.org --bcaec51dd0ef38e12b04a4b5a7be Content-Type: text/plain; charset=ISO-8859-1 Oh, I see. It's a simple reason. Thanks for pointing it out. I will be careful. soichi 2011/6/2 Tomas Hlavaty > Hi soichi, > > > May I ask why I shouldn't do this ? > > data protection, privacy. Some people don't like being spied on, esp by > untrusted third-parties not related to your website content. But this > goes beyond your original technical question. > > Cheers, > > Tomas > --bcaec51dd0ef38e12b04a4b5a7be Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Oh, I see. =A0It's a simple reason. =A0Thanks for pointing it out. =A0I= will be careful.

soichi

2011/6/2 Tomas Hlavaty <tom@logand.com>
Hi soichi,

> May I ask why I shouldn't do this ?

data protection, privacy. =A0Some people don't like being spied o= n, esp by
untrusted third-parties not related to your website content. =A0But this goes beyond your original technical question.

Cheers,

Tomas

--bcaec51dd0ef38e12b04a4b5a7be--