Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

Ionic mobile app integrate with Adobe analytics

Avatar

Level 2

Is there a tutorial where I can follow how to set-up some methods like ADB.trackSite() on my Ionic mobile app and monitor the data on Adobe analytic project workspace?

1 Accepted Solution

Avatar

Correct answer by
Level 2

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")

}

View solution in original post

7 Replies

Avatar

Employee

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.

Avatar

Level 2

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

Avatar

Employee

PhoneGap Plug-in  , this is the Android docs.

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

Avatar

Level 2

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.

Avatar

Employee

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 

Avatar

Correct answer by
Level 2

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")

}

Avatar

Employee

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