Ionic mobile app integrate with Adobe analytics | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by larrya22423990

Hi Jen -- Thank you for your help. We were able to display the report on the Adobe Analytics portal from our Ionic mobile app.

By the way, I would like to share some of the steps below that I did on my end (Ionic Angular Android). I hope this may help some of our fellow developers.

Install the plugin using npm

ionic cordova plugin add adobe-mobile-services

npm i @types/window-or-global —save

Go to platform_www directory

Add ADBMobileConfig.json to platforms/android/app/platform_www

Add adobeMobileLibrary -4.x.x.jar as Library

Right click on adobeMobileLibrary -4.x.x.jar and select “Add as Library”

Import ADB_Helper.js to your typescript page

import ADB from "adobe-mobile-services/sdks/Cordova/ADBMobile/Shared/ADB_Helper.js";

ngOnInit() {

     ADB.trackState("page name", null)

}

btnClick() {

     ADB.trackAction("buttonclick-contact", { action: "click-button")

}

7 replies

Adobe Employee
September 6, 2019

larrya22423990

We don't have any docs for Ionic, you can take a look at the PhoneGap docs and see if that helps PhoneGap Plug-in.

September 12, 2019

Thanks for the reply Shalehaha. I'm using the adobe-mobile-service plugin using cordova. I hope we have a good example for trackSite() method.

The link the you provided doesnt also work on my end. By the way I'm working on ionic with Android platform

Adobe Employee
September 12, 2019

PhoneGap Plug-in  , this is the Android docs.

We don't have any trackSite() method. What are you trying to implement?

September 14, 2019

Sorry I mean trackState() method. I trying to implement the trackState() method on my Ionic Android app. However, upon following the instructions (mobile-services/sdks/Cordova at master · Adobe-Marketing-Cloud/mobile-services · GitHub ). I still cant figure out why I can't get the number of views reflected on my workspace.

Jennifer_Andrews
Adobe Employee
Adobe Employee
September 17, 2019

In your console/logcat or via tool like Charles, are you seeing a hit for the trackState being sent?

In Workspace are you looking at the pageView for the trackState?

Do you have any reporting?  Such as Lifecycle Metrics or trackAction being reported in workspace, as Launches and Action Name?

Regards,
Jen 

larrya22423990AuthorAccepted solution
September 21, 2019

Hi Jen -- Thank you for your help. We were able to display the report on the Adobe Analytics portal from our Ionic mobile app.

By the way, I would like to share some of the steps below that I did on my end (Ionic Angular Android). I hope this may help some of our fellow developers.

Install the plugin using npm

ionic cordova plugin add adobe-mobile-services

npm i @types/window-or-global —save

Go to platform_www directory

Add ADBMobileConfig.json to platforms/android/app/platform_www

Add adobeMobileLibrary -4.x.x.jar as Library

Right click on adobeMobileLibrary -4.x.x.jar and select “Add as Library”

Import ADB_Helper.js to your typescript page

import ADB from "adobe-mobile-services/sdks/Cordova/ADBMobile/Shared/ADB_Helper.js";

ngOnInit() {

     ADB.trackState("page name", null)

}

btnClick() {

     ADB.trackAction("buttonclick-contact", { action: "click-button")

}

Jennifer_Andrews
Adobe Employee
Adobe Employee
September 23, 2019

Glad I was able to point you in the right direction!