Smart App Banner with Pure JavaScript

Category: Javascript , Notification | July 10, 2018
Author: dfcreative
Views Total: 4,464 views
Official Page: Go to website
Last Update: July 10, 2018
License: MIT

Preview:

Smart App Banner with Pure JavaScript

Description:

A lightweight standalone JavaScript library for creating an iOS style smart banner to promote apps on Apple App Store, Google Play and Windows Store from your website.

How to use it:

Put the following markups into the head section.

<meta name="apple-itunes-app" content="app-id=502838820">
<meta name="google-play-app" content="app-id=ru.hh.android">
<meta name="msApplication-ID" content="microsoft.build.App">
<meta name="msApplication-PackageFamilyName" content="microsoft.build_8wekyb3d8bbwe">
<link rel="stylesheet" href="smart-app-banner.css">
<link rel="apple-touch-icon" href="icon.png">
<link rel="android-touch-icon" href="icon.png">
<link rel="windows-touch-icon" href="icon.png">

Load the smart-app-banner.js in the body.

<script src="smart-app-banner.js"></script>

The JavaScript.

new SmartBanner({
  daysHidden: 15,   // days to hide banner after close button is clicked (defaults to 15)
  daysReminder: 90, // days to hide banner after "VIEW" button is clicked (defaults to 90)
  appStoreLanguage: 'us', // language code for the App Store (defaults to us)
  title: 'MyPage',
  author: 'MyCompany LLC',
  button: 'VIEW',
  store: {
    ios: 'On the App Store',
    android: 'In Google Play',
    windows: 'In Windows store'
  },
  price: {
    ios: 'FREE',
    android: 'FREE',
    windows: 'FREE'
  }
  // , force: 'ios' // Uncomment for platform emulation
});

Changelog:

07/10/2018

  • v1.5.1: bugfix

You Might Be Interested In:


One thought on “Smart App Banner with Pure JavaScript

  1. Эркин Мухамедкулов

    how can i add custom theme to this plugin ?

    Reply

Leave a Reply