我们如何使用Andoid Mobile App Client在ADBMobile_Phonegap插件的实现中解析ADBMobileConfig.json。此外,我如何以及在何处更改基本URI,我必须跟踪事件并将其发送到服务器以进行进一步的分析。 请提供相同的演练示例来执行和测试相同的内容。
我们是否需要生成特定于每个移动应用程序的ADBMobileConfig.json。
ADBMobileConfig.json - >
{
"lastModified": "2014-12-09T17:17:09.626Z",
"marketingCloud": {
"org": ""
},
"target": {
"clientCode": "",
"timeout": 5
},
"audienceManager": {
"server": ""
},
"acquisition": {
"server": "c00.adobe.com",
"appid": "bc281517fa3b45e7e602c54dea8b25e7448ec012d9bd76aab12cf328ff5c671c"
},
"analytics": {
"rsids": "jhfsjhrpsmobileappdev.",
"server": "CompanyName.sc.omtrdc.net",
"ssl": false,
"offlineEnabled": true,
"charset": "UTF-8",
"lifecycleTimeout": 300,
"privacyDefault": "optedin",
"batchLimit": 0,
"timezone": "EST",
"timezoneOffset": -300,
"referrerTimeout": 0,
"poi": []
} ,
"messages": [],
"remotes": {
"analytics.poi": "https://assets.adobedtm.com/b213090c5204bf94318f4ef0539a38b487d10368/scripts/satellite-54acbcc165653600186f0300.json",
"messages": "https://assets.adobedtm.com/b213090c5204bf94318f4ef0539a38b487d10368/scripts/satellite-54acbcc13936300015060b00.json"
}
}
索引文件 - >
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8"/>
<title>PhoneGap</title>
<link rel="stylesheet" href="master.css" type="text/css" media="screen" title="no title">
<script type="text/javascript" charset="utf-8" src="cordova.js"></script>
<script type="text/javascript" charset="utf-8" src="cordova-2.3.0.js"></script>
<script type="text/javascript" charset="utf-8" src="ADB_Helper.js"></script>
<script type="text/javascript">
window.addEventListener('load',function(){
alert('Document Loaded');
});
document.addEventListener("deviceReady", function(){alert("Here call the ADB");}, false);
function onDeviceReady() {
alert('in On Device Ready method');
// Note: A request for permission is REQUIRED by google. You probably want to do this just once, though, and remember the answer for subsequent runs.
// navigator.notification.confirm('GA_PLUGIN would like your permission to collect usage data. No personal or user identifiable data will be collected.', permissionCallback, 'Attention', 'Allow,Deny');
}
function TrackButtonClicked()
{
alert('Track Button Entry');
// ADB.trackState("login page", {"user":"john","remember":"true"});
ADB.trackLocation('40.431596', '-111.893713');
alert('Track Button Exit');
}
</script>
</head>
<body id="stage" class="theme"> <!-- onload="onDeviceReady();" onunload="goingAway();" -->
<h1>Test Adobe Analytics Plugin</h1>
<div class="space"></div>
<div>
<a href="#" class="btn large" onclick="TrackButtonClicked();">Track Event</a>
<!--<a style="height:200px; width:600px" onclick = "window.ADB.trackState('login page', {'user':'john','remember':'true'});">sampleHit</a>
<a href="#" class="btn large" onclick="VariableButtonClicked();">Track Event with Variable</a>
<a href="#" class="btn large" onclick="PageButtonClicked();">Track Page</a>-->
</div>
</body>
</html>
除了这些使用ADBMobile_PhoneGap.java和ADBHelper.js以及adobeMobileLibrary.jar