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
// Capture the author info & user status | |
let articleParams = ["Author": "John Q", "User_Status": "Registered"]; | |
Flurry.log(eventName: "Article_Read", parameters: articleParams, timed: true) | |
// In a function that captures when a user navigates away from article | |
// You can pass in additional params or update existing ones here as well | |
Flurry.endTimedEvent(eventName: "Article_Read", parameters: nil) |
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
// Capture the author info & user status | |
let articleParams = ["Author": "John Q", "User_Status": "Registered"]; | |
Flurry.log(eventName: "Article_Read", parameters: articleParams) |
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
Flurry.log(eventName: "article_read") |
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
// Methods in Flurry.builder to initialize Flurry Agent | |
Builder withAppVersion(String versionName); // iOS only. For Android, please use Flurry.setVersionName() instead. | |
Builder withContinueSessionMillis(int sessionMillis); | |
Builder withCrashReporting(bool crashReporting); | |
Builder withDataSaleOptOut(bool isOptOut); | |
Builder withIncludeBackgroundSessionsInMetrics(bool includeBackgroundSessionsInMetrics); | |
Builder withLogEnabled(bool enableLog); | |
Builder withLogLevel(LogLevel logLevel); // LogLevel = { verbose, debug, info, warn, error, assertion } | |
Builder withMessaging(bool enableMessaging, MessagingListener listener); | |
Builder withPerformanceMetrics(int performanceMetrics); // Performance = { none, coldStart, screenTime, all } |
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
import 'package:flutter/material.dart'; | |
import 'dart:async'; | |
import 'package:flutter_flurry_sdk/flurry.dart'; | |
class FlurryExample { | |
/// Init Flurry once as early as possible recommended in main.dart. | |
/// For each platform (Android, iOS) where the app runs you need to acquire a unique Flurry API Key. | |
/// i.e., you need two API keys if you are going to release the app on both Android and iOS platforms. | |
/// If you are building for TV platforms, you will need two API keys for Android TV and tvOS. |
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
- (void)somePurchasingEvent{ | |
FlurryParamBuilder *param = [[[[[[FlurryParamBuilder alloc] init] | |
setDouble:34.99 forParam:FLURRY_EVENT_PARAM_TOTAL_AMOUNT] | |
setBoolean:YES forParam:FLURRY_EVENT_PARAM_SUCCESS] | |
setString:@"book 1" forParam:FLURRY_EVENT_PARAM_ITEM_NAME] | |
setString:@”This is an awesome book to purchase !!!” forKey:@"note"]; | |
[Flurry logStandardEvent:FLURRY_EVENT_PURCHASED withParameters:param]; | |
} |
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
FlurryEvent.Params params = new FlurryEvent.Params() | |
.putDouble (FlurryEvent.Param.TOTAL_AMOUNT, 34.99) | |
.putBoolean(FlurryEvent.Param.SUCCESS, true) | |
.putString (FlurryEvent.Param.ITEM_NAME, "book 1") | |
.putString ("note", "This is an awesome book to purchase !!!"); | |
FlurryAgent.logEvent(FlurryEvent.PURCHASED, params); |
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
func someFunction(){ | |
let param = FlurryParamBuilder() | |
.set(doubleVal: 34.99, param: FlurryParamBuilder.totalAmount()) | |
.set(booleanVal: true, param: FlurryParamBuilder.success()) | |
.set(stringVal: "book 1", param: FlurryParamBuilder.itemName()) | |
.set(stringVal: "This is an awesome book to purchase !!!", key: "note") | |
Flurry.log(standardEvent: FlurryEvent.FLURRY_EVENT_PURCHASED, param: param) | |
} |
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
//Enable crash analytics when you start your Flurry session | |
let builder = FlurrySessionBuilder.init() | |
... | |
.withCrashReporting(true) | |
.withSessionContinueSeconds(10) | |
// Replace YOUR_API_KEY with the api key in the downloaded package | |
Flurry.startSession("YOUR_API_KEY", with: builder) | |
//Caught Exceptions | |
Flurry.logError("Error ID", message: "log with exception message", exception: exception) |
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
//Enable crash analytics when you start your Flurry session | |
FlurrySessionBuilder *sessionBuilder = [[FlurrySessionBuilder new] withCrashReporting:YES]; | |
[Flurry startSession:@"<< YOUR API KEY HERE>>" withSessionBuilder:sessionBuilder]; | |
//Caught Exceptions | |
[Flurry logError:@"HandledException" message:@"" exception:exception]; | |
//Logged Errors | |
[Flurry logError:@"WebView No Load" message:[error localizedDescription] error:error]; |
NewerOlder