How to track dynamic links created using REST API (programmatically) in Firebase console?

I am using jQuery ajax request to generate dynamic links, but it doesn’t show up in the firebase dynamic link analytics console to track its events. according to the firebase documentation ( https://firebase.google.com/docs/dynamic-links/create-links ) it should do it ... any insight would be much 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);
  });
})

      

+3


source to share


2 answers


As mentioned above, dynamic links created through the API do not appear in the Dynamic Links section of the console.



However, there is now a REST API that allows you to get statistics for dynamic links generated through the API. You can see the docs here: analytics api docs: https://firebase.google.com/docs/reference/dynamic-links/analytics

+1


source


Dynamic links created using the API do not appear in the Firebase console. You can use the Dynamic Links Analytics Firebase API instead. As reported,

You can use this REST API to get analytics data for each of your short Dynamic Links generated in the console or programmatically.



Reference: Dynamic Links Analytics API Documentation

0


source







All Articles