Home

AppMeasurement for iOS 2.x

image

Contents

1. cc aiia a aia pa a a a a aaa E a AAA a Ea a Ra 7 PLUG IN ARCHITECTURE OPTIONAL 0 0 0 oo ooo or 10 IOS BEST PRACTICES PLUG IN OPTIONAL 1 ccc es 11 Code Samples as wee sew a ek ood Ais ape eve dee Berane Arendt AE Monee Sue Soames Bar E Se dey 11 Customization Example teca a Beh we a ee a fe Be Aa lo ee Sa ee a le EE a 11 SUPPORTED SITEGATALYST REPORTS 4 isso a oe ta Pe O Paw ee ta Ee 15 CHAPTER 2 V14 VIDEO TRACKING IN IOS APPS 00sec eee eee 19 IOS VIDEO TRACKING VARIABLES 1 0 cc es 19 IOS VIDEO TRACKING METHODS pidi sare vor iis OS 4 DEG A A ie Soa ee re 22 IMPLEMENTATION EXAMPLES 0 aae a a es 24 Configuring Video Tracking cic 2nd ek ca a a ee a ee ea ee ee 24 Using Media Monitor for Advanced Measurement 0 0 0 ccs 25 CHAPTER 3 V15 VIDEO TRACKING IN IOS APPS 00sec eee eee 26 APP MEASUREMENT FOR IPHONE MPLEMENTATION GUIDE iii Preface The Adobe AppMeasurement for OS Integration Guide describes using the AppMeasurement interface to measure the usage of your iPhone and iPad applications It lets you capture certain types of activity in the application and forward that data to Adobe data collection servers where it is available for use in SiteCatalyst reports This guide is intended for application developers and assumes that you are familiar with both implementing SiteCatalyst data collection code and OS application development Terms and Conditions of Use This document and the re
2. You should reset or empty all variables as needed before calling track or trackLink Offline AppMeasurement AppMeasurement lets you measure application usage even when the OS device is offline When enabled Offline AppMeasurement behaves in the following way e The application generates a hit a track or tracklink method call but the data transmission fails e AppMeasurement generates a timestamp for the current hit e AppMeasurement buffers the hit data and backs up buffered hit data to persistent storage to prevent data loss APP MEASUREMENT FOR IOS IMPLEMENTATION GUIDE e At each subsequent hit or at 500 millisecond intervals whichever is shorter AppMeasurement attempts to send the buffered hit data maintaining the original hit order If the data transmission fails it continues to buffer the hit data This continues while the device is offline To enable offline AppMeasurement your report suite must be timestamp enabled After you make this change all hits must be time stamped or they are dropped If you are currently reporting AppMeasurement data to a report suite that also collects data from JavaScript you might need to set up a separate report suite for Offline AppMeasurement to avoid data loss Offline measurement uses the following methods and variables Table 1 1 Offline Measurement Variables TYPE trackOffline Boolean false Enables Disables offline AppMeasurement offlineLimit Integer
3. 2 In the Groups amp Files panel right click on the project where you want to add the AppMeasurement for OS libraries then click Add gt Existing Files 3 Browse to AppMeasurement h then click Add 4 Select Copy items into destination group s folder if needed 5 Set Reference Type to Default 6 Set Text Encoding to Unicode UTF 8 7 Select Recursively create groups for any added folders 8 In the Add To Targets section make sure your project is selected 9 Click Add 10 Complete the steps for Xcode 4 x or Xcode 3 x Xcode 4 x 11 Navigate to the Build Phases tab of your desired target 12 Expand the Link Binary with Libraries item 13 Click the button 14 Select the Add Other button 15 Browse to the libAppMeasurement a file and click Open Xcode 3 x 11 Open the Targets group in the Groups amp Files panel right click the project icon then select Add gt Existing Frameworks 12 In the Linked Libraries section click the Add Libraries icon icon then click Add Other 13 Select 1ibAppMeasurement a then click Add 14 Select Copy items into destination group s folder if needed 15 Set Reference Type to Default 16 Set Text Encoding to Unicode UTF 8 17 Select Recursively create groups for any added folders 18 In the Add To Targets section make sure your project is selected 19 Click Add APP MEASUREMENT FOR IOS IMPLEMENTATION GUIDE 1 4 Implement AppMeasurement for OS
4. Domain e Languages e Time Zones e Visitor Detail e Last 100 Visitors GeoSegmentation Report Support e Country e State e City Mobile Technology Report Support e Devices APP MEASUREMENT FOR IOS IMPLEMENTATION GUIDE Manufacturer Screen Size Screen Height Screen Width Cookie Support Image Support Color Depth Audio Support Video Support Segmentation Report Support Most Popular Pages Most Popular Channels Most Popular Servers Key Visitors Pages Viewed by Key Visitors Custom Insight Custom Links Custom Insight Properties 1 75 Pages Report Support Page Summary Most Popular Pages Clicks to Page Time Spent on Page Pages Not Found Entries Exits Entry Pages Exit Pages Exit Links Complete Paths Report Support Full Paths Longest Paths Path Length Time Spent per Visit Single page Visits APP MEASUREMENT FOR IOS IMPLEMENTATION GUIDE 16 Advanced Analysis Report Support e Previous Page e Next Page e Previous Page Flow e Next Page Flow e PathFinder e Fall out Purchases e Conversions amp Averages e Revenue e Orders e Units Shopping Cart e Conversions amp Averages e Carts e Cart Views e Cart Additions e Cart Removals e Checkouts Products Report Support e Conversions amp Averages e Products e Cross Sell e Categories Campaigns e Conversions amp Averages e Campaigns Customer Loyalty e Customer Loyalty Sales Cycle e Days Before Fir
5. account myreportsuiteID s Media playerName My Media Player custom media player name s Media trackMilestones 25 50 75 could instead use s Media trackSeconds if desired cue points may also be set if desired s Media cuePoints 5 first 15 second 28 third s Media trackAtCuePoints YES mediaName mediaLength mediaPlayerName and mediaOffset are defined elsewher call on video load void startMovie APP MEASUREMENT FOR IOS IMPLEMENTATION GUIDE 24 Chapter 2 v14 Video Tracking in OS Apps s Media open mediaName length mediaLength playerName mediaPlayerName self playMovie call on video resume from pause and slider release void playMovie s Media play mediaName offset mediaOffset call on video pause and slider grab void stopMovie s Media stop mediaName offset mediaOffset call on video end void endMovie self stopMovie s Media close mediaName Using Media Monitor for Advanced Measurement s Media delegate self should be assigned to the object where the media monitor method is defined custom variables Props eVars Events are sent automatically on an OPEN event and when manually tracked here in media monitor below void appMeasurementModuleMediaMonitor AppMeasurement s media AppMeasurementModuleMediaState media if media me
6. be set on the ChurnMeasurement object appInstallEvent appUpgradeEvent dailyEngagedUserEvent monthlyEngagedUserEvent appLaunchEvent appScreenViewEvent appCrashEvent appInstallDateEvar appIdEvar daysSinceFirstUseEvar daysSinceLastUseEvar appLaunchNumberEvar hourOfDayEvar dayOfWeekEvar appEnvironmentEvar daysSinceLastUpgradeEvar event1 event2 event3 event4 event5 event6 event7 eVarl eVar2 eVar4 eVar5 eVar6 eVar7 eVar8 eVar9 eVar10 APP MEASUREMENT FOR IOS IMPLEMENTATION GUIDE Triggered on first run after installation or re installation Triggered on first run after upgrade anytime the version number changes Triggers an event when the application is used on a particular day Triggers an event when the application is used during a particular month Triggered on any run that is not an install or an upgrade This also triggers when the application is brought out of the background Provides a replacement for page view Triggered when the application does not exit gracefully Event is sent on application start after crash the application is considered to crash if quit is not called Date of first launch after installation MM DD YYYY Stores the Application name and version in the following format AppName BundleVersion For example myapp 1 1 Number of days since first run Number of days since last use Number of times the application was launched
7. call NSMutableDictionary trackData NSMutableDictionary alloc init trackData setObject Some page name forKey pageName temporary override trackData setObject Some Prop Val forkKey prop1 temporary override s track trackData trackData release void viewDidLoad Create NSDictionary inline with keys values pass it directly into track call only temporary override s track NSDictionary dictionaryWithObjectsAndKeys Some page name pageName Some Prop Val propl nil must nil terminate dictionary when creating it inline trackLink Send a Custom Link void someNonPageViewAction s trackLink nil linkType o linkName Some Action Name may pass in nil for linkURL if it doesn t apply APP MEASUREMENT FOR IOS IMPLEMENTATION GUIDE trackLink Send a Custom Link with Channel Information void someNonPageViewAction Set Variables s channel Some Application Section s trackLink nil linkType o linkName Some Action Name may pass in nil for linkURL if it doesn t apply trackLink Send a Download Link with Channel and Custom Insight prop Information void someNonPageViewAction Set Variables s channel Some Application Section s propl Snoop s trackLink http www somedownloadURL com linkType d linkName Some Action Name trackLink Send an Exit Link with no variables void someNonPageViewAct
8. event3 Use when Media trackVars includes the events variable Specifies a comma separated list of events to send with the video tracking data For more information see the SiteCatalyst Implementation Guide available in the SiteCatalyst Help System Syntax s Media trackSeconds 15 Defines the interval in seconds for sending video tracking data to Adobe data collection servers while the video is playing The value must be set in increments of 5 seconds The variable sends video tracking data at the start when Media open is called and end when Media close is called of the video and on multiples of the value specified for Media trackSeconds For example every 15 seconds that the video is playing Media trackSeconds tracks time spent viewing a video It does not track how much of the video a visitor views It does not distinguish between viewing the file from beginning to end and replaying a portion of the video multiple times NOTE Do not use this variable simultaneously with Media trackMilestones Syntax s Media trackMilestones 10 50 90 Defines the interval as a percentage of the video watched for sending video tracking data to Adobe data collection servers Specify the milestones as a comma separated list of whole numbers For example 10 10 23 23 The variable sends video tracking data at the start when Media open is called and end when Media close is called of the video and on video percent
9. the video given in the call to Media open e media length The length of the video in seconds given in the call to Media open e media playerName The name of the media player given in the call to Media open e media mediaEvent A string containing the event name that caused the monitor call These events are e OPEN The first call to Media open e CLOSE When Media close is called e PLAY When Media play is called e STOP When Media stop is called e MONITOR When our automatic monitoring checks the state of the video while it s playing every second e SECONDS At the second interval defined by the Media trackSeconds variable e MILESTONE At the milestones defined by the Media trackMilestones variable e CUEPOINT At the cue points defined by the Media cuePoints variable or the Media open method e media openTime An NSDate object containing data about when Media open was Called e media offset The current offset in seconds actual point in the video into the video The offset starts at zero the first second of the video is second 0 e media percent The current percentage of the video that has played based on the video length and the current offset e media timePlayed The total number of seconds played so far e media eventFirstTime Indicates if this was the first time this media event was called for this video e media offsetName The cue point name This is set only when the media event is a cue po
10. 1000 Sets the maximum number of hits to buffer When the number of buffered hits reaches of flineLimit AppMeasurement drops the oldest buffered hit then buffers the newest hit Tune this value based on the amount of data the number of variables sent with each hit offlineThrottleDelay Integer 0 Specifies a cadence or delay in milliseconds for sending buffered hit data when AppMeasurement detects an active network connection Doing so mitigates the performance impact of sending multiple hits on the application For example if offlineThrottleDelay 1000 and it takes 300ms to send the hit data AppMeasurement waits 700ms before sending the next buffered hit timestamp Integer 0 Overrides the default timestamp mechanism in AppMeasurement so you can integrate the application s offline measurement with an existing queue system Adobe recommends letting AppMeasurement manage timestamps if possible Table 1 2 Offline Measurement Methods forceOffline Forces AppMeasurement to behave as if it is offline This lets you delay sending hit data during a hardware intensive operation such as video playback This lets you collect the data offline and then send it once the operation completes forceOnline Returns AppMeasurement to normal operating mode after using the forceOffline method 1 5 Implementation Examples The following examples demonstrate some common use cases for AppMeasurement for OS APP MEASUREMENT FO
11. 22 specifies the Dallas TX collection servers By default this variable is 112 San Jose For example s dc 112 linkTrackEvents No A comma separated list of events that restricts the current set of events for link tracking If s linkTrackEvents is not defined AppMeasurement for OS sends all events For example s linkTrackEvents purchase eventl APP MEASUREMENT FOR IOS IMPLEMENTATION GUIDE 3 linkTrackVars trackingServer trackingServerSecure USELACeimic visitorNamespace currencyCode visitorID linkLeaveQueryString APP MEASUREMENT FOR IOS IMPLEMENTATION GUIDE No No No No No No No A comma separated list of variable names that restricts the current set of variables for link tracking If s linkTrackVars is not defined AppMeasurement for iOS sends all variables with values Even though pageName is sent the Page View count does not increment For example s linkTrackVars events propl eVar49 Identifies the collection domain We recommend always setting this value to the trackingServer contained in the generated scripts in Code Manager If you want to use these variables you must set them both You cannot set only one tracking server variable For example s trackingServer metrics corpl com s trackingServerSecure smetrics corpl com The HTTP User Agent field that is sent with each track call to Adobe data collection servers By default
12. AppMeasurement for iOS sets a default value for this variable that includes iOS device information and application name and version If necessary you can append additional information to this default value For example s userAgent NSString stringWithFormat more data s userAgent The domain used to set cookies For more information about namespace see the SiteCatalyst Implementation Guide For example s visitorNamespace mycompany The Currency Code used for purchases or currency events that are tracked in the iOS application For example s currencyCode USD Unique identifier for each visitor If you do not set a custom visitorID using this variable a random visitorID is generated on initial launch and then stored in a user defaults key This key is used by AppMeasurement from that point forward This key is also saved and restored during the standard application backup process For example s visitorID 12345 Enables YES or disables NO preserving the query string on the URL for links to Web pages from within the iOS application By default this variable is No You cannot override this variable using variable overrides For example s linkLeaveQueryString YES VARIABLE REQUIRED DESCRIPTION ssl No Enables YES or disables NO sending measurement data via SSL HTTPS By default this variable is No You cannot override this variable using variable overrides For example
13. MN Adobe Marketing Cloud Adobe AppMeasurement for OS 2 x Copyright 1996 2012 Adobe Systems Incorporated All rights reserved Omniture is a registered trademark of Adobe Systems Incorporated in the United States Japan and the European Community Terms of Use Privacy Center Omniture products and services are licensed under the following Netratings patents 5 675 510 5 796 952 6 115 680 6 108 637 6 138 155 6 643 696 and 6 763 386 A trademark symbol 6 etc denotes an Adobe trademark An asterisk denotes a third party trademark All third party trademarks are the property of their respective owners 05022012 Table of Contents PREFACE taa ia sra da caia a iv CHAPTER 1 APPMEASUREMENT FOR IOS 2 X 0 0cooccooco 1 NEW S X LIBRARY yss Se nthe cee Pee Wa ek eA ee oe as A EA a Se oe Aa 1 How do I know which library version 2 x Or 3 x to use 2 a 1 REQUIREMENTS 3 se Hi ee Eee ie Bel See a aera ASG Bashi BR GOR ae Rad Sask te ke 1 INSTALL APPMEASUREMENT FOR IOS LIBRARIES 0 ce es 2 XCAM aaa ta aa di ee ae Oe aa dy Rodent Marae ste hee on a aS 2 A aw sae Sal awe iat ae a Sa A eh OA a ate ace ba Siw aia BE De ae ae a 2 IMPLEMENT APPMEASUREMENT FOR IOS ee es 3 Application Config Variables 6 es 3 Track Config Variables aa isunei di a Po es i Ra ee ee Fae ak A et aa ee Maes 5 Ei tesa te A ce a eal AS Nk Aire 5 Offline AppMeasurement 0 0 ee ees 6 IMPLEMENTATION EXAMPLES 0
14. Once installed AppMeasurement for OS provides the following variables and methods for configuring event tracking on your OS application e Application Config Variables e Track Config Variables e Methods e Offline AppMeasurement e Plug In Architecture Optional e Implementation Examples NOTE When you set a variable directly on the object the value acts as the default value until you change it on the object However you can use the variable overrides parameter to set a one time use value that persists only for the current track call then resets to the default value You cannot unset variables with variable overrides For information y about using variable overrides see Implementation Examples on page 7 Application Config Variables The following variables are set when the application launches and typically do not need to change However you can change them at any time if necessary NOTE For string variables use only NSStrings O value not C Strings value account Yes The report suite or report suites multi suite tagging that you wish to track Separate multiple report suites with commas You cannot override this variable using variable overrides For example s account myrsid de No The Adobe data collection servers that receive the event tracking data Consult your Account Manager to find out how you should set this value 112 specifies the San Jose CA collection servers while 1
15. PHONE 1 801 722 7000 FAX 1 801 722 7001 TOLL FREE 1 877 722 7088 support billing and sales SUPPORT E MAIL clientcare omniture com SALES E MAIL sales omniture com INFORMATION E MAIL info omniture com CORPORATE URL http www omniture com LOG IN URL http my omniture com APP MEASUREMENT FOR IPHONE IMPLEMENTATION GUIDE CHAPTER 1 AppMeasurement for OS 2 x Adobe developed AppMeasurement for iOS to provide a mechanism to capture usage of native Apple iPhone and iPad applications in the Adobe Marketing Cloud AppMeasurement for iOS lets you capture application events so you can monitor and evaluate the use of your OS applications AppMeasurement for OS leverages the standard OS development tools to let you integrate OS application measurement into both new and existing OS applications This section includes the following topics e Requirements e Install AppMeasurement for OS Libraries e Implement AppMeasurement for OS e Supported SiteCatalyst Reports 1 1 New 3 x Library Adobe has released a new version of the AppMeasurement for iOS This documentation is for the previous 2 x version See https developer omniture com en_US gallery app measurement for ios for version 3 x How do know which library version 2 x or 3 x to use Version 2 x should be used by clients currently using the Best Practices metrics in their application and on SiteCatalyst version 14 x only All other clients sh
16. R IOS IMPLEMENTATION GUIDE Y e Instance instantiation Declare instance e Instance instantiation Instantiate instance and setup account configuration variables e track Send a Page View Only e track Send a Page View with Channel Information e track Send a Page View with Channel and Custom Insight prop Information e track Send pageView data using variable overrides e trackLink Send a Custom Link e trackLink Send a Custom Link with Channel Information e trackLink Send a Download Link with Channel and Custom Insight prop Information e trackLink Send an Exit Link with no variables Instance instantiation Declare instance Declare instance as either a class ivar in class header file a global static variable or as a singleton AppMeasurement s Instance instantiation Instantiate instance and setup account configuration variables The most likely place to do this is in the applicationDidFinishLaunching method of your AppDelegate class but can be done elsewhere void applicationDidFinishLaunching Instantiate instance s AppMeasurement alloc init Setup application config variables s account myaccount s ssl YES The following instantiation example uses the singleton interface The singleton interface is useful to prevent multiple instances but it should not be used if you are sending data to multiple companies as multiple instances are required void applicationDi
17. acking Methods e Implementation Examples 2 1 iOS Video Tracking Variables AppMeasurement for iOS includes the Media Module which provides several video tracking variables that help you configure the level of video tracking you need Consider the following when working with video tracking variables in iOS apps e Video Tracking for iOS Apps does not currently support video auto tracking due to restrictions in the default iOS video player MPMoviePlayerController e The Media trackWhilePlaying variable is always true for video tracking in iOS apps Because it cannot be set by the developer this variable is excluded from Table 2 1 Table 2 1 iOS Video Tracking Variables Media playerName Syntax s Media playerName Custom Player Name Specifies a custom video player name Media trackVars Syntax s Media trackVars events propl prop5 Specifies a comma separated list of variables to send with the video tracking data NOTE To use Media trackEvents you must include events as one of the variables in Media trackVars For more information see the SiteCatalyst Implementation Guide available in the SiteCatalyst Help System APP MEASUREMENT FOR IOS IMPLEMENTATION GUIDE 19 Chapter 2 v14 Video Tracking in OS Apps Media trackEvents Media trackSeconds Media trackMilestones Media cuePoints Media trackAtCuePoints APP MEASUREMENT FOR IOS IMPLEMENTATION GUIDE Syntax s Media trackEvents event2
18. ages specified in Media trackMilestones based on the length of the video Because these milestones are fixed points in the video if a visitor views past the 10 milestone then rewinds and passes the 10 milestone again Adobe sends the tracking data multiple times Similarly if a visitor fast forwards past a milestone Adobe does not send the tracking data for that milestone NOTE Do not use this variable simultaneously with Media trackSeconds Syntax s Media cuePoints 5 first 17 second Defines cue points in the video by specifying a second offset and optionally a cue point name For example 5 first defines a cue point 5 seconds into the video with a name of first Syntax s Media trackAtCuePoints YES Media trackAtCuePoints defaults to NO Set this variable to YES to automatically send data to Adobe data collection servers at each of the defined cue points 20 Chapter 2 v14 Video Tracking in OS Apps Enabling these variables does not automatically send custom variables Props eVars Events to Adobe data col lection severs To do this you must use the Media Monitor see appMeasurementModuleMediaMonitor _ on page 23 APP MEASUREMENT FOR IOS IMPLEMENTATION GUIDE 21 Chapter 2 v14 Video Tracking in OS Apps 2 2 OS Video Tracking Methods AppMeasurement for OS includes the Media Module which provides several video tracking methods that help you configure the level of video trac
19. amples The code required to use the iOS Best Practices Plug in is included in the AppMeasurement iOS libraries you downloaded from Code Manager In your AppDelegate implementation file you need to add the code listed in this section to your project After you add the code review the customization instructions to select which variables events and props are used to store the data sent by the plug in See Customization Example on page 11 import AppMeasurement h BOOL application UIApplication applicationdidFinishLaunchingWithOptions NSDictionary launchOptions init app measurement AppMeasurement s AppMeasurement getInstance s account account s useBestPractices YES NOTE If you are setting a custom visitorID this must be set before calling the best practices plug in Customization Example To customize which variables events and props are populated by the plug in you need to assign the selected name to the appropriate variable on the ChurnMeasurement object The following example changes the specified variables events and props but leaves the rest of the defaults AppMeasurement s AppMeasurement getInstance ChurnMeasurement c s getChurnInstance appInstallDateEvar eVar5 daysSinceLastUpgradeEvar eVar7 appldEvar nil omits appIdEvar data completely from the request appLaunchEvent event4 appLaunchNumberProp prop2 s useBe
20. dFinishLaunching Instantiate instance AppMeasurement s AppMeasurement getInstance Setup application config variables s account myaccount s ssl YES track Send a Page View Only The most likely place to do this is in the viewDidLoad method of your ViewController class but can be done anywhere void viewDidLoad Set Variables s pageName Some Page Name s channel nil clears any previously set value for channel s propl nil clears any previously set value for propl s track APP MEASUREMENT FOR IOS IMPLEMENTATION GUIDE track Send a Page View with Channel Information The most likely place to do this is in the viewDidLoad method of your ViewController class but can be done anywhere void viewDidLoad Set Variables s pageName Some Page Name s channel Some Site Section s track track Send a Page View with Channel and Custom Insight prop Information The most likely place to do this is in the viewDidLoad method of your ViewController class but can be done anywhere void viewDidLoad Set Variables s pageName Some Page Name s channel Some Site Section s propl Some Value s track track Send pageView data using variable overrides Specifies a temporary variable value used only for track call void viewDidLoad Create an NSMutableDictionary set values on it corresponding to tracking variable keys pass it into track
21. diaEvent isEqualToString OPEN executes when the video opens s Media trackVars eVarl events s Media trackEvents eventl s events eventl s eVarl media name s Media trac k media name 1f media medial Event isEqualToString CLOSE executes when the video completes s Media trackVars eVarl events s Media track s events Events event4 vent4 s eVarl media name s Media trac k media name APP MEASUREMENT FOR IOS IMPLEMENTATION GUIDE 25 v15 Video Tracking in OS Apps CHAPTER 3 Video tracking for all platforms is described in the Measuring Video in SiteCatalyst http microsite omniture com t2 help en_US sc appmeasurement video index html guide APP MEASUREMENT FOR IOS IMPLEMENTATION GUIDE 26
22. ffset The number of seconds into the video that play begins Specify the offset based on the video starting at second zero Media stop Syntax s Media stop mediaName offset mediaOffset Tracks a stop event stop pause etc for the specified video This method takes the following parameters mediaName The name of the video as you want it to appear in SiteCatalyst video reports mediaOffset The number of seconds into the video that the stop or pause event occurs Specify the offset based on the video starting at second zero APP MEASUREMENT FOR IOS IMPLEMENTATION GUIDE 22 Chapter 2 v14 Video Tracking in OS Apps appMeasurementModuleMe diaMonitor Syntax void appMeasurementModuleMediaMonitor AppMeasurement s media AppMeasurementModuleMediaState media The iOS app media monitor implements the Objective C delegate design pattern Use this functionality to monitor the status of each video that is currently playing With it you can setup other variables Props eVars Events and call Media track based on the current state of the video as it is playing This is useful if you have code that tracks events such as resizing and volume adjustments that you want to send when the video finishes playing This method takes the following parameters s The AppMeasurement instance media An AppMeasurementModuleMediaState object with members providing the state of the video These members include e media name The name of
23. int APP MEASUREMENT FOR IOS IMPLEMENTATION GUIDE 23 Chapter 2 v14 Video Tracking in OS Apps Media track Syntax s Media track mediaName Immediately sends the current video state along with any Media trackVars and Media trackEvents Call Media open and Media play on the video before calling this method This method takes the following parameter mediaName The name of the video as you want it to appear in SiteCatalyst video reports Make sure you pass the same mediaName used to call Media open This method is the only way to send in other variables while the video is playing This method resets the seconds interval and percent milestone counters to zero to prevent multiple tracking hits Media cuePoint Syntax s Media cuePoint mediaName offset cuePointOffset cuePointName cuePointName Manually fires a cue point This method takes the following parameter mediaName The name of the video as you want it to appear in SiteCatalyst video reports Make sure you pass the same mediaName used to call Media open cuePointOffset An offset into the video in seconds cuePointName Optional A name for the cue point 2 3 Implementation Examples The following code samples demonstrate the use of video tracking in an iOS application e Configuring Video Tracking e Using Media Monitor for Advanced Measurement Configuring Video Tracking import AppMeasurement h AppMeasurement s AppMeasurement alloc init s
24. ion Set Variables s channel nil clears any previously set value for channel s propl nil clears any previously set value for propl s trackLink http www someexitdomain com linkType e linkName Some Action Name 1 6 Plug In Architecture Optional AppMeasurement for iOS supports a plug in architecture that lets you build custom plug ins that extend AppMeasurement for iOS functionality It implements the Objective C delegate design pattern Use this functionality to modify the AppMeasurement for iOS object to manipulate data before sending it to Adobe data collection servers The following example demonstrates how to link the delegate object to the AppMeasurement for iOS object AppMeasurement s AppMeasurement alloc init s delegate self s ssl YES s usePlugins YES s account myreportsuiteid s pageName Main View s track After instantiating the object have your delegate object implement the AppMeasurementDelegate protocol interface MyClass NSObject lt AppMeasurementDelegate gt void appMeasurementDoPlugins AppMeasurement s custom code APP MEASUREMENT FOR IOS IMPLEMENTATION GUIDE 10 s prop4 plugin 1 7 iOS Best Practices Plug In Optional Adobe Best Practices iOS App Measurement plug in provides a simple way to measure many common metrics including many churn metrics for your iOS app with only a few lines of code Code S
25. is a dynamic variable that copies the value from the appIDEvar Make sure the corresponding eVar is not set to nil if you want this prop value Number of times the application was launched or brought out of the background This is a dynamic variable that copies the value from the appLaunchNumberEvar Make sure the corresponding eVar is not set to nil if you want this prop value Number of launches since the application version number has changed This is a dynamic variable that copies the value from the appLaunchSinceLastUpgradeEvar Make sure the corresponding eVar is not set to nil if you want this prop value 13 APP MEASUREMENT FOR IOS IMPLEMENTATION GUIDE 14 1 8 Supported SiteCatalyst Reports The following SiteCatalyst reports include data submitted by AppMeasurement for OS For more information about these reports see the SiteCatalyst User Guide Site Metrics Report Support e Page Views e Hourly Unique Visitors e Daily Unique Visitors e Monthly Unique Visitors e Yearly Unique Visitors e Visits e File Downloads Finding Methods Report Support NOTE These reports are available only if the developer has access to the referrer information when developing the application which might not be feasible in some circumstances e Referring Domains e Referrers e Return Frequency e Daily Return Visits e Return Visits e Visit Number Visitor Profile Report Support e Domains e Full Domains e Top Level
26. king you need Table 2 2 iOS Video Tracking Methods Media open Syntax s Media open mediaName length mediaLength playerName mediaPlayerName cuePoints cuePoints playerID playerID Prepares the media module to collect the following video tracking data This method takes the following parameters mediaName The name of the video as you want it to appear in SiteCatalyst video reports mediaLength The length of the video in seconds mediaPlayerName The name of the media player used to view the video as you want it to appear in SiteCatalyst video reports cuePoints Optional Defines cue points in the video by specifying a second offset and optionally a cue point name This is identical to setting the Media cuePoints variable playerID Optional A unique identifier for the video player If you have multiple video players in your application use this parameter so Adobe can distinguish between them Media close Syntax s Media close mediaName Ends video data collection and sends information to Adobe data collection servers Call this method at the end of the video This method takes the following parameters mediaName The name of the video as you want it to appear in SiteCatalyst video reports Media play Syntax s Media play mediaName offset mediaOffset Call this method anytime a video starts playing This method takes the following parameters mediaName This must match the name used in Media open mediaO
27. lated software described in this document is proprietary to Adobe Systems Inc and is supplied only under license or nondisclosure agreement The document and software can be used or copied only in accordance with the terms of the agreement Enterprise Terms of Use https sc omniture com p l10n 1 0 terms html The information in this document is subject to change without notice and does not represent a commitment on the part of Adobe Account Support ClientCare is available to e Answer specific product questions e Help you utilize SiteCatalyst reports to the greatest effect e Resolve any technical difficulties you might have e Help you configure SiteCatalyst variables Service and Billing Information Depending on the service level you have purchased some of the options described in this guide might not be available to you Additionally each account has unique billing needs Please refer to your contract for pricing due dates terms and conditions If you would like to add to or otherwise change your service level or if you have questions regarding your current service please contact your Account Manager Adobe welcomes any suggestions or feedback you might have regarding AppMeasurement for iOS or the contents of this guide Send comments to your Account Manager APP MEASUREMENT FOR IPHONE IMPLEMENTATION GUIDE iv Contact Information CORPORATE ADDRESS Adobe Systems Inc 550 East Timpanogos Circle Orem UT 84097
28. or brought out of the background Measures the hour the app was launched 24 hour numerical format Used for time parting to determine peak usage times 3 character day when the application was used Contains the current iOS version Number of days since the application version number has changed 12 appLaunchNumberSinceLas eVari1 tUpgradeEvar engagedDaysLifetimeEvar eVar3 Type Counter engagedDaysMonthEvar eVar12 Type Counter Expire After Monthly User Event engagedDaysLastUpgradeE eVar13 yai Type Counter Expire After Upgrade Event appIdProp propi appLaunchNumberProp prop2 appLaunchNumberSinceLas prop3 tUpgradeProp APP MEASUREMENT FOR IOS IMPLEMENTATION GUIDE Number of launches since the application version number has changed Stores the number of days the application is used NOTE This eVar must be configured as a counter Total count of days the application was used in the last month NOTE This eVar must be configured as a counter Set the expiration to Expire After the event you selected for monthlyEngagedUserEvent default is event4 Total count of days the application was used since last upgrade NOTE This eVar must be configured as a counter Set the expiration to Expire After the event you selected for appUpgradeEvent default is event2 Stores the Application name and version in the following format AppName BundleVersion For example myapp 1 1 This
29. ould use the latest 3 x library which includes all SiteCatalyst vi5 clients and SiteCatalyst v14 clients not using the Best Practices metrics All new enhancements will be against the version 3 x library so it s recommended you move to that library in your next app update 1 2 Requirements e AppMeasurement for iOS consists of the following software components You can download the AppMeasurement software from SiteCatalyst s Code Manager For information about using Code Manager see Code Manager in the Admin Console User Guide which is available in the SiteCatalyst Help System AppMeasurement h The Objective C header file libAppMeasurement a a fat binary containing the library builds for device armv6 and armv7 as well as the simulator i386 libAppMeasurementNoThumb a a fat binary built with THUMB instruction set disabled for compatibility with some third party development frameworks e Adobe recommends the following for developing iOS applications Consult the Apple Development Center for the latest iOS development information e Intel based Mac for application development e Mac OS X 10 6 0 or later e Xcode 3 0 or later e SDK for iOS 2 0 or later APP MEASUREMENT FOR IOS IMPLEMENTATION GUIDE 1 1 3 Install AppMeasurement for OS Libraries Once you have AppMeasurement for OS complete the following steps to install the AppMeasurement for OS libraries into an OS application project 1 Launch the Xcode IDE
30. riable overrides for that track call APP MEASUREMENT FOR IOS IMPLEMENTATION GUIDE trackLink linkType linkName trackLink linkType linkName variableOverrides clearVars Sends custom download or exit link data to Adobe data collection servers along with any track config variables that have values Use trackLink to track all activity that should not capture a page view trackLink has the following parameters url Identifies the clicked URL If no URL is specified the name is used Use this only when linking to a Web page from within your iOS application Otherwise pass in nil for this parameter type Identifies the link report that will display the URL or name Supported values include e o Custom Links e d File Downloads e e Exit Links name The name that appears in the link report If no name is specified the report uses the URL NOTE To collect data you must specify either the name Orurl parameter When not using one of these parameters pass in nil as the value Same as trackLink except you can pass in a list of key value pairs that indicates temporary variable overrides for that trackLink call Clears the following track config variables on the object channel EVENTS purchaseID transactionID products STATE ZAO campaign propos O eVars 1 75 hiers 1 5 TIP Page view tracking track and link tracking trackLink sends all variables that have values non nil non empty
31. s ssl YES debugTracking No Enables YES or disables NO viewing debug information in the Xcode console By default this variable is NO You cannot override this variable using variable overrides For example s debugTracking YES usePlugins No Enables YES or disables NO using plug ins as part of a delegate implementation By default this variable is No You cannot override this variable using variable overrides For example s usePlugins YES Track Config Variables The following variables are typically set before calling one of the track methods For more information about these tracking variables see the SiteCatalyst Implementation Guide pageName server zip pageURL pageType events referrer dynamicVariablePrefix products purchaselD variableProvider prop 1 75 transactionID campaign eVar 1 75 channel state hier 1 5 Methods The following tracking methods send data to Adobe data collection servers NOTE When using variable overrides use the variable name as the key in a key value pair Also use only strings as values in the key value pairs METHOD DESCRIPTION track Sends a standard page view to Adobe data collection servers along with any Track Config Variables that have values NOTE AppMeasurement automatically creates a thread to execute track Do not create a separate thread manually track Same as track except you can pass in a list of key value pairs that indicates temporary va
32. st Purchase e Days Since Last Purchase e Visit Number e Daily Unique Customers e Monthly Unique Customers APP MEASUREMENT FOR IOS IMPLEMENTATION GUIDE 17 e Yearly Unique Customers Finding Methods e Referring Domains e Original Referring Domains Visitor Profile e Countries e Languages e Time Zones e States e ZIP Postal Codes e Domains Site Path e Entry Pages e Original Entry Pages e Pages per Visit e Time Spent on Site e Content Groups Custom Variables e Custom E Commerce Variables 1 75 APP MEASUREMENT FOR IOS IMPLEMENTATION GUIDE 18 CHAPTER 2 v14 Video Tracking in OS Apps WARNING The video tracking procedure described in this chapter is deprecated and is compatible with SiteCatalyst 14 only If you are developing a new video implementation we recommend using the new video tracking method described in vi5 Video Tracking in iOS Apps on page 26 The new video tracking method is supported for SiteCatalyst 14 and 15 AppMeasurement for OS lets you capture data about video usage in your OS application To do this AppMeasurement for OS gathers basic information from the media player then builds a session of events and sends it to Adobe data collection servers for processing After the collection servers process the video data it is accessible through a set of SiteCatalyst video reports This section contains the following topics e iOS Video Tracking Variables e iOS Video Tr
33. stPractices YES G O QG OQ Q if you would like only a few variables events or props populated you can use the populateDefaults flag to turn off defaults being populated the default behavior is to populate all defaults After turning this flag off simply set the variables that you want to use In the following example only eVar1 event1 and event2 are sent on the plug in request AppMeasurement s AppMeasurement getInstance ChurnMeasurement c s getChurnInstancePopulateDefaults NO c appInstallEvent eventl1 APP MEASUREMENT FOR IOS IMPLEMENTATION GUIDE 11 eVarl c appiInstallDateEvar c appCrashEvent event2 s useBestPractices YES The following list contains general notes regarding ChurnMeasurement variables e Variables may be turned off if desired by setting the variable to nil some variables being turned off will cause other variables to be turned off automatically because their values are used by the other e Days Since metrics are determined by 24 hour incremental periods from the first use install Days Since metrics are not sent on subsequent launches of the event in question install upgrade etc Days Since metrics are relative to the first use after an event install upgrade etc not the actual install upgrade of the app on the device The following table lists the variables events and props including the default value that can

Download Pdf Manuals

image

Related Search

Related Contents

User Guide    Wheel Aligner - Auto One India  MANUAL DE USUARIO SISTEMA DE  Miele DA 3496 cooker hood  取扱説明書PDF  Powermate MLA1983054 Parts list  Modell-Nr. WV-SFR531/WV-SFN531 - Psn  Electrolux ER6633I User's Manual  LED-TV / DVD COMBI DVB  

Copyright © All rights reserved.
Failed to retrieve file