{"_id":"563a920c0ed6332300378872","__v":8,"parentDoc":null,"user":"55d29988486de50d00327118","version":{"_id":"561c70aabe5fb20d0007775b","__v":6,"project":"561c70aabe5fb20d00077758","createdAt":"2015-10-13T02:47:06.824Z","releaseDate":"2015-10-13T02:47:06.824Z","categories":["561c70abbe5fb20d0007775c","561c725c4b0a9b0d00c0f515","561c7260cd5e7b0d00eb48c6","561c726bf0e0580d00ddd9a4","561c7271d2fb350d004bf89a","564de219b5bea52b00c3457a"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"category":{"_id":"561c7260cd5e7b0d00eb48c6","pages":["561c774b92a66f0d00987915","561c7c46be5c860d007bc1cd","561c7c6e2764990d00f546c4","561c7cc72764990d00f546c6","561dc41143c36d0d00da7798","563a920c0ed6332300378872"],"__v":6,"project":"561c70aabe5fb20d00077758","version":"561c70aabe5fb20d0007775b","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-10-13T02:54:24.912Z","from_sync":false,"order":1,"slug":"messaging","title":"Messaging"},"project":"561c70aabe5fb20d00077758","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-11-04T23:17:32.913Z","link_external":false,"link_url":"","githubsync":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[]},"settings":"","auth":"required","params":[],"url":""},"isReference":false,"order":6,"body":"Use of location can be an incredibly powerful way to target messages to segments of your users, however there are a few considerations to make when considering using location in your app. \n\nThe first question that you must ask, is how accurate does your location need to be to meet your messaging goals? Street? Block? City? State? Country? When considering these\n\n## IP Address\n\nFor City, State and Country level tracking, this can be done with IP Address tracking. **This happens automatically with Carnival** and there are no steps to be taken to get this information. \n[block:callout]\n{\n  \"type\": \"info\",\n  \"title\": \"What is IP Address Tracking?\",\n  \"body\": \"IP Addresses are your phone number on the internet. Just like +1 310 1234567 might represent USA, Los Angeles, IP addresses also correlate in most cases to a physical location of the connection.\"\n}\n[/block]\n## GPS Tracking\n\n### Asking for permission\nGPS Tracking can locate a user to be accurate to a few meters. When using GPS on iOS and Android, the user is prompted to allow your app to get the user's location. **This is a crucial on-boarding step in your app** and generally speaking, the more you warn the user of this prompt and explain why you're using their location, the higher chance you'll have of having them allow your use of it. \n\n### Accuracy vs Battery \nGPS Tracking has levels of accuracy by which a developer can specify when setting it up. However, be warned, that the higher the accuracy, the more of an impact will have on battery life. The best practice is to therefore use only accuracy you need. The location will be updated on a significant change for that particular accuracy, or a specified distance moved. \n\n### Foreground vs background \nLocation can be updated in two different ways, when the app is open, or when the app is open *or* closed. The first consideration here is how accurate you need the data, that is to say that the location data will only be as accurate as at the last time of opening the app. However, it is good practice to collect location information this way. \n\nIf you wish to collect it in the background, there will be battery impacts to your users. Secondly, iOS will continue to prompt the user to continue for permission every few days, and any of these times they could stop opting into location tracking. Once again, users will appreciate having value added for giving up both their private location and battery life. \n\n## iBeacons \niBeacons are for tracking *relative* location, that is to say \"near\" a point of interest. They can track almost down to the half meter depending on set up. Unlike GPS, beacons are best used in background mode, as just sheer proximity to a location can be used to trigger a message with Carnival. Example: Walking past a retail store might prompt a message with a daily special or deal. Beacons require Bluetooth, which uses less battery than GPS but enough to a point that users may notice. Once again, making a case to a user to keep Bluetooth enabled and allow background updates will increase your opt-in rate.\n[block:callout]\n{\n  \"type\": \"success\",\n  \"body\": \"iBeacon is beacon technology that is owned by Apple. The name \\\"iBeacon\\\" has become synonymous with beacon technology in general, as it is widely used.\",\n  \"title\": \"iBeacon vs Beacon\"\n}\n[/block]\n## Summary\n\n * Track only what you need\n * Consider the battery life\n * Add value with location data so users are interested into Opting in","excerpt":"","slug":"using-location-tracking","type":"basic","title":"Using Location Tracking"}

Using Location Tracking


Use of location can be an incredibly powerful way to target messages to segments of your users, however there are a few considerations to make when considering using location in your app. The first question that you must ask, is how accurate does your location need to be to meet your messaging goals? Street? Block? City? State? Country? When considering these ## IP Address For City, State and Country level tracking, this can be done with IP Address tracking. **This happens automatically with Carnival** and there are no steps to be taken to get this information. [block:callout] { "type": "info", "title": "What is IP Address Tracking?", "body": "IP Addresses are your phone number on the internet. Just like +1 310 1234567 might represent USA, Los Angeles, IP addresses also correlate in most cases to a physical location of the connection." } [/block] ## GPS Tracking ### Asking for permission GPS Tracking can locate a user to be accurate to a few meters. When using GPS on iOS and Android, the user is prompted to allow your app to get the user's location. **This is a crucial on-boarding step in your app** and generally speaking, the more you warn the user of this prompt and explain why you're using their location, the higher chance you'll have of having them allow your use of it. ### Accuracy vs Battery GPS Tracking has levels of accuracy by which a developer can specify when setting it up. However, be warned, that the higher the accuracy, the more of an impact will have on battery life. The best practice is to therefore use only accuracy you need. The location will be updated on a significant change for that particular accuracy, or a specified distance moved. ### Foreground vs background Location can be updated in two different ways, when the app is open, or when the app is open *or* closed. The first consideration here is how accurate you need the data, that is to say that the location data will only be as accurate as at the last time of opening the app. However, it is good practice to collect location information this way. If you wish to collect it in the background, there will be battery impacts to your users. Secondly, iOS will continue to prompt the user to continue for permission every few days, and any of these times they could stop opting into location tracking. Once again, users will appreciate having value added for giving up both their private location and battery life. ## iBeacons iBeacons are for tracking *relative* location, that is to say "near" a point of interest. They can track almost down to the half meter depending on set up. Unlike GPS, beacons are best used in background mode, as just sheer proximity to a location can be used to trigger a message with Carnival. Example: Walking past a retail store might prompt a message with a daily special or deal. Beacons require Bluetooth, which uses less battery than GPS but enough to a point that users may notice. Once again, making a case to a user to keep Bluetooth enabled and allow background updates will increase your opt-in rate. [block:callout] { "type": "success", "body": "iBeacon is beacon technology that is owned by Apple. The name \"iBeacon\" has become synonymous with beacon technology in general, as it is widely used.", "title": "iBeacon vs Beacon" } [/block] ## Summary * Track only what you need * Consider the battery life * Add value with location data so users are interested into Opting in