{"id":10,"date":"2019-05-20T09:24:00","date_gmt":"2019-05-20T09:24:00","guid":{"rendered":"https:\/\/blog.maxesoft.ru\/2015\/05\/20\/mobile-analytics-integrating-flurry-analytics-into-ios-application\/"},"modified":"2022-05-04T20:44:51","modified_gmt":"2022-05-04T20:44:51","slug":"mobile-analytics-integrating-flurry-analytics-into-ios-application","status":"publish","type":"post","link":"https:\/\/www.maxesoft.com\/blog\/mobile-analytics-integrating-flurry-analytics-into-ios-application\/","title":{"rendered":"How to Integrate Flurry Analytics into iOS App?"},"content":{"rendered":"<div class=\"center\" style=\"text-align: justify;\">This tutorial contains an overview of how to implement <a href=\"http:\/\/www.flurry.com\/\" rel=\"nofollow noopener\" target=\"_blank\">Flurry Analytics<\/a> in iPhone app. Flurry Analytics helps to follow user behavior inside the app, it&#8217;s nice to have it when it&#8217;s critical to know more about most popular user transitions and steps in the mobile app. So here we are happy to share custom source code on how to add Flurry analytics behind the element (button). When a user enters the iOS app and clicks the button, this info is collected under Flurry backend and available for business owners. Let\u2019s describe how to integrate Flurry analytics into iOS app.<\/div>\n<div class=\"center\" style=\"text-align: justify;\">&nbsp;<\/div>\n<p style=\"text-align: justify;\"><strong>Step 1<\/strong> &#8211; you need to create an application in flurry, if you don&#8217;t have an account, you have to register, if you have an account, then go to dev.flurry.com.<\/p>\n<p style=\"text-align: justify;\">1. Open Applications tab and click on Add a New Application:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-27 size-large\" src=\"\/blog\/wp-content\/uploads\/2015\/05\/01-1024x386.png\" alt=\"01\" width=\"1024\" height=\"386\"><\/p>\n<p>2. Select the platform you need &#8211; our example is created for&nbsp;iPhone:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-28 size-large\" src=\"\/blog\/wp-content\/uploads\/2015\/05\/2-1024x386.png\" alt=\"2\" width=\"1024\" height=\"386\"><\/p>\n<p>3. Enter a name for your application and select the category that best fits your application:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-30 size-large\" src=\"\/blog\/wp-content\/uploads\/2015\/05\/4-1024x385.png\" alt=\"4\" width=\"1024\" height=\"385\"><\/p>\n<p>4.&nbsp;Now application is created, remember your key:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-31 size-large\" src=\"\/blog\/wp-content\/uploads\/2015\/05\/5-finish-1024x386.png\" alt=\"5 (finish)\" width=\"1024\" height=\"386\"><\/p>\n<p><strong>Step 2<\/strong> &#8211;&nbsp;Download the Flurry iOS SDK <a href=\"https:\/\/dev.flurry.com\/uploadVersionSelectProject.do\" rel=\"nofollow noopener\" target=\"_blank\">here<\/a>. Or you may download Flurry SDK right after finishing adding Flurry app on the site.<\/p>\n<p><strong>Step 3<\/strong> &#8211; Integrate Flurry SDK and other libs to the project.<\/p>\n<p>Add the following frameworks to your app\u2019s target in Xcode:<\/p>\n<p style=\"margin-left: 40px;\">\u00b7 libFlurry<\/p>\n<p style=\"margin-left: 40px;\">\u00b7 libFlurryAds<\/p>\n<p style=\"margin-left: 40px;\">\u00b7 Security.framework<\/p>\n<p style=\"margin-left: 40px;\">\u00b7 SystemConfiguration.framework<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-33 size-large\" src=\"\/blog\/wp-content\/uploads\/2015\/05\/011-1024x652.png\" alt=\"01\" width=\"1024\" height=\"652\"><\/p>\n<p><strong>Step 4<\/strong> &#8211; Add project&#8217;s code modification.<\/p>\n<p><strong>AppDelegate.h<\/strong><\/p>\n<pre class=\"lang:objc decode:true\">1) add #import \"Flurry.h\"\n<\/pre>\n<p><strong>AppDelegate.m<\/strong><\/p>\n<pre class=\"lang:objc decode:true\">1) add to method \"didFinishLaunchingWithOptions\" code\n[Flurry setDebugLogEnabled:YES];\n[Flurry startSession:@\"SESSION_ID_FOR_YOUR_APP\"]; \/\/ replace string with Session ID of your app\n[Flurry logEvent:@\"logEvent: app just started\"];<\/pre>\n<p><strong>Step 5<\/strong> &#8211; Add the code for counting how many times user clicks on the button<\/p>\n<p><strong>ViewController.h<\/strong><\/p>\n<pre class=\"lang:objc decode:true\">1) add #import \"Flurry.h\"<\/pre>\n<p><strong>ViewController.m<\/strong><br \/>\nFor counting how many times user clicks on the button<br \/>\nadd to your event-handling method code (as an example I use method-handler &#8220;BtnClick&#8221; in my example app)<\/p>\n<pre class=\"lang:objc decode:true\">[Flurry logEvent:@\"simple app button click\"];<\/pre>\n<p><strong>Note:<\/strong>&nbsp;Run app on real device, not on iOS Simulator.<\/p>\n<p><strong>Step 6<\/strong>&nbsp;&#8211;&nbsp;Run the app and click the button in UI.<\/p>\n<p>Here is an example how analytics data looks on Flurry account:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-49 size-large\" src=\"\/blog\/wp-content\/uploads\/2015\/05\/onKwsjK2-1024x499.png\" alt=\"onKwsjK\" width=\"1024\" height=\"499\"><\/p>\n<p>Note that information on Flurry server updates 2-3 times per day, so if the statistic info doesn&#8217;t update immediately, it&#8217;s ok, just need to wait.<\/p>\n<p><strong>Source code.<\/strong> Source code is available on&nbsp;<a href=\"https:\/\/github.com\/maxesoft\/flurryclickbutton\" target=\"_blank\" rel=\"noopener\">GitHub<\/a>.<\/p>\n<p>We hope this manual describing how to integrate Flurry in iOS would be helpful to you.<\/p>\n<p style=\"margin-left: 40px; text-align: justify;\"><strong>Read also:<\/strong><\/p>\n<p style=\"margin-left: 80px; text-align: justify;\">\u2022&nbsp;<a href=\"https:\/\/www.maxesoft.com\/blog\/how-to-integrate-payment-gateway-in-a-mobile-app\/\" target=\"_blank\" rel=\"noopener\">How to Integrate Payment Gateway in a Mobile App?<\/a><\/p>\n<p style=\"margin-left: 80px; text-align: justify;\">\u2022&nbsp;<a href=\"https:\/\/www.maxesoft.com\/blog\/what-are-the-pros-and-cons-of-angularjs-vs-reactjs\/\" target=\"_blank\" rel=\"noopener\">What are the Pros and Cons of AngularJS vs ReactJS?<\/a><\/p>\n<p style=\"margin-left: 80px; text-align: justify;\">\u2022&nbsp;<a href=\"https:\/\/www.maxesoft.com\/blog\/how-to-make-a-mobile-app-with-reactjs\/\" target=\"_blank\" rel=\"noopener\">How to Make a Mobile App with ReactJS?<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This tutorial contains an overview of how to implement Flurry Analytics in iPhone app. Flurry Analytics helps to follow user behavior inside the app, it&#8217;s nice to have it when it&#8217;s critical to know more about most popular user transitions and steps in the mobile app. So here we are happy to share custom source&#8230;<\/p>\n","protected":false},"author":2,"featured_media":11,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_seopress_titles_title":"How to Integrate Flurry Analytics into iOS App?","_seopress_titles_desc":"Flurry Analytics helps to follow user behavior inside the app, it&#039;s nice to have it when it&#039;s critical to know more about most popular user transitions and steps in the mobile app.","_seopress_robots_index":"","_seopress_robots_follow":"","_seopress_robots_imageindex":"","_seopress_robots_snippet":"","_seopress_robots_primary_cat":"none","_seopress_robots_breadcrumbs":"","_seopress_robots_freeze_modified_date":"","_seopress_robots_custom_modified_date":"","_seopress_robots_canonical":"","_seopress_social_fb_title":"","_seopress_social_fb_desc":"","_seopress_social_fb_img":"","_seopress_social_fb_img_attachment_id":0,"_seopress_social_fb_img_width":0,"_seopress_social_fb_img_height":0,"_seopress_social_twitter_title":"","_seopress_social_twitter_desc":"","_seopress_social_twitter_img":"","_seopress_social_twitter_img_attachment_id":0,"_seopress_social_twitter_img_width":0,"_seopress_social_twitter_img_height":0,"_seopress_redirections_value":"","_seopress_redirections_enabled":"","_seopress_redirections_enabled_regex":"","_seopress_redirections_logged_status":"both","_seopress_redirections_param":"","_seopress_redirections_type":301,"_seopress_analysis_target_kw":"flurry,analytics,ios","footnotes":""},"categories":[2,3,4],"tags":[],"class_list":["post-10","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-all","category-development","category-how-to"],"_links":{"self":[{"href":"https:\/\/www.maxesoft.com\/blog\/wp-json\/wp\/v2\/posts\/10","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.maxesoft.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.maxesoft.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.maxesoft.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.maxesoft.com\/blog\/wp-json\/wp\/v2\/comments?post=10"}],"version-history":[{"count":3,"href":"https:\/\/www.maxesoft.com\/blog\/wp-json\/wp\/v2\/posts\/10\/revisions"}],"predecessor-version":[{"id":1245,"href":"https:\/\/www.maxesoft.com\/blog\/wp-json\/wp\/v2\/posts\/10\/revisions\/1245"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.maxesoft.com\/blog\/wp-json\/wp\/v2\/media\/11"}],"wp:attachment":[{"href":"https:\/\/www.maxesoft.com\/blog\/wp-json\/wp\/v2\/media?parent=10"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.maxesoft.com\/blog\/wp-json\/wp\/v2\/categories?post=10"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.maxesoft.com\/blog\/wp-json\/wp\/v2\/tags?post=10"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}