Created
November 25, 2009 03:43
-
-
Save ttrefren/242453 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Track a page load. Very simple. | |
| mpmetrics.track("Page load"); | |
| // Track a user that plays a game. We include the genre and game title. | |
| mpmetrics.track('Play game', {'genre': 'action', 'title': 'Tomb Raider'}); | |
| // Track the first step of a signup funnel. | |
| mpmetrics.track_funnel("Signup", 1, "Hit landing page", {'from': 'google'}); | |
| // Register some properties to include with all events sent, so you don't have | |
| // to include them every time. | |
| mpmetrics.register({'user type': 4, 'account age': 234}); | |
| // Register some properties to include with only funnel events | |
| mpmetrics.register({'origin': 'Google'}, "funnels"); | |
| // Register properties *only* if they have not been registered before | |
| mpmetrics.register_once({'origin': 'Google'}); | |
| // Register a funnel | |
| mpmetrics.register_funnel("Signup", ["splash", "signup form", "complete signup"]); | |
| // Identify a user for all future events | |
| mpmetrics.identify("unique string"); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment