Quantcast

diazo removing google analytics code?

classic Classic list List threaded Threaded
7 messages Options
David Bear David Bear
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

diazo removing google analytics code?

I have a plone 4.1 site where I have pasted the javascript code for google analytics in to the control panel -> site setup -> javascript for web stats section. But the javascript isn't making its way out to the browser, and therefore not to google either. I am suspecting that the diazo theme is removing the code.  Are there any pointers as to how I might troubleshoot this? 


--
David Bear
College of Public Programs at ASU
602-496-0424

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Larry Pitcher Larry Pitcher
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: diazo removing google analytics code?

On 12/20/2011 10:04 AM, David Bear wrote:

> I have a plone 4.1 site where I have pasted the javascript code for
> google analytics in to the control panel -> site setup -> javascript for
> web stats section. But the javascript isn't making its way out to the
> browser, and therefore not to google either. I am suspecting that the
> diazo theme is removing the code.  Are there any pointers as to how I
> might troubleshoot this?
>
>
> --
> David Bear
> College of Public Programs at ASU
> 602-496-0424
>
Hi David,

Here's what I use in one of my Deliverance themes:

<!-- Add in any inline scripts, like Google Analytics -->
     <append content='/html/body/div/script' theme='children:/html/body' />

Maybe something similar will work for you. I'm not sure if the syntax is
exactly the same for diazo.

HTH,

--
Larry Pitcher
Catapult Solutions

Web:    www.catapultsolutions.net
Email:  [hidden email]
Skype:  larry.pitcher
Office:  509.849.2660
Mobil:   509.629.1376

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Dan Jacka Dan Jacka
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: diazo removing google analytics code?

Hi David and Larry,

On 21/12/11 07:58, Larry Pitcher wrote:

> On 12/20/2011 10:04 AM, David Bear wrote:
>> I have a plone 4.1 site where I have pasted the javascript code for
>> google analytics in to the control panel ->  site setup ->  javascript for
>> web stats section. But the javascript isn't making its way out to the
>> browser, and therefore not to google either. I am suspecting that the
>> diazo theme is removing the code.  Are there any pointers as to how I
>> might troubleshoot this?
>>
>>
>> --
>> David Bear
>> College of Public Programs at ASU
>> 602-496-0424
>>
> Hi David,
>
> Here's what I use in one of my Deliverance themes:
>
> <!-- Add in any inline scripts, like Google Analytics -->
>       <append content='/html/body/div/script' theme='children:/html/body' />
>
> Maybe something similar will work for you. I'm not sure if the syntax is
> exactly the same for diazo.
>
> HTH,
>

Here's a rule that works for me with Diazo:

<!-- Google Analytics JavaScript -->
<after theme-children="/html/body"
content="/html/body/div[@id='visual-portal-wrapper']/div/script" />

BTW, you need a rule like this because JavaScript added in the site
control panel gets rendered in the body, not in the head as you (and
your rules) might expect. See the 'plone.analytics' viewlet in
plone.app.layout.

Dan

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
David Bear David Bear
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: diazo removing google analytics code?

Thanks Dan and Larry. I will try the rule below and report back. 

On Tue, Dec 20, 2011 at 1:33 PM, Dan Jacka <[hidden email]> wrote:
Hi David and Larry,


On 21/12/11 07:58, Larry Pitcher wrote:
On 12/20/2011 10:04 AM, David Bear wrote:
I have a plone 4.1 site where I have pasted the javascript code for
google analytics in to the control panel ->  site setup ->  javascript for
web stats section. But the javascript isn't making its way out to the
browser, and therefore not to google either. I am suspecting that the
diazo theme is removing the code.  Are there any pointers as to how I
might troubleshoot this?


--
David Bear
College of Public Programs at ASU
<a href="tel:602-496-0424" value="+16024960424" target="_blank">602-496-0424

Hi David,

Here's what I use in one of my Deliverance themes:

<!-- Add in any inline scripts, like Google Analytics -->
     <append content='/html/body/div/script' theme='children:/html/body' />

Maybe something similar will work for you. I'm not sure if the syntax is
exactly the same for diazo.

HTH,


Here's a rule that works for me with Diazo:

<!-- Google Analytics JavaScript -->
<after theme-children="/html/body" content="/html/body/div[@id='visual-portal-wrapper']/div/script" />

