Giter Site home page Giter Site logo

tenjin / tenjin-react-native-sdk Goto Github PK

View Code? Open in Web Editor NEW
1.0 11.0 1.0 499 KB

Tenjin React Native SDK

Java 48.61% JavaScript 4.79% Objective-C 6.55% Ruby 9.61% Objective-C++ 20.56% TypeScript 9.46% Swift 0.15% C 0.27%
vanta-contains-user-data

tenjin-react-native-sdk's Introduction

React Native Tenjin Plugin

Summary

The Tenjin React Native Plugin allows users to track events and installs in their iOS/Android apps. To learn more about Tenjin and our product offering, please visit https://www.tenjin.com.

Notes:

On iOS: For AppTrackingTransparency, be sure to update your project .plist file and add NSUserTrackingUsageDescription along with the text message you want to display to users. This library is only available in iOS 14.0+. For further information on this, you can check our iOS documentation

Plugin Integration

Getting started

$ npm install react-native-tenjin --save

Mostly automatic installation

$ react-native link react-native-tenjin

Import

import Tenjin from 'react-native-tenjin';

Available methods

Initialize

You need to initialize the plugin before doing calling any of the other methods available, for this, you would need the api key provided on Tenjin's dashboard:

Tenjin.initialize(apiKey)

Parameters:

  • apiKey: String

Connect

Tenjin.connect()

Set AppStore type (only available for Android)

Tenjin.setAppStore(type)

Parameters:

  • type: String, possible values (googleplay, amazon, other)

OptIn

Tenjin.optIn()

OptOut

Tenjin.optOut()

OptIn with parameters

Tenjin.optIn(parameters)

Parameters:

  • parameters: Array

OptOut with parameters

Tenjin.optOut(parameters)

Parameters:

  • parameters: Array

OptIn and OptOut using CMP

Tenjin.optInOutUsingCMP()

Opt out of Google DMA parameters

Tenjin.optOutGoogleDMA()

Opt in of Google DMA parameters

Tenjin.optInGoogleDMA()

Register transaction

transaction(productName, currencyCode, quantity, unitPrice)

Parameters:

  • productName: String
  • currencyCode: String
  • quantity: Number
  • unitPrice: Number

Send event with name

Tenjin.eventWithName(name)

Parameters:

  • name: String

Send event with name and value

Tenjin.eventWithNameAndValue(name, value)

Parameters:

  • name: String
  • value: String

Get attribution info

Tenjin.getAttributionInfo(
    (success) => {
        console.log(`Attibution info found! ${success}`);
    },
    () => {
        console.error(`Attribution info failed`);
    }
)

Parameters:

  • successCallback: Callback
  • errorCallback: Callback

Append app subversion

Tenjin.appendAppSubversion(subversion)

Parameters:

  • subversion: Number

Customer User ID

Tenjin.setCustomerUserId(userId)

Parameters:

  • userId: string
Tenjin.getCustomerUserId()

Returns: callback -> string

Get Analytics Installation ID

Tenjin.getAnalyticsInstallationId()

Returns: callback -> string

Send AdMob impression (ILRD)

Tenjin.eventAdImpressionAdMob(json)

Parameters:

  • json: JSON

Send AppLovin impression (ILRD)

Tenjin.eventAdImpressionAppLovin(json)

Parameters:

  • json: JSON

Send HyperBid impression (ILRD)

Tenjin.eventAdImpressionHyperBid(json)

Parameters:

  • json: JSON

Send IronSource impression (ILRD)

Tenjin.eventAdImpressionIronSource(json)

Parameters:

  • json: JSON

Send TopOn impression (ILRD)

Tenjin.eventAdImpressionTopOn(json)

Parameters:

  • json: JSON

Send TradPlus impression (ILRD)

Tenjin.eventAdImpressionTradPlus(json)

Parameters:

  • json: JSON

Send Google DMA Parameters

Tenjin.setGoogleDMAParametersWithAdPersonalization(adPersonalization, adUserData)

Parameters:

  • adPersonalization: Boolean
  • adUserData: Boolean

Support

If you have any issues with the plugin integration or usage, please contact us to [email protected]

tenjin-react-native-sdk's People

Contributors

giraldogdiego avatar caleon avatar farmcp avatar tenjin-kraken avatar

Stargazers

Pham Tuan Anh avatar

Watchers

Van Pham avatar Ricky Nguyen avatar Matjaz Kristl avatar Joey Zhou avatar Nafeu Nasir avatar Makoto Taguchi avatar Kartik Modi avatar  avatar  avatar  avatar  avatar

Forkers

wanderlog

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.