Skip to content

Get goals report

Getting a list of achieved goals

Method get.goals_report
Description Getting a list of achieved goals
Who has access Partner, Customer

Parameters of a request

Title Type Required Valid value Description
access_token string yes Authentication session key
user_id number no Unique user ID of agent's customer who makes request
Is required for agent
To get a list of customer users, use the method "get.customer_users"
limit number no Returning entries count. Refer to "Paging"
offset number no Offset that defines from which number to return the entries "limit". Default value is "0". Refer to "Paging"
filter object no Refer to "Filters"
fields array no Refer to "Viewing returning data"
sort array no Refer to "Data sorting"
date_from iso8601 yes YYYY-MM-DD hh:mm:ss Sampling start date
date_till iso8601 yes YYYY-MM-DD hh:mm:ss Sampling end date

Parameters of a reply

Title Type Valid values Filtering Sorting Default reply Description
id number yes Goal unique ID
date_time iso8601 YYYY-MM-DD hh:mm:ss Time and date when goal was achived
name string yes yes Goal name
type enum
  • track_event
  • time_on_page
  • callgear
  • segment
  • ppc_goal
  • click
  • link
  • scroll
  • time_on_site
yes yes Goal type
  • track_event - User
  • time_on_page - Time on page
  • callgear - In CallGear
  • segment - Segment entry
  • ppc_goal -
  • click - Click to object
  • link - Click a link
  • scroll - Scroll actions
  • time_on_site - Time on website
ext_id string yes yes ID of an integrated target in the outside system
source enum
  • yandex.metrika
  • google.analytics
  • callgear
yes yes Name of the system where the goal was set
communication_number number yes yes Communication number. Calculated in within a person.
communication_page_url string no no no The URL of the page where a visitor was at the time of the call, or the page of the last visitor interaction before the call.
communication_id number yes yes Communication unique ID
communication_type enum goal yes yes Communication type
ua_client_id string Unique ID in Universal Analytics
ym_client_id string Unique user ID in Yandex.Metrika
sale_date iso8601 YYYY-MM-DD hh:mm:ss yes yes Sale date
sale_cost number yes yes Sale cost
search_query string yes Search query
search_engine string yes Search engine name
referrer_domain string yes Domain referrer
referrer string yes Referrer
entrance_page string yes Entrance page
gclid string yes Google Click Identifier
yclid string yes Yandex Click Identifier
ymclid string yes Yandex Market Click Identifier
ef_id string yes Used to mark up links in contextual management system AdLense
channel enum
  • display
  • paid
  • affiliate
  • messenger
  • social
  • email
  • organic
  • internal
  • recommendation
  • cashed
  • referral
  • direct
yes Channel
Used tags
tags array yes Tags, refer to the method "get.tags"
tag_id number Tag unique ID
tag_name string Tag name
tag_type enum auto, manual Tag type
tag_change_time iso8601 Time when a tag was used
tag_user_id number ID of a user, who used a tag
tag_user_login string Login of a user, who used a tag
tag_employee_id number ID of an employee, who used a tag
tag_employee_full_name string Full name of an employee who used a tag
Website
site_id number yes yes yes Website unique ID
site_domain_name string yes yes Website address in the internet. Without protocol - "http://" or "https://"
Advertising campaign
campaign_id number yes yes yes Advertising campaign ID
campaign_name string yes yes Advertising campaign name
visit_other_campaign boolean The flag indicates whether a visitor entered by other advertising campaigns (within the person)
Information about visitor
visitor_id number yes yes Visitor unique ID
person_id number yes Person unique ID
visitor_type enum New, Returned, Not filled in yes yes Visitor type
visitor_session_id number yes Visitor session unique ID, refer to "get.visitor_sessions_report"
visits_count number yes Total visitor count
visitor_first_campaign_id number yes First advertising campaign ID
visitor_first_campaign_name string yes First advertising campaign name
visitor_city string yes Visitor city
visitor_region string yes Visitor region
visitor_country string yes Visitor country
visitor_device enum
  • desktop
  • mobile
  • tablet
  • other
