Build Google Play Store URL for Android application with optional Google Analytics UTM parameters. See https://developers.google.com/analytics/devguides/collection/android/v4/campaigns#google-play-url-builder.
$ npm install --save google-play-url-builder
const googlePlayUrlBuilder = require('google-play-url-builder');
// https://play.google.com/store/apps/details?id=com.example.app
const url = googlePlayUrlBuilder('com.example.app');
// https://play.google.com/store/apps/details?id=com.example.app&referrer=utm_source%3Dgoogle%26utm_medium%3Dbanner%26utm_term%3Drunning%252Bshoes%26utm_content%3Dwow%26utm_campaign%3Djustdoit
const urlWithUtm = googlePlayUrlBuilder('com.example.app', {
source: 'google',
medium: 'banner',
term: 'running+shoes',
content: 'wow',
campaign: 'justdoit'
});
See the LICENSE file for details.