Account Management

The Account API allows you to get some general information about your account. Now there is only one API method available: Sites

Available Sites

This method is used to list all of the sites available in your account, along with some important metadata such as site global keys and conversion events.

Request

  • URL: https://app.ginzametrics.com/api/v3/account/sites
  • HTTP Method: GET

Required Parameters

  • api_key — your API key

Optional Parameters

None.

Sample Request

curl https://app.ginzametrics.com/api/v3/account/sites \
-d api_key=API_KEY

Response

As a response method returns an array of all sites for this account. Each item from this array is a hash with following options:

site_global_key The identifier for the site. This identifier can be used in other API calls to refer to this site
account_global_key The identifier of the account that the site belongs to.
account_name The name of the account that the site belongs to.
domain The domain of the site.
title The title of the site.
search_engine_global_keys An array of identifiers corresponding to the search engines being tracked for this site. These identifiers can be used in other API calls to refer to the specific search engines.
keyword_groups An array of objects corresponding to the keyword groups being used to organize the site’s keywords. Each object contains:
name The name of the keyword group
global_key An identifier that can be used to refer to this keyword group in other API calls
conversion_events An array of objects corresponding to the conversion events being tracked for this site. Each object contains:
name The name of the conversion event
global_key An identifier that can be used to refer to this conversion event in other API calls
active_keywords_count The number of active keywords that the site has

Sample Response

[
    {
        "site_global_key": "GLOBAL_KEY_1",
        "account_global_key": "ACCOUNT_GLOBAL_KEY",
        "account_name": "Ginzamarkets, Inc.",
        "domain": "ginzametrics.jp",
        "title": "ginzametrics.jp",
        "search_engine_global_keys": [],
        "keyword_groups": [
            {
                "name": "ginzametrics",
                "global_key": "KEYGROUP_GLOBAL_KEY_1"
            },
            {
                "name": "seoとppc",
                "global_key": "KEYGROUP_GLOBAL_KEY_2"
            },
            {
                "name": "google:SSL",
                "global_key": "KEYGROUP_GLOBAL_KEY_3"
            }
        ],
        "conversion_events": [
            {
                "conversion_def": {
                    "account_id": 6,
                    "conversion_type": "goal",
                    "created_at": "2011-11-22T20:38:45Z",
                    "event_alias": "個人情報登録",
                    "goal_number": 1,
                    "id": 8213,
                    "name": "goal_1",
                    "site_id": 1168,
                    "updated_at": "2011-11-22T20:38:45Z"
                }
            },
            {
                "conversion_def": {
                    "account_id": 6,
                    "conversion_type": "goal",
                    "created_at": "2011-11-22T20:38:45Z",
                    "event_alias": "料金プラン",
                    "goal_number": 6,
                    "id": 8214,
                    "name": "goal_6",
                    "site_id": 1168,
                    "updated_at": "2011-11-22T20:38:45Z"
                }
            }
        ],
        "active_keywords_count": 467
    },
    {
        "site_global_key": "GLOBAL_KEY_2",
        "account_global_key": "ACCOUNT_GLOBAL_KEY",
        "account_name": "Ginzamarkets, Inc.",
        "domain": "ginzametrics.co.jp",
        "title": "ginzametrics.co.jp",
        "search_engine_global_keys": [],
        "keyword_groups": [
            {
                "name": "[Branded]",
                "global_key": "KEYGROUP_GLOBAL_KEY_4"
            },
            {
                "name": "カテゴリ名",
                "global_key": "KEYGROUP_GLOBAL_KEY_5"
            }
        ],
        "conversion_events": [],
        "active_keywords_count": 180
    },
]