In blog

If you have an iOS or Android app you would want to show installation banner when users visit your website via mobile browser. Detailed info below —–

ios Small App banner

<meta name="apple-itunes-app" content="app-id=960174190">

Android Small App banner

<meta name="google-play-app" content="app-id=XXXXX">

ios Small App banner

Add the meta to the header part of your website and you are good to go. According to apple here is the detailed your you could use <meta name=”apple-itunes-app” content=”app-id=myAppStoreID, affiliate-data=myAffiliateData, app-argument=myURL”> app-id: (Required.) Your app’s unique identifier. Go to your app url for example https://itunes.apple.com/us/app/tamilsoda-music-videos-independent/id960174190?mt=8 Your app id is the number followed by id. Its nine-digit number affiliate-data: (Optional.) If you are iTunes affiliate you could add your affiliate url here http://www.apple.com/itunes/affiliates/   app-argument: (Optional.) If you want users to go to certain page within the app you could use app argument code here For example, if you add app-argument=http://mywebsite.com/reviews?123, the following code in your app’s AppDelegate could take the user directly to the review with ID 123 in your app:

- (BOOL)application:(UIApplication *)application             openURL:(NSURL *)url   sourceApplication:(NSString *)sourceApplication          annotation:(id)annotation {     if ([[url path] isEqualToString:@"/reviews"]) {     	ReviewViewController *viewController = [[ReviewViewController alloc] init];     	viewController.reviewID = [url query];         [self.navigationController pushViewController:viewController animated:NO];     }     return YES; }  --

Android Small App banner

<meta name="google-play-app" content="app-id=XXXXX">

App ID is the id of your android app. Go to your app your for example https://play.google.com/store/apps/details?id=com.ying.tamilsoda You app id is here is com.ying.tamilsoda This has not been tested, please let us know if it does work more documentation on this section can be read here http://developer.android.com/distribute/tools/promote/linking.html —

Showing small app banner on chrome

Currently the above meta tags does not work on iOS chrome browser. Jasny has produces a workaround that will show small banner on iOS chrome browser http://jasny.github.io/jquery.smartbanner/ When we tested it, app banner worked great on chrome browser. How ever on safari there was two banners, one banner from the meta tag and another from the smart banner. — Further reading

  • http://www.raywenderlich.com/80347/smart-app-banners-tutorial
  • https://developer.apple.com/library/mac/documentation/AppleApplications/Reference/SafariWebContent/PromotingAppswithAppBanners/PromotingAppswithAppBanners.html
  • http://jasny.github.io/jquery.smartbanner/
  • https://github.com/kudago/smart-app-banner
  • http://misha.beshkin.lv/add-app-install-banner-to-site/

— Please follow us on Facebook and Twitter

Recommended Posts
0