URL Shortner

FREEMIUM
By Gautham Vijayan | Updated 2 months ago | Social
Health Check

N/A

Back to All Tutorials (2)

Getting Analytics of a generated url

To get link analytics of a short url generated with with Litz API with axios use the following code

const getAnalytics = async (shortURL) => {
const res = await axios.post(
https://url-shortner8.p.rapidapi.com/get-link-analytics”,
{ shortURL: shortURL },
{
headers: {
“X-RapidAPI-Key”: “yourkey”,
“X-RapidAPI-Host”: “url-shortner8.p.rapidapi.com”,
},
}
);

console.log(res.data);
};

You can call this url to get the analytics shortURL of the url like its views. Location, device, browertype, time etc, will be added later