de.sk
de.sk

Reputation: 79

How do I track the performance of dynamic links created with the REST API (programmatically) in the Firebase console?

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

Answers (2)

Kolappan N
Kolappan N

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

Ian Barber
Ian Barber

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

Related Questions