Have an amazing solution built in RAD Studio? Let us know. Looking for discounts? Visit our Special Offers page!
C++CodeDelphiTech Partner

How To Add Website Metrics To Your Apps Right Now

how to get website metrics in your apps

Website metrics are very important for webmasters to analyze and judge the efficacy and usefulness of their websites. Typically the metrics will show the ranking information, indexing information, spam ranging and many more information to get an idea about the page. The downside is that many website metrics APIs have results pages which are either tricky to get to directly or you wish to consolidate and visualize the data in different ways to the pre-made versions. We’re going to show you how to add the ability to obtain the data behind the website metrics in your desktop and mobile apps so they can be more easily viewed offline and how to get that data to the point where it could be extracted into a database.

Why are website metrics so important?

According to the metrics, you can take decisions about the future direction the website’s content and the areas on which to focus or tweak. Also URL metrics are very important for link building. Links from outside websites are viewed by most search engines as a form of endorsement. The more good quality external links you have pointing to your site the more the search engines may consider your site notable or worth boosting in the search ranking. URL metrics is a clear indication of how your website and its content is viewed and consumed by the rest of the world and, with that, the relative importance searchers may place upon you.

What is Moz?

Moz is a good friend of SEO Engineers. They offer all in one tools for a successful SEO. It will help to find the barriers for indexing your site like broken links, missing important tags and many more issues. It will summarize all matrices into a charts and you will get an idea at a glance. They can track your ranking over time and show it in a chart. Backlinks are very important for SEO, with Moz you can get reliable backlink metrics. Ranking with the wrong keyword doesn’t do any good for your website. With Moz, you can do the correct keyword research.

How to get URL metrics of your website?

Moz provide an easy to use API for URL metrics. It will give you more than fifty metrics about the domain / URL you provide. They offer you a free trial with more than enough API request for small scale projects. They you just have to make a REST request with the API Access ID, Secret Key and the URL you going to get matrices. Both Request and response is in JSON format.

How to get URL metrics to a Delphi / C++ Builder application?

Delphi provide an easy way to get Moz URL metrics. You can generate GUI components by the FREE Embarcadero tool called “Embarcadero REST debugger” and paste it in to your Delphi or C++ builder application. It will copy REST components and components for memory database and you can paste those directly into your form.

First, run the Embarcadero REST debugger and set the parameters as following.

Embarcadero REST Debugger

Note that: you have to set the Moz “Access ID” and “Secret Key” as username and password for BASIC authentication in Authentication tab.

How to add REST components to your Delphi or C++ app

Now you can check everything by sending a request. If you get the response without any errors, copy components and paste it into your Delphi / C++ builder form.

REST Debuger Copy Components

Now you can send the request from the REST request component and get the response to REST response component and parse the JSON according to your preferences with few lines of code.

Here are the results of getting the website metrics into your desktop or mobile app

URL Metrics Demo Application

As you can see, it’s a collection of JSON data. To keep things focused, we will not go into processing that information in this article but if you click on the following link you’ll be taken to a page with lots of information on how to take that JSON data and visualize it in your apps: https://blogs.embarcadero.com/?s=json

You can download a Demo application of Moz URL Metrics from this link: https://github.com/checkdigits/URLMetricsDemo


RAD Studio makes it really easy to manipulate and consume REST web services in your desktop and mobile apps with either low code or no code. Why not download a free trial today?

Build Apps The Smart Way With RAD Studio

Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder.
Design. Code. Compile. Deploy.
Start Free Trial   Upgrade Today

   Free Delphi Community Edition   Free C++Builder Community Edition

Related posts
CodeDelphiRAD Studio

Everything You Need To Build A Real-time Flight Status App

C++CodeDelphi

This Is How To Protect Your Source Code from Hackers

DelphiRAD Studio

How To Validate And Verify Email IDs Using MailboxLayer API

CodeDelphiRAD Studio

How To Build A Powerful App For Live News And More

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES