Extension:GoogleAnalyticsMetrics/sv

The GoogleAnalyticsMetrics extension gets various metrics from Google Analytics and inserts them into a wiki page using a parser function. This extension was created for WikiWorks.

The  extension may not be appropriate for your site if you have data security and privacy concerns. The extensions inserts Javascript code in each page served, and the code causes the client to contact Google services to process and aggregate data. Your site's users will be subjected to tracking and data mining regardless of the Do Not Track or Global Privacy Control browser settings.

Användning
Parserfunktionen  tar tre parametrar, i form av  :
 * Metrikens namn : The name of the Google Analytics Metric that should be displayed. The full list of Google Analytics metrics is here. Omit the  prefix.
 * Sidnamn : The name of the page. This parameter is only used when the metric is a per page metric.
 * Startdatum : Show the metric since this date (optional). Defaults to, which is the beginning of time according to Google Analytics.
 * Slutdatum : Show the metric until this date (optional). Defaults to.

Båda parametrarna använder formatet: År-Månad-Dag.

Exempel
This example displays the number of page views for this site, from the beginning until the end of time:

Show the number of sessions from February 3, 2011 until today.

Show the average session duration until February 1 2012:

Show the number of page views for last month only, with the help of the extension:

Or, to make that nicer: 0

Show the number of page views for a page, from the beginning until the end of time:

See this page for some help with formatting this extension's output.

Konfigurationsparametrar

 * $wgGoogleAnalyticsMetricsAllowed : An array containing the name of Google Analytics metrics that are allowed to be retrieved by the extension. Defaults to, which allows all metrics.
 * $wgGoogleAnalyticsMetricsEmail : The email address of the Google Analytics account.
 * $wgGoogleAnalyticsMetricsPath : Path to your certificate key file.
 * $wgGoogleAnalyticsMetricsViewId : Google Analytics View ID.