Permalink
Fetching contributors…
Cannot retrieve contributors at this time
40 lines (27 sloc) 993 Bytes
---
parent: analytics
title: how_it_works
---
# How It Works <%= edit_link %>
<%= partial 'partials/toc' %>
## The Tracking Script
> The source of the tracking script is hosted on
[GitHub](https://www.github.com/skroutz/analytics.js).
The tracking script, registers a new global function named `sa`, and then
asynchronously loads the `analytics.js` library onto the page.
The `sa` global function is the main way you interact with the Analytics library.
It accepts a sequence of parameters, that represent:
Category
: The API category
Command
: The Command of the API category you want to be executed
Data
: The Data to be reported by the Command
> ##### Note
> *Categories* and *Commands* are **case-sensitive**.
## Related Resources
* Configuration
* <%= link_to 'Analytics Settings', '/analytics/settings' %>
* <%= link_to 'Ecommerce metrics', '/analytics/ecommerce' %>
* <%= link_to 'Examples', '/analytics/examples' %>
* <%= link_to 'Libraries', '/analytics/libraries' %>