1.0.1 • Published 6 years ago

google-play-url-builder v1.0.1

Weekly downloads
7
License
MIT
Repository
github
Last release
6 years ago

npm Build Status David semantic-release

google-play-url-builder

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.

Install

$ npm install --save google-play-url-builder

Usage

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'
});

License

See the LICENSE file for details.