This site contains the documentation that is relevant to older WSO2 product versions and offerings.
For the latest WSO2 documentation, visit https://wso2.com/documentation/.
Working with User Metrics in Bitly
Overview
The following operations allow you to work with User Metrics . Click an operation name to see details on how to use it.
For a sample proxy service that illustrates how to work with User Metrics , see Sample configuration.
Operation | Description |
---|---|
Returns the aggregate number of clicks on all of the authenticated user's Bitlinks. | |
getCountries | Returns aggregate metrics about the countries referring click traffic to all of the authenticated user's Bitlinks. |
getPopularLinks | Returns the authenticated user's most-clicked Bitlinks (ordered by number of clicks) in a given time period. |
getReferrers | Returns aggregate metrics about the pages referring click traffic to all of the authenticated user's Bitlinks. |
getReferringDomains | Returns metrics about the domains referring click traffic to all of the authenticated user's bitly links. |
getShareCounts | Returns the number of shares by the authenticated user in a given time period.. |
Operation details
This section provides further details on the operations related to User Metrics .
Get the aggregate number of clicks on all of the authenticated user's Bitlinks.
The
getUserClicks
operation Returns the aggregate number of clicks on all of the authenticated user's Bitlinks. .
<bitly.getUserClicks/>
Related Bitly documentation
http://dev.bitly.com/user_metrics.html#v3_user_clicks
Get aggregate metrics about the countries referring click traffic to all of the authenticated user's Bitlinks.
The getCountries
operation r eturns aggregate metrics about the countries referring click traffic to all of the authenticated user's Bitlinks. .
<bitly.getCountries/>
Related Bitly documentation
http://dev.bitly.com/user_metrics.html#v3_user_countries
Get the authenticated user's most-clicked Bitlinks (ordered by number of clicks) in a given time period.
The
getPopularLinks
operation g ets the authenticated user's most-clicked Bitlinks (ordered by number of clicks) in a given time period. .
<bitly.getPopularLinks> <limitForGetPopular>{$ctx:limitForGetPopular}</limitForGetPopular> </bitly.getPopularLinks>
Properties
limitForGetPopular: 1..1000 (default=100).
Sample request
Following is a sample REST/JSON request that can be handled by the
getPopularLinks
operation.
{ "limitForGetPopular":"200" }
Related Bitly documentation
http://dev.bitly.com/user_metrics.html#v3_user_countries
Get aggregate metrics about the pages referring click traffic to all of the authenticated user's Bitlinks.
The
getReferrers
operation returns aggregate metrics about the pages referring click traffic to all of the authenticated user's Bitlinks. .
<bitly.getReferrers> <limitForGetRefDomain>{$ctx:limitForGetRefDomain}</limitForGetRefDomain> </bitly.getReferrers>
Properties
limitForGetRefDomain: 1..1000 (default=100).
Sample request
Following is a sample REST/JSON request that can be handled by the
getReferrers
operation.
{ "limitForGetRefDomain":"200" }
Related Bitly documentation
http://dev.bitly.com/user_metrics.html#v3_user_referring_domains
Get metrics about the domains referring click traffic to all of the authenticated user's bitly links.
The
getReferringDomains
operation r eturns metrics about the domains referring click traffic to all of the authenticated user's bitly links. .
<bitly.getReferringDomains> <limitForGetRefDomain>{$ctx:limitForGetRefDomain}</limitForGetRefDomain> </bitly.getReferringDomains>
Properties
limitForGetRefDomain: 1..1000 (default=100)
Sample request
Following is a sample REST/JSON request that can be handled by the
getReferringDomains
operation.
{ "limitForGetRefDomain":"200" }
Related Bitly documentation
http://dev.bitly.com/user_metrics.html#v3_user_referring_domains
Get the number of shares by the authenticated user in a given time period.
The
getShareCounts
operation r eturns the number of shares by the authenticated user in a given time period .
<bitly.getShareCounts/>
Related Bitly documentation
http://dev.bitly.com/user_metrics.html#v3_user_share_counts
Sample configuration
Following is a sample proxy service that illustrates how to connect to Bitly with the init
operation and use the getUserClicks
operation. The sample request for this proxy can be found in getUserClicks sample request.
<proxy xmlns="http://ws.apache.org/ns/synapse" name="bitly" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <inSequence onError="faultHandlerSeq"> <property name="accessToken" expression="json-eval($.accessToken)"/> <property name="bitlyLink" expression="json-eval($.bitlyLink)" /> <bitly.init> <accessToken>{$ctx:accessToken}</accessToken> </bitly.init> <bitly.getUserClicks/> <respond/> </inSequence> <outSequence> <send/> </outSequence> </target> <description/> </proxy>