Jump to content

Module to display Google analytics link in stats


wannaspeed

Recommended Posts

Hi I would like to make a very simple module that would display a clickable link for my google analytics within the stats tab. I have looked at other modules and have a very basic understanding of what they are doing but for such a simple module I would like to do it the easy way. Below is what I have come up with so far as a php file, im not sure how to display the link and if I need to create another file that has the link in it. A little guidance would be great, thank you.

 

<?php

class Google Analytics extends Module

{

function __construct()

{

$this->name = 'GoogleAnalytics';

$this->tab = 'analytics_stats';

$this->version = 1.0;

 

parent::__construct(); // The parent construct is required for translations

 

$this->displayName = $this->l('Google Analytics');

$this->description = $this->l('Link to google Analytics');

}

 

function install()

{

return (parent::install() AND $this->registerHook('AdminStatsModules'));

}

 

/**

* Returns module content

*

* @param array $params Parameters

* @return string Content

*/

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...