Skip to content

Instantly share code, notes, and snippets.

@adambard
Last active May 5, 2016 22:24
Show Gist options
  • Save adambard/af2289a5e918d96fb66010d59609a620 to your computer and use it in GitHub Desktop.
Save adambard/af2289a5e918d96fb66010d59609a620 to your computer and use it in GitHub Desktop.
Instructions for Tapstream-Segment js integration

Getting Started

Tapstream integrates with Segment to simplify and consolidate tracking of user events.

Tapstream attempts to connect in-browser actions with in-app actions, to provide analytics that cross the browser-app border. So, for browser integrations, both track and page calls will be saved as Tapstream "hits" -- browser-side interactions. In the mobile SDK, track will instead send a Tapstream "event", specifying a mobile app interaction.

Browser Integration Instructions

Once the Segment library is integrated with your server or app, toggle Tapstream on on Segment's dashboard, and fill in the settings as documented there.

  • accountName: Your Tapstream account name.
  • pageUrl: Set the URL of the tracked impression (defaults to the current page)
  • customParameters: A map of key-value pairs that will be attached to your impression.
  • storeLinkRewriting: If this is enabled, Tapstream will search for links to your app's store page and automatically rewrite them so that clicks are tracked.

Track

When you track an event, Tapstream will receive an event that will be tracked on your Campaigns tab.

Page

When you call the page method, Tapstream will an impression which will be tracked on your Websites tab.

Mobile Integration Instructions

Integrate the Segment SDK and enable Tapstream. You will need to use the following options:

You will need to provide the following options:

  • accountName: Your Tapstream account name.
  • sdkSecret: The SDK secret from your account page.

In addition, you may specify the following options:

  • fireAutomaticInstallEvent (boolean, default: true): Whether or not to fire an automatic install event
  • installEventName (string, default: '[appname]-[platform]-install'): What to name the automatic install event
  • fireAutomaticOpenEvent (boolean, default: true): Whether to fire an automatic event when the app is opened.
  • openEventName (string, default: '[appname]-[platform]-open'):
  • collectAdvertisingId (boolean, default: true): Whether or not to collect an advertising id

Any other options passed will be included in all events as custom parameters.

Track

When you track an event, Tapstream will receive an event that will be tracked on your Events tab.

More Information

You can read more about Tapstream's SDK on our documentation page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment