![]() |
ParselyAndroid
1.0
The Parsely Android Toolkit
|
Manages pageview events and analytics data for Parsely on Android. More...
Public Member Functions | |
void | trackURL (String url) |
Register a pageview event using a canonical URL. More... | |
void | trackPostId (String pid) |
Register a pageview event using a CMS post identifier. More... | |
void | flush () |
Generate pixel requests from the queue. More... | |
void | setFlushTimer () |
Allow Parsely to send pageview events. More... | |
boolean | flushTimerIsActive () |
Is the callback timer running. More... | |
void | stopFlushTimer () |
Disallow Parsely from sending pageview events. More... | |
Static Public Member Functions | |
static ParselyTracker | sharedInstance () |
Singleton instance accessor. Note: This must be called after sharedInstance(String, Context) More... | |
static ParselyTracker | sharedInstance (String apikey, Context c) |
Singleton instance factory Note: this must be called before sharedInstance() More... | |
Manages pageview events and analytics data for Parsely on Android.
Accessed as a singleton. Maintains a queue of pageview events in memory and periodically flushes the queue to the Parsely pixel proxy server.
void com.parsely.parselyandroid.ParselyTracker.flush | ( | ) |
Generate pixel requests from the queue.
Empties the entire queue and sends the appropriate pixel requests. If shouldBatchRequests
is true, the queue is sent as a minimum number of requests. Called automatically after a number of seconds determined by flushInterval
.
boolean com.parsely.parselyandroid.ParselyTracker.flushTimerIsActive | ( | ) |
Is the callback timer running.
true
if the callback timer is currently running, false
otherwise void com.parsely.parselyandroid.ParselyTracker.setFlushTimer | ( | ) |
Allow Parsely to send pageview events.
Instantiates the callback timer responsible for flushing the events queue. Can be called before of after stop
, but has no effect if used before instantiating the singleton
|
static |
Singleton instance accessor. Note: This must be called after sharedInstance(String, Context)
|
static |
Singleton instance factory Note: this must be called before sharedInstance()
apikey | The Parsely public API key (eg "samplesite.com") |
c | The current Android application context |
void com.parsely.parselyandroid.ParselyTracker.stopFlushTimer | ( | ) |
Disallow Parsely from sending pageview events.
Invalidates the callback timer responsible for flushing the events queue. Can be called before or after start
, but has no effect if used before instantiating the singleton
void com.parsely.parselyandroid.ParselyTracker.trackPostId | ( | String | pid | ) |
Register a pageview event using a CMS post identifier.
pid | A string uniquely identifying this post. This must be unique within Parsely's database. |
void com.parsely.parselyandroid.ParselyTracker.trackURL | ( | String | url | ) |
Register a pageview event using a canonical URL.
url | The canonical URL of the article being tracked (eg: "http://samplesite.com/some-old/article.html") |