Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.vscode creation of adobe-analytics library Apr 3, 2018
android update adobe sdk (4.15.0 to 4.17.2) Mar 15, 2019
config creation of adobe-analytics library Apr 3, 2018
flow-typed/npm
ios Update library and modifying sample project to have a working example… Mar 18, 2019
sample bump library version + update lock files Mar 18, 2019
src add methods to get screen name May 15, 2018
.babelrc creation of adobe-analytics library Apr 3, 2018
.eslintrc creation of adobe-analytics library Apr 3, 2018
.flowconfig creation of adobe-analytics library Apr 3, 2018
.gitattributes creation of adobe-analytics library Apr 3, 2018
.gitignore
.npmignore
README.md update readme Mar 18, 2019
index.js
package-lock.json bump library version + update lock files Mar 18, 2019
package.json bump library version + update lock files Mar 18, 2019

README.md

react-native-adobe-analytics

Getting started

$ npm install odemolliens/react-native-adobe-analytics --save

Mostly automatic installation

$ react-native link react-native-adobe-analytics

Manual installation

iOS

  1. In XCode, in the project navigator, right click LibrariesAdd Files to [your project's name]. Check only Copy items if needed.
  2. In XCode, in the project navigator, select your project. Add libRNAdobeAnalytics.a to your project's Build PhasesLink Binary With Libraries
  3. In XCode, in the project navigator, select your project. Add libsqlite3.0.tbd to your project's Build PhasesLink Binary With Libraries
  4. In XCode, in the project navigator, select your project. Add SystemConfiguration.framework to your project's Build PhasesLink Binary With Libraries
  5. In XCode, in the project navigator, select your project. Drag and drop your json config file ADBMobileConfig.json and check only Copy items if needed.
  6. Run your project (Cmd+R)<

Android

  1. Open up android/app/src/main/java/[...]/MainActivity.java
  • Add import com.odemolliens.rn.adobe.analytics.RNAdobeAnalyticsPackage; to the imports at the top of the file
  • Add new RNAdobeAnalyticsPackage() to the list returned by the getPackages() method
  1. Append the following lines to android/settings.gradle:
    include ':react-native-adobe-analytics'
    project(':react-native-adobe-analytics').projectDir = new File(rootProject.projectDir, 	'../node_modules/react-native-adobe-analytics/android')
    
  2. Insert the following lines inside the dependencies block in android/app/build.gradle:
      compile project(':react-native-adobe-analytics')
    
  3. Open (or create it if it's not the case) YOUR_APP/app/src/main/res/raw and add your json config file adbmobileconfig.json (file's name need to contain only lowercase)

Usage

```js
import { Adobe } from 'react-native-adobe-analytics';
```

Setup

Adobe Analysis must be initialized as soon as the mobile application has started:

```js
import { Adobe } from 'react-native-adobe-analytics';

export default class App {
  constructor() {
    super()
			// If you know it, add your packageName. Otherwise enter a blank string ''.
			var packageName : string = 'com.sample'
			Adobe.init(packageName);
  }
}
```

Import

In any js file, you can start to use this plugin by adding:

```js
import { Adobe } from 'react-native-adobe-analytics';
```

Track Event

In any js file, you can track events by using:

```js
  Adobe.trackEvent('my_event', null);
```

Can be used with extra parameters:

```js
  const extraParameters = { 'screen.category.l1': 'cat1', 'screen.category.l2': 'cat2', 'screen.category.l3': 'cat3', 'screen.category.l4': 'cat4' };
  Adobe.trackEvent('my_event',extraParameters);
```

Track View

In any js file, you can track views by using:

```js
  Adobe.trackState('my_view_name',null);

```

Can be used with extra parameters:

```js
  const extraParameters = { 'screen.category.l1': 'cat1', 'screen.category.l2': 'cat2', 'screen.category.l3': 'cat3', 'screen.category.l4': 'cat4' };
  Adobe.trackState("my_view_name", extraParameters);
```

Build Status

Changelog

Version 1.0.0

  • Library created

Version 1.0.1

  • Can change adobe's config file by environment on ios

Version 1.0.2

  • Can change adobe's config file by environment on android

Version 1.1.1

  • Allow debugging on Android

Version 1.1.2

  • Fix Android Lifecycle

Version 1.1.4

  • Update Adobe SDK (current version: v4.17.12 (Android) & v4.18.0 (iOS))
You can’t perform that action at this time.