From 283aaa7f2abf0a0cd83a35260b301131236d403b Mon Sep 17 00:00:00 2001 From: Ian Gulliver Date: Sun, 8 Jun 2014 18:11:42 -0700 Subject: [PATCH] Document trackEvent and start messing with analytics. --- reference.html | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/reference.html b/reference.html index feb8388..c9f2413 100644 --- a/reference.html +++ b/reference.html @@ -608,6 +608,22 @@ client library automatically re-adds pins after reconnection).

The client library keeps a list of currently active pins subscriptions. getPins() returns the contents of that cache.

+ +

trackEvent()

+ +

Arguments: the same as the +ga() +function from Google Analytics.

+ +

If trackingID was passed to the Cosmopolite constructor, Cosmopolite +sends analytics events on load and subscribe. To avoid duplicate work initializing the analytics +library, trackEvent() provides a passthrough to the analytics interface.

+ +

Cosmopolite does not send a +pageview +event. To tie together tracking data, it is recommended that you send at least one pageview from +your application code.

+