Code Monkey home page Code Monkey logo

titanium-installreferrer's Introduction

titanium-installreferrer

This module receives and stores the INSTALL_REFERRER sent by Google Play (where exists), which can then be returned when you need it.

INSTALL

The module (net.pixelfactor.installreferrer-android-1.zip) is located under the dist folder. Add it to your Titanium project using your preferred method. If you are not sure how to do this, check Using Titanium Modules.

There is no need to add anything else to your tiapp.xml file, however, you must make sure that you don’t already have a receiver for the INSTALLL_REFERRER action. If your tiapp.xml already contains

<action android:name="com.android.vending.INSTALL_REFERRER" />

somewhere in it, delete its receiver.

USAGE

In your application, where you need to retrieve the INSTALL_REFERRER, add the following:

var installReferrer = require('net.pixelfactor.installreferrer');
var utmSource = decodeURIComponent(installReferrer.getUtmSource());

This will return the INSTALL_REFERRER string in the following format:

utm_source=Source&utm_medium=Medium&utm_term=Term&utm_content=Content&utm_campaign=Name

or NULL if no INSTALL_REFERRER was received from Google Play.

Since the INSTALL_REFERRER string is saved with the application, it will be returned (if sent) every time you call getUtmSource() method, so if you want to track this only after the application has been launched for the first time, you will have to implement it yourself.

TESTING

If you want to test it without having to upload an APK to Google Play, you can use the Referral Tester app (NOT FREE) which will simulate a market broadcast.

titanium-installreferrer's People

Contributors

px-factor avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.