Skip to content
Permalink
master
Go to file
 
 
Cannot retrieve contributors at this time
39 lines (27 sloc) 1.02 KB
---
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 `<%= "#{flavor}_analytics" %>`, and then
asynchronously loads the `analytics.js` library onto the page.
The `<%= "#{flavor}_analytics" %>` 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' %>
You can’t perform that action at this time.