Analytics

Overview

The Analytics resource allows for the retrieval of traffic statistics for a given site or for a set of sites. 

Resource URIs

  • Get Site Analytics

    GET /analytics/site/{site_name}

    Query String Parameters:

    Query String ParameterTypeRequiredDescription
    from Date optional, defaults to 30 days prior to "to" value Start Date Used for Lookup (In UTC: YYYY-MM-DDThh:mm:ssOR YYYY-MM-DD)
    to Date optional, defaults to current date End Date Used for Lookup (In UTC: YYYY-MM-DDThh:mm:ss ORYYYY-MM-DD)
    dimension String optional, either: "system" or "geo", default is none The type of dimension to query the data by: (1) system: Set including Browser Type, Browser Version and Operating System, or (2) geo: Country (and Region where available)
    result String optional, either: "traffic" or "activities", default is "traffic" Whether to return results with traffic metrics (visits, unique visitors, pageviews), or to return results with activities metrics (click_to_calls, click_to_maps, click_to_emails, form_submits)
    dateGranularity String optional, can be: "DAYS, WEEKS, MONTHS, YEARS" When the dateGranularity URL parameter is present, Duda will return a data from the selected format. If you choose days for a specific week, Duda will return the visits for that specific day and each day within the date range defined. 

    Note:

    If neither the "from" parameter nor the "to" parameter is provided, the queried period will be the past 30 days.

    If only the "from" parameter is provided, the queried period will be the "from" date until today.

    If only the "to" parameter is provided, the queried period will be from 30 days prior to the "to" date until the "to" date.

    The results=activities cannot be combined with the 'dimension' query string. This will return an error. 

    Return:

    If the result parameter is "traffic":

    If a dimension set is provided, an array containing the following JSON elements for each row of the result set.

    If no dimension set is provided, a JSON structure containing the following elements.

    PropertyTypeDescription
    dimension JSON Structure A single dimension pertaining to the queried dimension type (if a dimension type was sent). Ex: The "geo" dimension type may return "dimension":{"Country":"Canada","Region":"Ontario"}
    VISITS integer For the queried period and for the specified dimension, the number of visits to the site.
    VISITORS integer For the queried period and for the specified dimension, the number of unique visitors to the site.
    PAGE_VIEWS integer For the queried period and for the specified dimension, the number of page views to the site.

    If the result parameter is "activities":

    If a dimension set is provided, an array containing the following JSON elements for each row of the result set.

    If no dimension set is provided, a JSON structure containing the following elements.

    PropertyTypeDescription
    dimension JSON Structure A single dimension pertaining to the queried dimension type (if a dimension type was sent). Ex: The "geo" dimension type may return "dimension":{"Country":"Canada","Region":"Ontario"}
    click_to_calls integer For the queried period and for the specified dimension, the number of click-to-call actions on the site.
    click_to_maps integer For the queried period and for the specified dimension, the number of click-to-map actions on the site.
    click_to_emails integer For the queried period and for the specified dimension, the number of click-to-email actions on the site.
    form_submits integer For the queried period and for the specified dimension, the number of form submission actions on the site.

    JSON Structure:

    Querying: Traffic, not dimensioned:

    {"UNIQUE_VISITORS":50,"VISITS":100,"PAGE_VIEWS":150}

    Querying: Activities, not dimensioned:

    {"CLICK_TO_EMAILS":2,"FORM_SUBMITS":5, "CLICK_TO_MAPS":15,"CLICK_TO_CALLS":20}

    Querying: Traffic, Dimensioned by geo:

    [ {
        "data" : {
            "VISITORS" : 50,
            "PAGE_VIEWS" : 150,
            "VISITS" : 100
        },
        "dimension" : {
            "country" : "US",
            "region" : "CA"
        }
    }, {
        "data" : {
            "VISITORS" : 50,
            "PAGE_VIEWS" : 150,
            "VISITS" : 100
        },
        "dimension" : {
            "country" : "US",
            "region" : "FL"
        }
    }, {
        "data" : {
            "VISITORS" : 50,
            "PAGE_VIEWS" : 150,
            "VISITS" : 100
        },
        "dimension" : {
            "country" : "Canada",
            "region" : "Ontario"
        }
    } ]

    Possible Errors:

    InvalidInput

    Example URI:

    GET /analytics/site/mymusic?from=2012-09-04&to=2012-09-05
×

Priority Phone Support

English phone support is available 18 hours a day,
Monday through Friday, 3am to 9pm (EST).

United States +1 866-776-1550 3am to 9pm (Eastern)
United Kingdom +44 (0)800-011-9071 8am to 2am (London)
France +33 (0)9-75-18-84-74 9am to 3am (Paris)
Israel +972 (0)3-720-8922 10am to 4am (Jerusalem)
Australia +61 (0)2-8880-9166 7pm to 1pm (Sydney)
To schedule a call in French, Portuguese, Hebrew or Russian, please email us at prioritysupport@dudamobile.com
×

Please Log in as a DudaPro

Priority Phone Support is available exclusively to DudaPros. Log in to your DudaPro account now to see our international support numbers.

Log In
Not a DudaPro? Start a free trial now!