hannah
posted this on November 09, 2011 03:31 pm
The recommended VigLink installation snippet includes our JavaScript library on your page. Once included, the library handles affiliation of external links automatically. Want a little more control? Tweak the options or use its JavaScript API (more information available here: http://support.viglink.com/entries/20646001-api-documentation).
If you chose to include a cuid on click requests, we provide a reporting API to get information on the number and destination of clicks with a cuid associated with them.
https://www.viglink.com/service/v1/outboundClicks
Alphanumeric String, maximum length 32 characters (corresponds to the cuid provided to the API at click-time).
Secret key provided by VigLink, found on under your account. This is used for authentication.
'day' = 1 day of data, 'week' = results in 7 days of data, 'month' = 30 days of data
The last date for which data should be returned, should be in the format YYYY/MM/DD
JSON object containing the single key ʻrowsʼ, whose value is an array of JSON objects. Each object in that array contains the following:
Integer Number
String
BigBlogPlatform.com uses cuids to track clicks. They are particularly interested in cuid 200 and would like to know how many clicks and to what domain that cuid had.
BigBlogPlatform first logs into their account and located their secret key: 62f60fb1ee5972097a21f205bfe707b3c9888c97. They decide they want monthly data ending on 10/31/2011, so they type the following URL into a web browser:
https://www.viglink.com/service/v1/outboundClicks?cuid=200&secret=62f60fb1ee5972097a21f205bfe707b3c9888c97&period=month&lastDate=2011/11/08
The response is:
{
"rows": [
{
"clicks": 3,
"domain": "amazon.com"
},
{
"clicks": 1,
"domain": "barnesandnoble.com"
}
]
}