Plugin Google Analytics

This wiki plugin provides a way to add the code snippet needed for Google Analytics to work on your site. Google Analytics will provide various types of detailed traffic reports and statistics for you to use to monitor the traffic on your Tiki site. See also Piwik.


Introduced in Tiki 14. Required parameters are in bold.
Go to the source code
Preferences required: wikiplugin_googleanalytics

Parameters Accepted Values Description Default Since
groups User groups for which Google Analytics will be available
group_option text Define option for Google Analytics groups, include or exclude
account text The account number for the site. Your account number from Google looks like UA-XXXXXXX-YY. All you need to enter is XXXXXXX-YY 3.0

Steps for Using This Plugin

Since Tiki3

  1. Open Google Analytics account
    If you don't already have an account, go to http://www.google.com/analytics/ to open one. When setting the account settings, choose "A single domain" when asked what you're tracking. If you choose another setting, you won't be able to use the plugin - use the instructions below for prior Tiki versions instead.

  2. Go to Look & Feel admin panel
    Go to Control Panels > Look & Feel > General Layout Options (tab)
    NOTE: For tiki7, go to Admin Home > Look & Feel > Customization (tab)

  3. Insert Syntax and apply
    Go to the box titled "Custom End of Code" and insert the following and then click "Apply":
    {wiki}{literal}{googleanalytics account="xxxxxxx-x"}{/literal}{/wiki}

    Note: use your Google Analytics account number where the x's are shown above. Do not include the "UA-" part of your account number.


Basic Syntax

{googleanalytics account="xxxxxxx-x"}

Alternate method

If you can't get the GOOGLEANALYTICS module to work, you can do something like this (also excludes admins from generating Google Analytics hits, and sets cookie so you can use G/A filters to exclude Admin hits even when not logged in):''

{if $tiki_p_admin ne 'y'}{literal}{/literal}

Prior Tiki Versions

This plugin didn't exist before Tiki3, but the code snippet that Google provides when you open a Google Analytics account can be added in prior versions as follows:

  • Version 2.0: add to the footer at Admin Home > Look & Feel
  • Version 1.9: add to templates/footer.tpl. Need to set "Edit templates" first in the Look & Feel admin panel

Related pages

List Slides