Skip to content

Build Google Play Store URL for Android application with optional Google Analytics UTM parameters

License

Notifications You must be signed in to change notification settings

mxl/google-play-url-builder

Repository files navigation

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.

About

Build Google Play Store URL for Android application with optional Google Analytics UTM parameters

Resources

License

Stars

Watchers

Forks

Packages

No packages published