Reputation: 79
I'm using jQuery ajax request to make dynamic links but it doesn't show up in firebase dynamic links analytic console to keep track of its events. as per firebase documentation (https://firebase.google.com/docs/dynamic-links/create-links), it supposed to do so... any insight will be highly appreciated ...
$.ajax({
type: "POST",
url: "https://firebasedynamiclinks.googleapis.com/v1/shortLinks?key=" + api_key,
contentType: "application/json",
processData: false,
data:JSON.stringify({
"dynamicLinkInfo": {
"dynamicLinkDomain": "yx55s.app.goo.gl",
"link": cLink,
"socialMetaTagInfo": {
"socialTitle": sTitle,
"socialDescription": sDesc,
"socialImageLink": sImg
}
},
"suffix": {
"option": option
}
})
}).done(function(links){
console.log(links);
$('.response').text(links.shortLink);
});
})
Upvotes: 5
Views: 2672
Reputation: 4011
Dynamic Links created using the API are not displayed in the Firebase console. You can instead use the Firebase Dynamic Links Analytics API. As the documentation says
You can use this REST API to get analytics data for each of your short Dynamic Links, whether created in the console or programmatically.
Ref: Dynamic Links Analytics API Documentation
Upvotes: 2
Reputation: 19960
As de.sk mentioned, Dynamic Links created through the API don't appear in the Dynamic Links section of the console.
However, there is now a REST API to allow you to retrieve stats for dynamic links created through the API. You can see the docs here: analytics api docs: https://firebase.google.com/docs/reference/dynamic-links/analytics
Upvotes: 6