BTW, you need a rule like this because JavaScript added in the site control panel gets rendered in the body, not in the head as you (and your rules) might expect. See the 'plone.analytics' viewlet in plone.app.layout.

Dan



--
David Bear
College of Public Programs at ASU
602-496-0424

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
David Bear David Bear
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: diazo removing google analytics code?

In reply to this post by Dan Jacka
good news. This rule works. I needed to restart the plone cluster -- I assume modifications to rules.xml file require a restart or running plone in debug mode in order to become effective. 

thank you all. 

On Tue, Dec 20, 2011 at 1:33 PM, Dan Jacka <[hidden email]> wrote:
Hi David and Larry,


On 21/12/11 07:58, Larry Pitcher wrote:
On 12/20/2011 10:04 AM, David Bear wrote:
I have a plone 4.1 site where I have pasted the javascript code for
google analytics in to the control panel ->  site setup ->  javascript for
web stats section. But the javascript isn't making its way out to the
browser, and therefore not to google either. I am suspecting that the
diazo theme is removing the code.  Are there any pointers as to how I
might troubleshoot this?


--
David Bear
College of Public Programs at ASU
<a href="tel:602-496-0424" value="+16024960424" target="_blank">602-496-0424

Hi David,

Here's what I use in one of my Deliverance themes:

<!-- Add in any inline scripts, like Google Analytics -->
     <append content='/html/body/div/script' theme='children:/html/body' />

Maybe something similar will work for you. I'm not sure if the syntax is
exactly the same for diazo.

HTH,


Here's a rule that works for me with Diazo:

<!-- Google Analytics JavaScript -->
<after theme-children="/html/body" content="/html/body/div[@id='visual-portal-wrapper']/div/script" />

BTW, you need a rule like this because JavaScript added in the site control panel gets rendered in the body, not in the head as you (and your rules) might expect. See the 'plone.analytics' viewlet in plone.app.layout.

Dan



--
David Bear
College of Public Programs at ASU
602-496-0424

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
yuri-2 yuri-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: diazo removing google analytics code?

Il 21/12/2011 01:09, David Bear ha scritto:
> good news. This rule works. I needed to restart the plone cluster -- I
> assume modifications to rules.xml file require a restart or running
> plone in debug mode in order to become effective.

If you reload it using zip and plone.app.theming, you don't need to restart.

------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
yuri-2 yuri-2
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: diazo removing google analytics code?

Il 21/12/2011 16:36, David Bear ha scritto:
> I'm not sure what you mean be 'reload using zip and plone.app.theming
> ' I am suing p.a.theming.

Then you can repack the zip and upload it again in the control panel.
There's a bug, I think. You've to delete it and upload it again,
replacing it gives an error.

>
> On Wed, Dec 21, 2011 at 6:22 AM, Yuri <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Il 21/12/2011 01:09, David Bear ha scritto:
>     > good news. This rule works. I needed to restart the plone
>     cluster -- I
>     > assume modifications to rules.xml file require a restart or running
>     > plone in debug mode in order to become effective.
>
>     If you reload it using zip and plone.app.theming, you don't need
>     to restart.
>
>     ------------------------------------------------------------------------------
>     Write once. Port to many.
>     Get the SDK and tools to simplify cross-platform app development.
>     Create
>     new or port existing apps to sell to consumers worldwide. Explore the
>     Intel AppUpSM program developer opportunity.
>     appdeveloper.intel.com/join <http://appdeveloper.intel.com/join>
>     http://p.sf.net/sfu/intel-appdev
>     _______________________________________________
>     Plone-Users mailing list
>     [hidden email]
>     <mailto:[hidden email]>
>     https://lists.sourceforge.net/lists/listinfo/plone-users
>
>
>
>
> --
> David Bear
> College of Public Programs at ASU
> 602-496-0424


------------------------------------------------------------------------------
Write once. Port to many.
Get the SDK and tools to simplify cross-platform app development. Create
new or port existing apps to sell to consumers worldwide. Explore the
Intel AppUpSM program developer opportunity. appdeveloper.intel.com/join
http://p.sf.net/sfu/intel-appdev
_______________________________________________
Plone-Users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/plone-users
Loading...