Expand my Community achievements bar.

Adobe Summit 2025: AEP & RTCDP Session Recordings Are Live! Missed a session or want to revisit your favorites? Watch the latest recordings now.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

Adobe Analytics Mobile - Cordova Plugins

Avatar

Level 3

I'm working on Adobe Analytics project for mobile which is made using Cordova.

There are few plugins which need to be added as per Adobe's document.

Can someone let me know which plugins have to be put up where and if it  follows any order ?

The adobe document mentions about the plugins but it is little confusing to understand.

 

Plugins:

cordova plugin add https://github.com/adobe/cordova-acpcore.git

cordova plugin add https://github.com/adobe/cordova-acpanalytics.git

cordova plugin add https://github.com/adobe/cordova-aepassurance.git

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi @jane_120,

The Analytics network requests should be visible in the console logs after adding the Core and Analytics cordova plugins and invoking the Adobe Analytics tracking api:

ACPCore.trackAction("cordovaAction", {"cordovaKey":"cordovaValue"}, successCallback, errorCallback);
ACPCore.trackState("cordovaState", {"cordovaKey":"cordovaValue"}, successCallback, errorCallback);

The network requests are sent to your mobile app's configured Analytics server which was set on the Data Collection UI. After the network requests are made the analytics data should be visible in the configured report suite.

View solution in original post

6 Replies

Avatar

Employee

Hi @jane_120,

The plugins must be added to your cordova project directory. Using our sample app located at https://github.com/adobe/cordova-acpsample as an example, the "cordova plugin add" commands would be executed from this directory:

Screen Shot 2022-03-01 at 8.56.49 AM.png

The Adobe Analytics extension has a dependency on the Core extension only so at a minimum you would need to install the Core and Analytics cordova plugins:

cordova plugin add https://github.com/adobe/cordova-acpcore.git
cordova plugin add https://github.com/adobe/cordova-acpanalytics.git

Hope this helps.

 

Thanks,

Ryan

Avatar

Level 3

Hi @Ryan_Morales ,

 

 Thank you for your response. 

 This was helpful.

 

So I just need to install the plugins right?

Also how do I know if it's working properly?

Avatar

Correct answer by
Employee

Hi @jane_120,

The Analytics network requests should be visible in the console logs after adding the Core and Analytics cordova plugins and invoking the Adobe Analytics tracking api:

ACPCore.trackAction("cordovaAction", {"cordovaKey":"cordovaValue"}, successCallback, errorCallback);
ACPCore.trackState("cordovaState", {"cordovaKey":"cordovaValue"}, successCallback, errorCallback);

The network requests are sent to your mobile app's configured Analytics server which was set on the Data Collection UI. After the network requests are made the analytics data should be visible in the configured report suite.

Avatar

Level 3

Hi @Ryan_Morales ,

 

Thank you!

Avatar

Employee

Hi @jane_120 ,

 

I was unable to reply to your private message as I hit the private message send limit. The arguments are passed from the Adobe SDK Cordova wrapper to the native Adobe SDK as a json string. Using your example, the tracking data should be sent like:

ACPCore.trackAction("actionType", {"key1":"value1", "key2":"value2","key3":"value3","key4":“value4”}, successCallback, errorCallback);

Avatar

Level 3

Hi @Ryan_Morales,

 

No problem.

Thank you!