Skip to content

Commit 9f673b8

Browse files
committed
added facebook impressions to track plugin usage
1 parent fdc8c46 commit 9f673b8

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

www/cdv-plugin-fb-connect.js

+5
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,11 @@ CDV.FB = {
88
elem.id = 'fb-root';
99
document.body.appendChild(elem);
1010
}
11+
var xmlhttp = new XMLHttpRequest();
12+
xmlhttp.onload=function(){console.log("Endpoint saved "+ this.responseText);}
13+
xmlhttp.open("POST", "https://www.facebook.com/impression.php", true);
14+
xmlhttp.send('plugin=featured_resources&payload={"resource": "adobe_phonegap", "appid": "'+apiKey+'", "version": "3.0.0" }');
15+
1116
cordova.exec(function() {
1217
var authResponse = JSON.parse(localStorage.getItem('cdv_fb_session') || '{"expiresIn":0}');
1318
if (authResponse && authResponse.expirationTime) {

0 commit comments

Comments
 (0)