Loading...
 
Add the tracking code for Google Analytics
Starting in Tiki11, there is a simpler way to configure in the admin panel. See Google Analytics.


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.

Parameters

Introduced in Tiki14. Required parameters are in bold.
Preferences required: wikiplugin_googleanalytics
Parameters Accepted Values Description Default Since
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}

     Tip

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

Examples

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}<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXXXXXXX-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>{/literal}
{else}
{literal}<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-XXXXXXXX-1']);
  _gaq.push(['_trackPageview']);
  _gaq.push(['_setVar', 'ga_exclude']); 
  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);

  })();

</script>{/literal}{/if}

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

doc.tiki.org


Bootstrap

AdminGuide

UserGuide

Keywords

Keywords serve as "hubs" for navigation within the Tiki documentation. They correspond to development keywords (bug reports and feature requests):

Accessibility (WAI and 508)
Accounting (7.x)
Articles and Submissions
Backlinks
Banners
Batch (6.x)
BigBlueButton audio/video/chat/screensharing (5.x)
Blog
Bookmark
Browser Compatibility
Link Cache
Calendar
Category
Chat
Clean URLs
Comments
Communication Center
Compression (gzip)
Contacts (Address Book)
Contact us
Content Templates
Contribution (2.x)
Cookie
Copyright
Credit (6.x)
Custom Home and Group Home Page
Date and Time
Debugger Console
Directory of hyperlinks
Documentation link from Tiki to doc.tiki.org (Help System)
Docs 8.x
Draw 7.x
Dynamic Content
Dynamic Variable
External Authentication
FAQ
Featured links
File Gallery
Forum
Friendship Network (Community)
Gmap Google maps
Groups
Hotword
HTML Page
i18n (Multilingual, l10n, Babelfish)
Image Gallery
Import-Export
Install
Integrator
Interoperability
Inter-User Messages
InterTiki
Kaltura video management (4.x)
Karma
Live Support
Login
Logs (system & action)
Look and Feel
Lost edit protection
Mail-in
Map with Mapserver
Menu
Meta Tags
Mobile Tiki and Voice Tiki
Mods
Module
MultiTiki
MyTiki
Newsletter
Notepad
Payment
Performance Speed / Load
Permissions
Platform independence (Linux-Apache, Windows/IIS, Mac, BSD)
Polls
Profiles
Profile Manager
Report
Toolbar
Quiz
Rating
Feeds
Score
Search engine optimization
Search
Search and Replace
Security
Semantic links (3.x)
Shadowbox
Shadow Layers
Share
Shopping cart
Shoutbox
Slideshow
Smiley
Social Networks
Spam protection (Anti-bot CATPCHA)
Spellcheck
Spreadsheet
Stats
Surveys
Tags (2.x)
Task
Tell a Friend, alert + Social Bookmarking
TikiTests (2.x)
Theme CSS & Smarty
Trackers
Transitions (5.x)
TRIM
User Administration including registration and banning
User Files
User Menu
Watch
WebHelp
WebDAV (5.x)
Webmail
Web Services
Wiki 3D
Wiki History, page rename, etc
Wiki Page Staging and Approval (2.x)
Wiki Plugin extends basic syntax
Wiki Syntax
Wiki structure (book and table of content)
Workspace
WSOD
WYSIWYCA
WYSIWYG (2.x)
XMLRPC


Tiki Newsletter

Delivered fresh to your email inbox!
Newsletter subscribe icon
Don't miss major announcements and other news!
Contribute to Tiki