Hi,
I have just created a plugin to insert Google Analytics Javascript into the page.
Nothing great in that... however just one issue.
The javascript code provided by Google has no UI... it's only for tracking. So, I also don't want any UI element in the final page.
However, since I added it to the sidebar, it shows a horizontal line (because that's the separator).
Please see http://www.edujinionline.com/serendipity for the actual rendered output. You will see an empty slot towards the bottom of the sidebar.
I don't know how to remove it...
At the same time, I don't know how to emit the javascript just before the end of the body element (before '</body>')... What kind of plugin do I need to write and how will this plugin be informed that the end of the page is 'about to be reached'?
Cheers,
Gaurav Vaish
http://www.mastergaurav.com
http://www.edujinionline.com
Google Analytics Plugin
-
stm999999999
- Regular
- Posts: 1531
- Joined: Tue Mar 07, 2006 11:25 pm
- Location: Berlin, Germany
- Contact:
I think you do not make a new plugin for this but you take a html nugget, right?
Therefore the seperator line is normal: every plugin in the sidebar, even a html nugget with no visible content create such a line.
But this is no problem: You can use this nugget to display the privacy warning as your contract with google demands!
so, in my nugget:
and then a static page with the text of http://www.google.com/analytics/en-GB/tos.html 8. PRIVACY
and, which javascript at the end of the page do you mean?
Therefore the seperator line is normal: every plugin in the sidebar, even a html nugget with no visible content create such a line.
But this is no problem: You can use this nugget to display the privacy warning as your contract with google demands!
so, in my nugget:
Code: Select all
<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">
</script>
<script type="text/javascript">
_uacct = "xxx";
urchinTracker();
</script>
This site uses <a href="/pages/google-analytics.html">Google Analytics</a>.and, which javascript at the end of the page do you mean?
Ciao, Stephan
-
mastergaurav
- Regular
- Posts: 16
- Joined: Wed Oct 04, 2006 6:46 pm
Re: Google Analytics Plugin
Hey! Thanks... I didn't notice thisstm999999999 wrote:This site uses <a href="/pages/google-analytics.html">Google Analytics</a>.
One more question... I would like this plugin to be made available for everybody to use. Who should I talk to?
And if somebody can help me on http://www.s9y.org/forums/viewtopic.php?p=39862...
Cheers,
Gaurav
http://www.mastergaurav.com
http://www.edujinionline.com
-
stm999999999
- Regular
- Posts: 1531
- Joined: Tue Mar 07, 2006 11:25 pm
- Location: Berlin, Germany
- Contact:
Re: Google Analytics Plugin
I ask my question again:mastergaurav wrote:
One more question... I would like this plugin to be made available for everybody to use. Who should I talk to?
I think you do not make a new plugin for this but you take a html nugget, right?
Ciao, Stephan
-
mastergaurav
- Regular
- Posts: 16
- Joined: Wed Oct 04, 2006 6:46 pm
Re: Google Analytics Plugin
I think you do not make a new plugin for this but you take a html nugget, right?
Naive question... what's the difference between the two?
-
mastergaurav
- Regular
- Posts: 16
- Joined: Wed Oct 04, 2006 6:46 pm
Re: Google Analytics Plugin
Ok... gotcha.. the 'HTML Nugget plugin'.
But then, it will add its own 'section' / 'entry' in the sidebar.
Anyway, I got a workaround... since I had to mention about ToS... I've updated my plugin to have the following entries:
1. Analytics Account ID
2. Location of the page (url, with or without http://) pointing to the page where the paragraph from Google is kept.
Please do give feedback as to how it appears now at:
http://www.edujinionline.com/serendipity
Cheers,
Gaurav Vaish
http://www.mastergaurav.com
http://www.edujinionline.com
But then, it will add its own 'section' / 'entry' in the sidebar.
Anyway, I got a workaround... since I had to mention about ToS... I've updated my plugin to have the following entries:
1. Analytics Account ID
2. Location of the page (url, with or without http://) pointing to the page where the paragraph from Google is kept.
Please do give feedback as to how it appears now at:
http://www.edujinionline.com/serendipity
Cheers,
Gaurav Vaish
http://www.mastergaurav.com
http://www.edujinionline.com
-
stm999999999
- Regular
- Posts: 1531
- Joined: Tue Mar 07, 2006 11:25 pm
- Location: Berlin, Germany
- Contact:
You use the nugget if you go to the plugin-site in the admin-backend and add a nugget and put some text/code in the text-field
You make a new plugin if you take a editor and make new code in a new plugin-dir in /plugins
As I see your last post, I think you make the second thing, right?
You make a new plugin if you take a editor and make new code in a new plugin-dir in /plugins
As I see your last post, I think you make the second thing, right?
Ciao, Stephan
You'd talk with Garvin to get a plugin added to the repository. Sometimes I'll jump the gun and put something in while he's not looking. :twisted: You could also host it on your own site, of course, and announce it here.
Garvin tries to keep the number of plugins to a minimum, and this can be done in an HTML nugget, unless I'm mistaken; so Garvin probably wouldn't put it in the repository.
But... perhaps the nugget plugin should come with some predefined nuggets. So you could install the plugin, then choose "Google Analytics", and your nugget will be filled in for you with some default text.
Garvin tries to keep the number of plugins to a minimum, and this can be done in an HTML nugget, unless I'm mistaken; so Garvin probably wouldn't put it in the repository.
But... perhaps the nugget plugin should come with some predefined nuggets. So you could install the plugin, then choose "Google Analytics", and your nugget will be filled in for you with some default text.