yes yes User device
Visitor properties
visitor_custom_properties array yes Visitor properties that can be set in the client area or using JavaScript API [method CallGear.setProperty(name, value);]
property_name string Name of a property that's to be assigned to a visitor
property_value string Property value
Segments
segments array yes Segments
segment_id number Segment unique ID
segment_name string Segment name
UTM tag
utm_source string yes Campaign source
utm_medium string yes Campaign channel
utm_term string yes Campaign key word
utm_content string yes Campaign content
utm_campaign string yes Campaign name
OS tag
openstat_ad string yes Ad ID
openstat_campaign string yes Advertising campaign ID
openstat_service string yes Service provider ID
openstat_source string yes ID of a site, a section, a page, or place on the page where an ad was shown
Communication attributes
attributes array
  • first - First quality
  • through - Through first quality
  • primary - Primary
  • secondary - Secondary
  • lost - Lost
  • target - Target
  • off-target - Off target
  • quality - Quality
  • rest - Recurring target communications (communications, happened during a second communication, set for a website in CallGear client area).
yes Communication attributes
Expanded UTM tags
eq_utm_source string yes Expanded utm_source
eq_utm_medium string yes Expanded utm_medium
eq_utm_term string yes Expanded utm_term
eq_utm_content string yes Expanded utm_content
eq_utm_campaign string yes Expanded utm_campaign
eq_utm_referrer string yes Expanded utm_referrer
eq_utm_expid string yes Expanded utm_expid

JSON request structure

{
  "jsonrpc":"2.0",
  "id":"number",
  "method":"get.goals_report",
  "params":{
    "access_token":"string",
    "user_id":"number",
    "offset":"number",
    "limit":"number",
    "date_from":"iso8601",
    "date_till":"iso8601",
    "filter":{

    },
    "sort":[
      {
        "field":"string",
        "order":"string"
      }
    ],
    "fields":[
      "string"
    ]
  }
}

JSON reply structure

{
  "jsonrpc":"2.0",
  "id":"number",
  "result":{
    "metadata":{

    },
    "data":[
      {
        "id":"number",
        "date_time":"iso8601",
        "name":"string",
        "type": "enum",
        "ext_id": "string",
        "source": "enum",
        "communication_number":"number",
        "communication_page_url": "string",
        "communication_id":"number",
        "communication_type":"enum",
        "ua_client_id":"string",
        "ym_client_id": "string",
        "sale_date":"iso8601",
        "sale_cost":"number",
        "search_query":"string",
        "search_engine":"string",
        "referrer_domain":"string",
        "referrer":"string",
        "entrance_page":"string",
        "gclid":"string",
        "yclid":"string",
        "ymclid":"string",
        "ef_id":"string",
        "channel":"enum",
        "tags":[
          {
            "tag_id":"number",
            "tag_name":"string",
            "tag_type":"enum",
            "tag_change_time":"iso8601",
            "tag_user_id":"number",
            "tag_user_login":"string",
            "tag_employee_id":"number",
            "tag_employee_full_name":"string"
          }
        ],
        "site_id":"number",
        "site_domain_name":"string",
        "campaign_id":"number",
        "campaign_name":"string",
        "visit_other_campaign":"boolean",
        "visitor_id":"number",
        "person_id":"number",
        "visitor_type":"enum",
        "visitor_session_id":"number",
        "visits_count":"number",
        "visitor_first_campaign_id":"number",
        "visitor_first_campaign_name":"string",
        "visitor_city":"string",
        "visitor_region":"string",
        "visitor_country":"string",
        "visitor_device":"enum",
        "visitor_custom_properties":[
          {
            "property_name":"string",
            "property_value":"string"
          }
        ],
        "segments":[
          {
            "segment_id":"number",
            "segment_name":"string"
          }
        ],
        "utm_source":"string",
        "utm_medium":"string",
        "utm_term":"string",
        "utm_content":"string",
        "utm_campaign":"string",
        "openstat_ad":"string",
        "openstat_campaign":"string",
        "openstat_service":"string",
        "openstat_source":"string",
        "eq_utm_source": "string",
        "eq_utm_medium": "string",
        "eq_utm_term": "string",
        "eq_utm_content": "string",
        "eq_utm_campaign": "string",
        "eq_utm_referrer": "string",
        "eq_utm_expid": "string",
        "attributes":[

        ]
      }
    ]
  }
}

List of returning errors

Refer to the section "List of errors for the methods with the verb get"