netPhotoGraphics / Website

This repository holds the unique items for the netPhotoGraphics website
2 stars 2 forks source link

Add Google analitycs in head #8

Closed By-oussef closed 5 years ago

By-oussef commented 5 years ago

Add Google analitycs to better track website traffic and make proposals to improve ranking in google.

By-oussef commented 5 years ago

+1

By-oussef commented 5 years ago

function __construct() {
    if (OFFSET_PATH == 2) {
        setOptionDefault('analyticsId', 'UA-109862535-3');
        setOptionDefault('admintracking', 0);
    }
}

function getOptionsSupported() {
    return array(gettext('Google Analytics Web Property ID')     => array(
                                    'order'  => 0,
                                    'key'        => 'analyticsId',
                                    'type'   => OPTION_TYPE_TEXTBOX,
                                    'desc'   => gettext("If you're going to be using Google Analytics,") . ' <a href="http://www.google.com/analytics/" target="_blank"> ' . gettext("get a Web Property ID</a> UA-109862535-3.")
                    ),
                    gettext('Enable Admin tracking')                         => array(
                                    'order'  => 1,
                                    'key'        => 'admintracking',
                                    'type'   => OPTION_TYPE_CHECKBOX,
                                    'desc'   => gettext('Controls if you want Google Analytics tracking for users logged in as admin. Default is not selected.')
                    ),
    );
}

function handleOption($option, $currentValue) {

}
sbillard commented 5 years ago

I am sorry, you are confusing me.