A Service of Softnik Technologies

Adding Moz (SEOmoz) Information to Data Columns

Custom Data in Watch My Domains SED

Watch My Domains SED comes with a SED-SDK PHP library that allows you to add custom data to the domain database or retrieve data from the domain database. This article demonstrates the use of SED-SDK library and Moz API to add support for Moz data in the domain table.

Don't worry, there is no coding involved. The latest version of Watch My Domains SED includes the required script (moz.php) in the lib/php/thirdparty/ folder.

The MOZ data

The Extra data Columns

Moz provides separate data for the domain and "www." versions of the domain. So the script creates the following extra data columns.

moz_pa, moz_www_pa - Moz Page Authority
moz_da, moz_www_da - Moz Domain Authority
moz_links, moz_www_links - Moz External Link Count
moz_rank, moz_www_rank - Moz Rank
moz_checked_at - The Lookup timestamp for Moz Data

The MOZ Integration Script

Open the config-sample.php file in the lib/php/thirdparty/ folder and edit it to include the MOZ credentials. You can obtain the MOZ credentials from here. Then save it as config.php in the same folder.

Run moz.php as a cronjob at regular intervals.

What moz.php does

Every time you run moz.php, it will...

  • Create the extra columns (moz_pa, moz_da, etc.) if they are missing.
  • Check if the MOZ data for any of the domains require a refresh. You can specify how often the MOZ data should be refreshed. For example, you can make the script update the MOZ data every 2 months.
  • Update the MOZ data for 'N' domains. The number of domains it refreshes ('N') is configurable. By default it is 5.

You should run moz.php as a cron job (set it to run every 5 minutes or so).

If all your domains have been checked for MOZ data and none of them require a refresh, the script will return without doing anything.

Moz.php Options

d - lookup domains that haven't been looked up (for Moz data) within the last 'd' days. Set d=1 for refreshing everyday. The default is 30 days.

b - Specify Moz batch size (the number of domains looked up in each batch mode API call). The default is 5 domains. Please note that for a batch size setting of 5, the actual entries in the Moz API call will be 10 (because of the extra "www" lookups).

v - Verbose mode. Show details on screen.

Examples

From your browser

http://local.domainpunch.com/wmdsed23/lib/php/thirdparty/moz.php?v&d=60

As a cron entry that runs every 5 minutes

*/5 * * * * wget -q -O /dev/null "http://example.com/moz.php?d=90" >/dev/null 2>&1

OR

*/5 * * * * php /home/public_html/moz.php d=90 >/dev/null 2>&1

Configure the Application to Display the Columns

You should configure the data columns in Watch My Domains SED interface to display the extra columns. You can do this from the Basic App Setup.

Configure data Display