76
Web Services API Reference Manual June 30, 2010 WEB ANALYTICS

Yahoo Web Analytics API Reference Guide

Embed Size (px)

DESCRIPTION

 

Citation preview

Page 1: Yahoo Web Analytics API Reference Guide

Web Services API Reference Manual June 30, 2010

WEB ANALYTICS

Page 2: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 2/76

© 2000-2010 Yahoo! Inc. All rights reserved.

Table of Contents

1 REVISION HISTORY..................................................................................................................... 5 2 OVERVIEW ................................................................................................................................... 7

2.1 SUPPORTED ENTITIES ...................................................................................................................7 2.2 SUPPORTED OPERATIONS.............................................................................................................7 2.3 GENERAL FORM OF THE YAHOO! WEB ANALYTICS API....................................................................8 2.4 XML-RPC IMPLEMENTATION.........................................................................................................8 2.5 SOAP IMPLEMENTATION ...............................................................................................................9

3 YAHOO! WEB ANALYTICS API CALLS...................................................................................... 10 3.1 INITIALIZATION ............................................................................................................................10

3.1.1 The login Call ...................................................................................................................10 3.1.2 The logout Call................................................................................................................. 11 3.1.3 The createAccount Call ...................................................................................................11 3.1.4 The createCampaign Call ................................................................................................13 3.1.5 The createProject Call .....................................................................................................15 3.1.6 The updateCampaign Call ...............................................................................................16

3.2 ACCOUNT INFORMATION..............................................................................................................19 3.2.1 The getActions Call..........................................................................................................19 3.2.2 The getBookmarks Call ...................................................................................................19 3.2.3 The getCampaigns Call ...................................................................................................20 3.2.4 The getEditions Call.........................................................................................................21 3.2.5 The getProjects Call ........................................................................................................22 3.2.6 The getReports Call .........................................................................................................22 3.2.7 The getScenarios Call .....................................................................................................23 3.2.8 The getTrackingCode Call ...............................................................................................23

3.3 REPORTING ................................................................................................................................ 24 3.3.1 The ScheduleReportJobStandard Call ............................................................................25 3.3.2 The ScheduleReportJobBookmark Call ..........................................................................27 3.3.3 The getReportJob Call .....................................................................................................28 3.3.4 Report XML Format .........................................................................................................29

3.4 ORDER RECONCILIATION.............................................................................................................30 3.4.1 The approveOrder Call ....................................................................................................30 3.4.2 The changeOrder Call .....................................................................................................31 3.4.3 The cancelOrder Call .......................................................................................................32 3.4.4 The changeOrderList Call................................................................................................32 3.4.5 The getChangeOrderListStatus Call................................................................................33 3.4.6 The getChangeOrderListErrors Call ................................................................................33

3.5 EXTERNAL DATA SOURCES .........................................................................................................34 3.5.1 The uploadEdsFile Call....................................................................................................34

Page 3: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 3/76

© 2000-2010 Yahoo! Inc. All rights reserved.

3.5.2 The getEdsJobStatus Call ...............................................................................................35 4 FAULT CODES ........................................................................................................................... 36

4.1 HTTP, XML LEVEL FAULT CODES...............................................................................................36 4.2 HTTP HEADER AND XML FAULT CODES......................................................................................36 4.3 USER-LEVEL FAULT CODES .........................................................................................................37 4.4 FILTER FAULT CODES .................................................................................................................38

5 APPENDIX A: CONSTANTS ....................................................................................................... 39 5.1 CAMPAIGN TYPES .......................................................................................................................39 5.2 TIMEZONES ................................................................................................................................ 39 5.3 CPC ENGINES............................................................................................................................42 5.4 CURRENCIES ..............................................................................................................................43 5.5 COUNTRY CODES .......................................................................................................................45 5.6 REPORTS ...................................................................................................................................55 5.7 REPORTFILETYPE.......................................................................................................................59

6 APPENDIX B: FILTERS .............................................................................................................. 60 7 APPENDIX C: SOAP EXAMPLES............................................................................................... 63

7.1 SOAP FAULT CODE EXAMPLE.....................................................................................................63 7.2 LOGIN CALL SOAP EXAMPLE ......................................................................................................63 7.3 LOGOUT CALL SOAP EXAMPLE ...................................................................................................64 7.4 CREATEACCOUNT CALL SOAP EXAMPLE.....................................................................................64 7.5 CREATECAMPAIGN CALL SOAP EXAMPLE....................................................................................65 7.6 CREATEPROJECT CALL SOAP EXAMPLE......................................................................................66 7.7 GETACTIONS CALL SOAP EXAMPLE ............................................................................................66 7.8 GETCAMPAIGNS CALL SOAP EXAMPLE........................................................................................67 7.9 GETEDITIONS CALL SOAP EXAMPLE ...........................................................................................68 7.10 GETPROJECTS CALL SOAP EXAMPLE..........................................................................................68 7.11 SCHEDULEREPORTJOBSTANDARD CALL SOAP EXAMPLE ............................................................ 69 7.12 XML REPORT EXAMPLE ..............................................................................................................70 7.13 GETREPORTS CALL SOAP EXAMPLE ...........................................................................................74 7.14 GETSCENARIOS CALL SOAP EXAMPLE........................................................................................75 7.15 GETTRACKINGCODE CALL SOAP EXAMPLE .................................................................................75

Page 4: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 4/76

© 2000-2010 Yahoo! Inc. All rights reserved.

Table of Figures

Figure 3 Structure of the updateCampaign Call Response...................................................................18 Figure 4 Structure of the XML Report.................................................................................................... 29

Page 5: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 5/76

© 2000-2010 Yahoo! Inc. All rights reserved.

1 Revision History

Date API Version Revisions

February 2008 3.0

New feature:

- Filters parameter for the ScheduleReportJobBookmarkRequest and the ScheduleReportJobStandardRequest calls

September 2007 3.0

New feature:

- External Data Sources (EDS)

(uploadEdsFile call, getEdsJobStatus call)

April 2007 3.0

Removed: XML-RPC support

New feature:

- asynchronous reporting,

- compressed report response (ScheduleReportJobStandard call, ScheduleReportJobBookmark call, ScheduleReportJobResponse call)

December 2006 2.26

New feature:

- new getReport XML response structure,

- new updateCampaign call

Jun 2006 2.25

New feature:

- Bulk Order Reconciliation support

( changeOrderList call, getChangeOrderListStatus call, getChangeOrderListErrors call)

There are 2 new reports. See section 5.6 Reports.

May 2006 2.24

New features:

- Order Reconciliation support

(approveOrder call, changeOrder call, cancelOrder call)

April 2006 2.23 getCampagins call modified : new cost type added (ppc_autosetup)

April 2006 2.22 New features: getReportFromBookmarkV2 call

March 2006 1.21 New features: getBookmarks call, getReportFromBookmark call

July 2005 1.2 GetReport call’s response changed

SOAP Implementation

Page 6: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 6/76

© 2000-2010 Yahoo! Inc. All rights reserved.

July 2005 1.15 New features : getEditions call, getScenarios call, getReports call, new reports

June 2005 1.14 Fault Codes updated

February 2005 1.13 time zone identifiers changed

February 2005 1.12 getReport Call XML_RPC Example corrections

January 2005 1.11 Additional error codes

January 2005 1.1 XML-RPC compliance added; Report retrieval methods added

December 2004 1.0 Initial revision

Page 7: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 7/76

© 2000-2010 Yahoo! Inc. All rights reserved.

2 Overview The Yahoo! Web Analytics API documentation provides the information necessary to access the Yahoo! Web Analytics API. The API provides a programmatic means of interacting with the Yahoo! Web Analytics platform to access and change data for the main entities represented in the Yahoo! Web Analytics system.

2.1 Supported Entities You can use the Yahoo! Web Analytics API to access and change the following entity types:

Entity Notes

account Basic entity, parent of all.

user Account’s child entity. One account may have many users with different user rights. By creating an account, a user entity is created automatically with the same user name as the account name. This user has full administrative rights.

project

Account’s child entity. One account may have many projects with a separate tracking data space. By creating an account, a project entity is created automatically. One project may be used to track a (1) whole web site, a (2) subsection of a web site, (3) multiple web sites.

campaign An advertisement campaign. Project's child entity. One project may have many campaigns.

scenario A series of steps web visitors take in order to complete a given transaction. Project’s child entity. One project may have many scenarios.

edition The project's edition.

action Report settings' action filter. Project’s child entity. One project may have many actions.

The list of supported entities may change in the future. Some of the entities may not be accessible to a particular user, partner, or during a particular login session, depending on the organization’s and user’s permissions.

2.2 Supported Operations

Operation Description

login Start a session.

logout Finish a session.

createAccount Create an account (including a user and a project).

Page 8: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 8/76

© 2000-2010 Yahoo! Inc. All rights reserved.

createProject Create an additional project within an account.

createCampaign Create a campaign within a project.

getActions Retrieve the available actions of a project.

getBookmarks Retrieve the bookmarks of a project.

getCampaigns Retrieve the campaigns of a project.

getEditions Retrieve editions.

getProjects Retrieve the projects of an account.

getReport Retrieve a report.

getReportFromBookmark Retrieve a bookmarked report.

getReportFromBookmarkV2 Retrieve a bookmarked report. New parameters: offset and limit.

getReports Retrieve the available reports of a user/account.

getTrackingCode Retrieve the tracking code for a project.

getScenarios Retrieve scenarios for a project.

approveOrder Changes the status of a previously recorded pending sale action to an approved sale.

changeOrder Changes the order’s (sale action) amount or currency.

cancelOrder Deletes an order that was previously recorded in the system.

ScheduleReportJobStandard Returns statistical data for a project.

ScheduleReportJobBookmark Returns statistical data for a project.

2.3 General Form of the Yahoo! Web Analytics API Each API call is initiated by a request from a client and has a response from the server. API calls are never initiated from the server to the client. Each API call has a method name, which is one of the operations described in section 2.2 Supported Operations.

2.4 XML-RPC Implementation Former versions of the API supported the XML-RPC protocol. The current version (and future versions) of the API supports only the SOAP protocol.

Page 9: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 9/76

© 2000-2010 Yahoo! Inc. All rights reserved.

2.5 SOAP Implementation The Yahoo! Web Analytics API allows you to encode your calls using the Simple Object Access Protocol (SOAP). SOAP is an XML-based protocol for exchanging information. See www.w3.org/TR/SOAP for a detailed description of SOAP.

SOAP specifications for the Yahoo! Web Analytics API are detailed in the API calls sections of this document.

See the Yahoo! Web Analytics WSDL at

https://reports.web.analytics.yahoo.com/api/IndexToolsApiV3.wsdl

NOTE!

If you have become a customer of IndexTools before May 2008, you need to use the below temporary URL until the migration to the new Yahoo! data center has been successfully completed:

https://reportx.web.analytics.yahoo.com/api/IndexToolsApiV3.wsdl

You may also find the WSDL file linked from the YWA user interface under the Settings section.

Yahoo! Web Analytics uses several custom types for its SOAP implementation, which are described in the WSDL schema.

Page 10: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 10/76

© 2000-2010 Yahoo! Inc. All rights reserved.

3 Yahoo! Web Analytics API Calls

3.1 Initialization An API sessions first needs to be initialized using the login Call. The URL (including a session ID) returned by the login call can be reused during subsequent calls until the session expires. The session must be closed using the logout call.

3.1.1 The login Call

Each user of the API can find their own API token by logging into their analytics account and navigating to Settings - Yahoo! Web Analytics API - YWA API Credentials. On the following screen, the API token is available, as well as links to the Yahoo! Web Analytics WSDL.

Each SOAP login call must be made to the URL: https://api.web.analytics.yahoo.com/IndexTools/services/IndexToolsApiV3

Subsequent calls are made to the URL returned by the login call.

NOTE!

If you have become a customer of IndexTools before May 2008, you need to use the below temporary URL until the migration to the new Yahoo! data center has been successfully completed:

https://apix.web.analytics.yahoo.com/IndexTools/services/IndexToolsApiV3

When using the final URL - https://api.web.analytics.yahoo.com/IndexTools/services/IndexToolsApiV3 - for authentication purposes, you need to include with each request the YWA_API_TOKEN in the HTTP.

Sample:

POST /api HTTP/1.1 Host: HOST:PORT Connection: Keep-Alive YWA_API_TOKEN: YOUR_API_TOKEN User-Agent: PHP-SOAP/5.2.0-8+etch7 Content-Type: text/xml; charset=utf-8 SOAPAction: "urn:IndexToolsApiAction" Content-Length: 455 <?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns1="http://v3.soap.api.indextools.com"><SOAP-ENV:Body><ns1:Login><PartnerId> YOUR_API_TOKEN </PartnerId><PartnerPassword>YOUR_API_PASSWORD</PartnerPassword><UserId>USER_ID</UserId><UserPassword>USER_PASSWORD</UserPassword><IsSecure>false</IsSecure></ns1:Login></SOAP-ENV:Body></SOAP-ENV:Envelope>

The login call takes an API Partner ID and password (note the API Partner ID and password are different from the Yahoo! Web Analytics partner id and password in the user interface), an optional User ID and password, and validates them.

The login request requires the following fields (the fields in bold are mandatory):

Page 11: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 11/76

© 2000-2010 Yahoo! Inc. All rights reserved.

Name Format Description

partner_id String API Partner identifier supplied by IndexTools.

partner_password Max. 32 chars API Partner password supplied by IndexTools.

user_id Max. 32 chars

Account’s administrative User ID. If the user_id/user_password parameters are not supplied, the session will have limited privileges and only the createAccount operation will be allowed.

user_password Max. 32 chars If the user_id/user_password parameters are not supplied, the session will have limited privileges and only the createAccount operation will be allowed.

secure Boolean

Boolean. Specifies whether the login response should return a secure URL in the “server_url” parameter. This is an obsolete parameter, as all responses will be sent to secure URLs. This parameter must be set to “true” at all times.

There are two types of login privileges. If only the partner id and password are supplied, a partner session will be created and only the createAccount operation will be allowed. If both the partner and user login information are supplied, a user session will be created with non-restricted privileges.

The login call returns the following parameters:

Name Format Description

session_id Max. 64 chars This parameter is obsolete in this version.

server_url Max. 128 chars

All future requests to the API in this session must be sent to this URL.

The other call’s endpoint must be the retrieved server_url!

See section 7.2 login Call SOAP Example.

3.1.2 The logout Call

The logout call does not require any arguments beyond the basic set. A successful response is empty.

See section 7.3 logout Call SOAP Example.

Using Account Management calls, you can create an Yahoo! Web Analytics account, add new projects to an account and add new campaigns to a project.

3.1.3 The createAccount Call

The createAccount call creates an account entity, as well as a user and a project entity in the Yahoo! Web Analytics system. If the client does not have an Yahoo! Web Analytics account yet, this call should be executed first. The execution of this call requires a successful partner login. After the

Page 12: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 12/76

© 2000-2010 Yahoo! Inc. All rights reserved.

successful execution of the createAccount operation, the partner session will automatically be "upgraded" to a user session, in order to allow you to perform further operations to the account.

The createAccount request requires the following fields (the fields in bold are mandatory):

Name Format Description

user_id Max. 32 chars Specify the desired user id. Use this id to reference the user during login in the future.

user_password Max. 32 chars Specify the desired user password.

email Max. 128 chars

Specify a valid e-mail address.

firstname Max. 16 chars First name.

lastname Max. 16 chars Last name.

tel Max. 16 chars Telephone number.

address Max. 16 chars Address.

city Max. 16 chars City.

country Max. 2 chars Two letter country code. See section 5.5 Country Codes.

base_url Max. 256 chars

Project’s root URL e.g., www.abc.com

project_name Max. 64 chars Project’s user-friendly name.

timezone Digits See section 5.2 Timezones.

edition_id Max. 8 chars You can only create a trial edition and the only possible values are STAT3TRL (for an E-Business edition) and STAT5TRL (for a Enterprise edition).

company Max. 64 chars Company name.

default_currency Digits Default: USD. See section 5.4 Currencies.

The createAccount call returns the following parameters:

Name Format Description

account_id Digits Numeric identifier of the account.

Page 13: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 13/76

© 2000-2010 Yahoo! Inc. All rights reserved.

project_id Digits Numeric identifier of the project. Use this id to reference the project in the future.

See section 7.4 createAccount Call SOAP Example.

3.1.4 The createCampaign Call

The createCampaign call creates a new campaign entity within the project.

The createCampaign request requires the following fields (the fields in bold are mandatory):

Name Format Description

project_id Digits Numeric identifier of the project.

campaign_type Digits Identify campaign type. See section 5.1 Campaign Types.

campaign_name Max. 64 chars

campaign_start YYYY-MM-DD

campaign_end YYYY-MM-DD

campaign_desc Max. 256 chars

Campaign description.

status SHOW | HIDE

parameter Max. 32 chars

url | referrer | parameter (These are the equivalents for Page URL, Referring URL, Query Parameter in the campaign setup interface.)

operator Max. 16 chars

equals | contains

condition Max. 256 chars

e.g., source=google

currency Digits See section 5.4 Currencies. Default: USD

cost_type Max. 8 chars

FREE | FIXED | CPC | CPA| PPC| PPC_AUTOSETUP

action_id Digits Specify action id. (Required for CPA)

Page 14: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 14/76

© 2000-2010 Yahoo! Inc. All rights reserved.

fix_cost Digits Specify fixed CPC cost if applicable, e.g., 0.15

Engine_Properties/Engine Max. 255 chars

Specify CPC engine name.

Engine_Properties/Username Max. 64 chars

Specify CPC user name. (Required for PPC or PPC_AUTOSETUP only.)

Engine_Properties/Password Max. 64 chars

Specify CPC password. (Required for PPC or PPC_AUTOSETUP only.)

Engine_Properties/Overture_Account_IdMax. 64 chars

Specify Engine account id. (Required for PPC or PPC_AUTOSETUP only.)

quantity Digits Possible to use at banner campaign (number of impression) and email campaign (number of emails)

Engine_Properties/Listing Max. 32 chars

Specify URL parameter that contains the search listing variable. E.g. listing, kw or OVKEY

Engine_Properties/Is_Auto_Bid Max. 8 chars

on | off (Overture autobid function). (Required for PPC or PPC_AUTOSETUP only.)

Campaign_Category2 Max 64 chars

Specify the value of Campaign Category 2. Campaign categories are presented in a hierarchical structure (Campaign Category 2 is higher than Campaign 3).

Campaign_Category3 Max 64 chars

Specify the value of Campaign Category 3. Campaign categories are presented in a hierarchical structure (Campaign Category 3 is higher than Campaign 4).

Campaign_Category4 Max 64 chars

Specify the value of Campaign Category 4. Campaign categories are presented in a hierarchical structure (Campaign Category 4 is higher than Campaign 5).

Campaign_Category5 Max 64 chars

Specify the value of Campaign Category 5. Campaign categories are presented in a hierarchical structure (Campaign Category 5 is higher than Campaign 6).

Campaign_Category6 Max 64 chars

Specify the value of Campaign Category 6. Campaign categories are presented in a hierarchical structure (Campaign Category 6 is higher than Campaign 7).

Page 15: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 15/76

© 2000-2010 Yahoo! Inc. All rights reserved.

Campaign_Category7 Max 64 chars

Specify the value of Campaign Category 7. Campaign categories are presented in a hierarchical structure (Campaign Category 3 is higher than Campaign 8).

Campaign_Category8 Max 64 chars

Specify the value of Campaign Category 8. Campaign categories are presented in a hierarchical structure (Campaign Category 8 is higher than Campaign 9).

Campaign_Category9 Max 64 chars

Specify the value of Campaign Category 9. Campaign categories are presented in a hierarchical structure (Campaign Category 9 is higher than Campaign 10).

Campaign_Category10 Max 64 chars

Specify the value of Campaign Category 10.

The createCampaign call returns the following parameters:

Name Format Description

campaign_id Digits Numeric identifier of the campaign. Use this id to reference the campaign in the future.

See section 7.5 createCampaign Call SOAP Example.

3.1.5 The createProject Call

The createProject call creates an additional project entity within the account. Please note than an initial project is being generated during the createAccount operation, therefore this call is only required if more than one projects is required.

The createProject request requires the following fields (the fields in bold are mandatory):

Name Format Description

base_url Max. 256 chars

Project’s root URL e.g., www.abc.com.

project_name Max. 64 chars Project’s user-friendly name

timezone Digits See section 5.2 Timezones.

edition_id Max. 8 chars You can retrieve your available editions with the getEditions call, see section 3.2.4 The getEditions Call.

default_currency Digits See section 5.4 Currencies. Default: USD

Page 16: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 16/76

© 2000-2010 Yahoo! Inc. All rights reserved.

The createProject call returns the following parameters:

Name Format Description

project_id Digits Numeric identifier of the project. Use this id to reference the project in the future.

See section 7.6 createProject Call SOAP Example.

3.1.6 The updateCampaign Call

The updateCampaign call allows you to update your campaign settings.

The updateCampaign request requires the following fields (the fields in bold are mandatory):

Name Format Description

ProjectId Integer Numeric identifier of the project.

Campaign Structure

Campaign_Category2 Max 64 chars Modify the value of Campaign Category 2.

Campaign_Category3 Max 64 chars Modify the value of Campaign Category 3.

Campaign_Category4 Max 64 chars Modify the value of Campaign Category 4.

Campaign_Category5 Max 64 chars Modify the value of Campaign Category 5.

Campaign_Category6 Max 64 chars Modify the value of Campaign Category 6.

Campaign_Category7 Max 64 chars Modify the value of Campaign Category 7.

Campaign_Category8 Max 64 chars Modify the value of Campaign Category 8.

Campaign_Category9 Max 64 chars Modify the value of Campaign Category 9.

Campaign_Category10 Max 64 chars Modify the value of Campaign Category 10.

The Campaign structure contains the following parameters:

Page 17: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 17/76

© 2000-2010 Yahoo! Inc. All rights reserved.

Name Format Description

Id Digits Unique numeric identifier of the campaign.

Name Max. 64 chars The campaign name.

Description Max. 256 chars Campaign description.

State SHOW, HIDE,

DELETED

It shows whether the campaign is active or not. If the campaign is active, the State parameter is SHOW. If the campaign is inactive, the State parameter is HIDE. If the campaign is deleted, the State parameter is DELETED.

StartDate Digits The date when the campaign starts.

IsEndDateContinuous Boolean

If true, the campaign runs continuously and the campaign does not have an end date.

If false, the campaign has an end date, which must be specified with the EndDate parameter.

EndDate Digits The date when the campaign ends.

Quantity Digits

This parameter is only valid for Banner and Email Campaigns. For a Banner campaign, the Quantity shows the number of impressions. For an Email Campaign, the Quantity shows the number of emails.

If the method execution was not successful, one of the following exceptions will be thrown:

1101 - Campaign NOT found in this project.

1101 - If the isEndDateContinous is false, you have to set the EndDate too.

1101 - Unknown/missing parameter (required, wrong parameter).

The following diagram illustrates the structure of the updateCampaign call request.

Page 18: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 18/76

© 2000-2010 Yahoo! Inc. All rights reserved.

Figure 1 Structure of the updateCampaign Call Response

Page 19: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 19/76

© 2000-2010 Yahoo! Inc. All rights reserved.

3.2 Account Information These operations primarily help you to perform other operations in the API, e.g., in order to retrieve a bookmarked report from the system, you need to download first the list of bookmarks; in order to filter on specific campaigns, you need to retrieve the list of campaigns from the system.

3.2.1 The getActions Call

The getActions call returns all useable action name sand code of a project.

The getActions request requires the following field (the field in bold is mandatory):

Name Format Description

project_id Digits Numeric identifier of the project.

The getActions call returns an array including the following fields:

Name Format Description

action_id Digits Numeric identifier of the action.

action_name Max. 64 Chars Name of the corresponding action. Note that the action id 01 is reserved for the sale action, other actions can be renamed.

See section 7.7 getActions Call SOAP Example.

3.2.2 The getBookmarks Call

The getBookmarks call returns all available bookmarks for a project.

The getBookmarks request requires the following field (the field in bold is mandatory):

Name Format Description

project_id Digits Numeric identifier of the project.

The getBookmarks call returns an array including the following fields:

Name Format Description

id Digits Numeric identifier of the bookmark.

name String Bookmark name.

description String Bookmark’s description.

Page 20: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 20/76

© 2000-2010 Yahoo! Inc. All rights reserved.

report_id ReportId Numeric identifier of the report.

use_saved_period Boolean

If true, the reporting period is from the bookmark’s start_date until the bookmark’s end_date.

If false, the reporting period is based on the parameters of the getReportFromBookmark call.

start_date Date Begining of the reporting period.

end_date Date End of the reporting period.

3.2.3 The getCampaigns Call

The getCampaigns call returns all active campaigns of a project.

The getCampaigns request requires the following the following field (the field in bold is mandatory):

Name Format Description

project_id Digits Numeric identifier of the project.

The getCampaigns call returns an array including the following parameters:

Name Format Description

campaign_type Digits Identify campaign type. See section 5.1 Campaign Types.

campaign_id Digits Numeric identifier of the campaign.

campaign_name Max. 64 chars

campaign_start DateTime

campaign_end DateTime

campaign_desc Max. 256 chars Campaign description

created_date DateTime Date when campaign was created

status SHOW | HIDE

parameter Max. 32 chars url | referrer

operator Max. 16 chars equals | contains

condition Max. 256 chars

e.g., source=google

Page 21: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 21/76

© 2000-2010 Yahoo! Inc. All rights reserved.

currency Digits See section 5.4 Currencies. Default: USD

cost_type Max. 8 chars FREE | FIXED | CPC | CPA| PPC| PPC_AUTOSETUP

action_id Digits Specify action id. (Required for CPA)

fix_cost Digits Specify fixed CPC cost if applicable, e.g., 0.15

cpc_engine_name Max. 255 chars

Specify CPC engine name

cpc_engine_id Digits Numeric identifier of the CPC engine. See section 5.3 CPC Engines. (Required for RTCR only.)

cpc_username Max. 64 chars Specify CPC user name. (Required for PPC or PPC_AUTOSETUP only.)

cpc_password Max. 64 chars Specify CPC password. (Required for PPC or PPC_AUTOSETUP only.)

engine_account_id Max. 64 chars Specify Overture account id. (Required for PPC or PPC_AUTOSETUP only.)

quantity Digits Possible to use at banner campaign (number of impression) and email campaign (number of emails)

cpc_listing Max. 32 chars Specify URL parameter that contains the search listing variable. E.g. listing, kw or OVKEY

cpc_autobid Max. 8 chars on | off (Overture autobid function). (Required for PPC or PPC_AUTOSETUP only.)

See section 7.8 getCampaigns Call SOAP Example.

3.2.4 The getEditions Call

The getEditions call returns all available editions to create new project. The getEditions request does not require any arguments.

The getEditions call returns an array including the following fields (the fields in bold are mandatory):

Name Format Description

edition_id Digits Numeric identifier of the edition

name String Name of the edition

description String Description of the edition

See section 7.9 getEditions Call SOAP Example

Page 22: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 22/76

© 2000-2010 Yahoo! Inc. All rights reserved.

3.2.5 The getProjects Call

The getProjects call returns all active projects of an account. The getProjects request does not require any arguments beyond the basic set.

The getProjects call returns an array including the following fields (the fields in bold are mandatory):

Name Format Description

project_id Digits Numeric identifier of the project.

project_name Max. 64 chars Project’s user-friendly name

base_url Max. 256 chars

Project’s root URL e.g., www.abc.com

timezone Digits See section 5.2 Timezones.

first_record_date Date Date of first time a hit was recorded in the project.

edition_id Max. 8 chars Project’s edition id

default_currency Digits See section 5.4 Currencies.

See section 7.10 getProjects Call SOAP Example.

3.2.6 The getReports Call

The getReports call returns all available reports of a project.

The getReports request requires the following field (the field in bold is mandatory):

Name Format Description

project_id Digits Numeric identifier of the project.

The getReports call returns an array including the following parameters:

Name Format Description

report_id ReportId Numeric identifier of the report.

name String Name of the report.

description String Report description.

help String Report help.

Page 23: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 23/76

© 2000-2010 Yahoo! Inc. All rights reserved.

limitNeed Boolean If true, the limit property is mandatory for this report.

sessionNeed Boolean If true, the session property is mandatory for this report.

scenarioNeed Boolean If true, the scenario property is mandatory for this report.

actionNeed Digits

Available values:

0 : not used

1 : optional

2 : required

campaignNeed Digits

Available values:

0 : not used

1 : optional

2 : required

See section 7.13 getReports Call SOAP Example.

3.2.7 The getScenarios Call

The getScenarios call returns all useable scenarios of a project.

The getScenarios request requires the following field (the field in bold is mandatory):

Name Format Description

project_id Digits Numeric identifier of the project.

The getScenarios call returns an array including the following parameters:

Name Format Description

scenario_id Digits Numeric identifier of the scenario

name String Name of the scenario

description String Description of the scenario

See section 7.14 getScenarios Call SOAP Example.

3.2.8 The getTrackingCode Call

The getTrackingCode call returns the tracking code and the tracking JS file for a project.

The getTrackingCode request requires the following fields (the fields in bold are mandatory):

Page 24: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 24/76

© 2000-2010 Yahoo! Inc. All rights reserved.

Name Format Description

project_id Digits Numeric identifier of the project.

transfer_protocol Digits Specify whether secure or non-secure tracking code should be retrieved. 0 (HTTP), 1 (HTTPS)

trackingjs_location Max. 256 Chars

Specify exact location of the JS file if different from the root directory of the server. Default “base_url/indextools.js”

document_name Max. 32 Chars Optional custom variable. See Yahoo! Web Analytics Installation Guide.

document_group Max. 32 Chars Optional custom variable. See Yahoo! Web Analytics Installation Guide.

domains Max. 32 Chars Optional custom variable. See Yahoo! Web Analytics Installation Guide.

member_id Max. 32 Chars Optional custom variable. See Yahoo! Web Analytics Installation Guide.

action_id Max. 2 Chars Optional custom variable. See Yahoo! Web Analytics Installation Guide.

amount Max. 32 Chars Optional custom variable. See Yahoo! Web Analytics Installation Guide.

The getTrackingCode call returns the following parameters:

Name Format Description

tracking_code String HTML tracking code to be inserted into the page.

trackingjs Max. 256 Chars

Download URL of the indextools.js file to be uploaded to the web site. Note that this file is project specific.

See section 7.15 getTrackingCode Call SOAP Example.

3.3 Reporting The Reporting call provides operations for getting analytical reports from your Yahoo! Web Analytics account. The reports are in XML format.

To retrieve reports from the system:

1. Initialize your API session

Send a ScheduleReportJobStandard or ScheduleReportJobBookmark request. The response is the reportJobId for the scheduled report job.

Page 25: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 25/76

© 2000-2010 Yahoo! Inc. All rights reserved.

Get the status of the report job by sending the getReportJob request. The status is Completed, Pending or Failed. When the status is Completed, the response also includes the download URL for the report. The returned URL is valid for 5 minutes. If you need to obtain another URL, simply send another getReportJob request. Make sure you keep the returned URL confidential since it allows access to the report without the need to login.

Download the report by sending an HTTP GET request to the download URL using any HTTP client library.

NOTE:

If you select a user-specific time zone in the user interface, which is different from the project default time zone, the reports you access via the API will also be adjusted to a user-specific time zone.

3.3.1 The ScheduleReportJobStandard Call

The ScheduleReportJobStandard call returns statistical data for a project.

The ScheduleReportJobStandard request requires the following fields (the fields in bold are mandatory):

Name Format Description

project_id Digits Numeric identifier of the project.

start_date Date

iso8601

Beginning of the reporting period e.g., 2006-04-01. Note that dates must be entered in the year-month-day format.

end_date Date

iso8601

End of the reporting period e.g., 2006-05-01. Note that dates must be entered in the year-month-day format.

report_id ReportId Use the getReports() call to get the available report ids of the selected project. See section 5.6 Reports for examples of report ids.

offset Digits

Number of rows omitted from the beginning of the report. The default value is 0 and the report starts with the first row.

If you are interested in looking at rows 20-30, the offset should be 19.

limit Digits Number of rows to be displayed in the report.

action_id Digits Numeric action identifier. This parameter is only needed for conversion reports.

campaign_id Digits Numeric campaign identifier. This parameter is only needed for generating campaign details and campaign conversion reports.

scenario_id Digits Use getScenarios() call to get the available scenario ids of the selected project.

session_id 10 Chars Session identifier. This parameter is only needed for the session path report.

Page 26: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 26/76

© 2000-2010 Yahoo! Inc. All rights reserved.

sort Digits Specifies the sort value of the columns, i.e., 0 means the first column, 1 the second column etc. Note that the sorting order always starts with the sort values of the left-head labels.

sort_direction Max. 4 chars Sorts the column specified in the sort field. Possible values: ‘asc’ – ascending; ‘desc’ - descending.

show_help Boolean Indicates whether report help should be included in the response.

show_description Boolean Indicates whether report description should be included in the response.

Filters Structure For details see the table below.

The Filters parameter requires the following fields (the fields in bold are mandatory):

Name Format Description

Type String Indicates the Type ID of the filter. For a complete list of the filter type IDs, see section 6 Appendix B: Filters.

Operator String

Indicates the operator to be used for a filter. It can be a String or a Number Operator.

String Operators:

Equals, NotEquals, BeginsWith, NotBeginsWith, EndsWith, NotEndsWith, Contains, NotContains, Empty, NotEmpty, Regexp.

Number Operators:

Equals, NotEquals, Greater, GreaterOrEquals, Less, LessOrEquals

Value String Indicates the value of the filter (e.g., when filtering by the Browser report, the Value can be Firefox).

CaseSensitive Boolean Indicates whether the value is case-sensitive or not.

Scope String

Indicates the scope of the filter.

Possible values: Session, Action, Page View.

The ScheduleReportJobStandard call returns the following parameters:

Name Format Description

ReportJobId Long The ID of the report job to be used in subsequent getReportJob calls.

See section 7.11 ScheduleReportJobStandard Call SOAP Example.

Page 27: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 27/76

© 2000-2010 Yahoo! Inc. All rights reserved.

When using filters, the ScheduleReportJobStandard call can return the exceptions listed under section 4.4 Filter Fault Codes.

3.3.2 The ScheduleReportJobBookmark Call

The ScheduleReportJobBookmark call returns statistical data for a project.

The ScheduleReportJobBookmark request requires the following fields (the fields in bold are mandatory):

Name Format Description

BookmarkId Digits Numeric identifier of the bookmark. Use getBookmarks() call to get the available bookmark ids of the selected project.

StartDate Date iso8601 Beginning of the reporting period. This parameter is used only if the selected bookmark’s use_saved_period setting = false.

EndDate Date iso8601 End of the reporting period. This parameter is used only if the selected bookmark’s use_saved_period setting = false.

offset Digits Number of rows omitted from the beginning of the report. Default 0.

limit Digits Number of rows to be displayed.

Filters Structure For details see the table below.

The Filters parameter requires the following fields (the fields in bold are mandatory):

Name Format Description

Type String Indicates the Type ID of the filter. For a complete list of the filter type IDs, see section 6 Appendix B: Filters.

Operator String

Indicates the operator to be used for a filter. It can be a String or a Number Operator.

String Operators:

Equals, NotEquals, BeginsWith, NotBeginsWith, EndsWith, NotEndsWith, Contains, NotContains, Empty, NotEmpty, Regexp.

Number Operators:

Equals, NotEquals, Greater, GreaterOrEquals, Less, LessOrEquals

Page 28: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 28/76

© 2000-2010 Yahoo! Inc. All rights reserved.

Value String Indicates the value of the filter (e.g., when filtering by the Browser report, the Value can be Firefox).

CaseSensitive Boolean Indicates whether the value is case-sensitive or not.

Scope String

Indicates the scope of the filter.

Possible values: Session, Action, Page View.

The ScheduleReportJobBookmark call returns the following parameters:

Name Format Description

ReportJobId Long The ID of the report job to be used in subsequent getReportJob calls.

When using filters, the ScheduleReportJobBookmark call can return the exceptions listed under section 4.4 Filter Fault Codes.

3.3.3 The getReportJob Call

Thes getReportJob call is used to get the status of the report job. The status is Completed, Pending or Failed. When the status is Completed, the response also includes the download URL for the report. The returned URL is valid for 5 minutes. If you need to obtain another URL, simply send another getReportJob request. Make sure you keep the returned URL confidential since it allows access to the report without the need to login.

The getReportJob call requires the following fields (the fields in bold are mandatory):

Name Format Description

ReportJobId Long The ID returned by prior ScheduleReportJobStandard or ScheduleReportJobBookmark calls.

ReportFileType ReportFileType

The file format in which the report should be returned (XML, CSV, PDF, DOC, XLS).

NOTE: This feature is not fully implemented yet. Currently only XML output is supported.

The getReportJob call returns the following parameters:

Name Format Description

ReportJobStatus ReportJobStatus Completed, InProgress, Pending, Expired or Failed.

ReportJobURL String Temporary download URL for the report.

Page 29: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 29/76

© 2000-2010 Yahoo! Inc. All rights reserved.

3.3.4 Report XML Format

The following diagram illustrates the structure of the XML report generated by the ScheduleReportJobStandard or ScheduleReportJobBookmark calls.

Figure 2 Structure of the XML Report

A simplified description of the XML report structure is the following:

TagName Type Description

Title String Report title.

Page 30: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 30/76

© 2000-2010 Yahoo! Inc. All rights reserved.

Description String Report description.

Help String Report help.

HasMoreRows Boolean Indicates whether the result includes more data to follow. If the value is ‘false’ you can use the ‘offset’ and/or ‘limit’ parameters to request the next page or request a longer report.

TopHeadRows Array Array of report head names in each row.

LeftHeadLabels String[] Labels of the left headers.

LeftHeadRows Array Left header names with indent flag.

DataRows Array[] This field contains DataCell fields in each row.

SubTotalCells Array Array of subtotal (DataCell) values.

TotalCells Array

Array of total (DataCell) values. Please note that this is not necessarily the total of what is returned in the report but the total of the whole report including unknown items and data not shown on the page.

UnknownCells Array Array of unknown (DataCell) values.

The format of the DataCell is the following:

TagName Type Description

Value String This shows data values in raw format. E.g. 35000.

FormattedValue String This shows formatted data values, i.e., as they appear on the user interface. E.g. 35,000.

Type DataType This shows the type of data. Values are : Text, Int, Float, Currency, Percent

3.4 Order Reconciliation

3.4.1 The approveOrder Call

The approveOrder call changes the status of a previously recorded pending sale action to an approved sale. This feature allows you to update your reports with your successful sales, without having to worry about aborted sales showing in your sales summary.

The approveOrder request requires the following arguments:

Page 31: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 31/76

© 2000-2010 Yahoo! Inc. All rights reserved.

Name Format Description

ProjectId Digits Numeric identifier of the project.

OrderId String Order Identifier.

Date Date Order’s creation date. The date must be older than 24 hours.

Amount Digits Order’s amount expressed in whole numbers (e.g., a 10.2 Euro amount will be expressed as a 1020 eurocents amount).

Currency

Digits Order’s currency. See section 5.4 Currencies.

If sending the request is not successful, the interface will display an exception message. If sending the request is successful, the interface will not display anything.

NOTE:

- You have to wait 12 hours before you can change the status of a pending sale into an approved sale.

- You have to send us the request to change the status of a pending sale into an approved sale within a 3 day period from the date when the pending sale was first registered.

3.4.2 The changeOrder Call

The changeOrder call changes the order’s (sale action) amount or currency.

The changeOrder request requires the following fields (the fields in bold are mandatory):

Name Format Description

ProjectId Digits Numeric identifier of the project.

OrderId String Order Identifier.

Date Date Order’s creation date. The date must be older than 24 hours.

Amount Digits Order’s amount expressed in whole numbers (e.g., a 10.2 euro amount will be expressed as a 1020 eurocents amount).

Currency Digits Order’s currency. See section 5.4 Currencies.

If the method execution was not successful, an exception will be thrown.

Page 32: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 32/76

© 2000-2010 Yahoo! Inc. All rights reserved.

3.4.3 The cancelOrder Call

The cancelOrder call deletes an order that was previously recorded in the system. The cancelOrder request requires the following fields (the fields in bold are mandatory):

Name Format Description

ProjectId Digits Numeric identifier of the project.

OrderId String Order Identifier.

Date Date Order’s creation date. The date must be older than 24 hours.

If the method execution was not successful, an exception will be thrown.

3.4.4 The changeOrderList Call

To use the Bulk Order Change:

Create a ChangeOrderListRequest with the list of modified orders. In the request all the projects must be the same, otherwise you will get an error message. However, you can include different commands on the same project in a single request. Send this request to the server, and you will receive the JobId of this request.

Get the status of the report job by sending the getChangeOrderListStatus call. The status can be: Pending, Done, Done With Error.

Pending: the request has been accepted and is still in progress.

Done: all orders have been completed without errors.

Done with Error: all orders have been completed, but some orders contained errors.

If the result is Done With Error, you can get the list of errors with the getChangeOrderListErrors call.

With the changeOrderList call, you can approve, change or removes order (sale) actions.

Depending on the type of command, the changeOrderList request requires different combinations of the arguments listed below (If you use the Change command, you have to set either the amount or the currency):

The fields in bold are mandatory.

Name Format Description

Command Approve | Cancel | Change

ProjectId Digits Numeric identifier of the project.

OrderId String Order Identifier.

Date Date Order’s creation date. The date must be within a 3 day range. It must be older than 12 hours.

Page 33: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 33/76

© 2000-2010 Yahoo! Inc. All rights reserved.

Amount Digits Order’s amount expressed in whole numbers (e.g., a 10.2 euro amount will be expressed as a 1020 eurocents amount).

Currency

Digits Order’s currency. See section 5.4 Currencies.

The changeOrderList call returns the following parameters:

Name Format Description

JobId Digits Unique identifier assigned to each changeOrderList call. With this ID you can get status information and the list of errors, if any.

3.4.5 The getChangeOrderListStatus Call

With the getChangeOrderListStatus call, you can check the status of the previously sent request.

The getChangeOrderListStatus request requires the following field (the field in bold is mandatory):

Name Format Description

JobId Digits Unique identifier assigned to each changeOrderList call.

The getChangeOrderListStatus call returns the following parameter:

Name Format Description

Status Digits PENDING | DONE | DONEWITHERROR (see section 3.4.4).

3.4.6 The getChangeOrderListErrors Call

With the getChangeOrderListErrors call, you can check the list of errors that resulted from trying to complete the request.

The getChangeOrderListErrors request requires the following field (the field in bold is mandatory):

Name Format Description

JobId Digits Unique identifier assigned to each changeOrderList call.

The getChangeOrderListErrors call returns the following list of error parameters:

Page 34: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 34/76

© 2000-2010 Yahoo! Inc. All rights reserved.

Name Format Description

Command APPROVE | CHANGE | CANCEL

ProjectId Digits Numeric identifier of the project.

OrderId String Order Identifier.

Date Date Order’s creation date. The date must be within a 3 day range. It must be older than 12 hours.

ErrorCode Digits See section 4.2 HTTP Header and XML Fault Codes.

3.5 External Data Sources External Data Sources (EDS) is an integration feature available in the Yahoo! Web Analytics 10 Enterprise Edition, which allows you to merge data originating from external sources, such as campaign management systems, email systems, or other internal systems with your web analytics reporting.

To use the EDS feature, you need to contact the Yahoo! Web Analytics Professional Services team, which will assist you at every level of the implementation process. Furthermore, if you want to take advantage of the Beta version of the EDS feature (before the release of Yahoo! Web Analytics 10), our Professional Services team will be able to help you depending on your requirements.

3.5.1 The uploadEdsFile Call

With the uploadEdsFile call, you can upload a file to our system.

The uploadEdsFile request requires the following fields (the fields in bold are mandatory):

Name Format Description

fileName String Name of the uploaded file.

projectId Digits Numeric project ID.

datasourceId Digits Numeric ID of the EDS Data source provided by Yahoo! Web Analytics Professional Services

uploadMode String Possible values: "replace" or "append": "replace" removes and replaces the existing EDS file; "append" adds a new EDS file to the existing files.

attached file Stream The file that contains the data to be uploaded.

It must be sent as a SOAP attachment!

Page 35: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 35/76

© 2000-2010 Yahoo! Inc. All rights reserved.

The uploadEdsFile call returns the following parameter:

Name Format Description

edsJobId Digits Numeric ID of the started EDS job.

If the given parameters are valid (the project ID and the datasourceID are valid, the project ID and the datasourceID match, and the attachment is present), the attached file will be saved, and an ID will be given to the EDS job. This EDS job ID is then returned to the caller.

Afterwards, the EDS daemon, which is checking periodically for newly uploaded files, starts processing the content and completes the EDS job. After completing the job, the EDS daemon sets the status of the job to COMPLETED or FAILED.

Typically, uploading the EDS file takes 1-2 minutes; however, depending on the size of the file, the uploading process can take up to 30 minutes.

3.5.2 The getEdsJobStatus Call

With the getEdsJobStatus call, you can check the status of the EDS job. The getEdsJobStatus request requires the following field (the field in bold is mandatory):

Name Format Description

edsJobId Digits Numeric ID of the started EDS job, retrieved as the uploadEdsFile call's result.

If the edsJobId is valid, the system returns the status of the EDS job; if the edsJobId status is Failed, the system returns an error list. The getEdsJobStatus call returns the following parameters:

Name Format Description

status String Status of the EDS job identified by the edsJobId; possible values: Pending, InProgress, Completed, Failed.

errorList Pair

If the status of the EDS job is Failed, this parameter contains a list of Error Code - Error Message pairs regarding the nature of the error (i.e., If the uploaded data contains an error, the error list will indicate the row and the column where the error occurs and the type of error.)

Note that only the first 10 errors appearing in a document will be displayed.

Page 36: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 36/76

© 2000-2010 Yahoo! Inc. All rights reserved.

4 Fault Codes Yahoo! Web Analytics API requests can return a successful response or a fault response. A fault response indicates that the request could not be completed. A fault response is composed of an error code and a text message. The fault message is a short description in English that can be displayed to the user as a minimally descriptive error message. If you display the fault message, you should also display the fault code. Clients should always recognize the fault codes, not the fault messages. The actual fault messages may vary slightly from the messages listed in this appendix.

Some faults are particular to certain calls, while others are more general faults that could happen on any call, such as error code 1000 for a null parameter list. Each subsection lists fault codes that commonly occur with a particular call. However, the fault codes listed for a particular call could occur with any other call as well.

Beyond the fault codes, clients should also check that the response Content-Type in the HTTP header is .text/xml. Any other type, such as .text/html, indicates that the application server is down or unreachable, such as being blocked by a firewall.

See section 7.1 SOAP Fault Code Example.

4.1 HTTP, XML Level Fault Codes Fault codes 0 and -1 are used for general faults.

Code Message

0 Invalid XML or XML-RPC syntax. Usually indicates a development error on the client. The server does not attempt to inform you about how to correct the XML or XML-RPC. You must validate the request on your own.

-1 Unspecified internal API error while processing the request. Usually indicates a runtime error on the server. Contact Yahoo! Web Analytics for more help.

4.2 HTTP Header and XML Fault Codes

Code Message

1001 Session ID required in cookie for non-login request

1002 Invalid Content-Encoding

1003 API currently disabled

1004 API not enabled for this user or organization

1005 User or organization is not allowed to use the API during this time period, or has exceeded its API quota for this time period.

1006 User or organization has exceeded rate limit. Sleep and try again in ’X’ ms (where ’X’ is an integer listed at the beginning of the text message and followed by „ms delay:”)

Page 37: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 37/76

© 2000-2010 Yahoo! Inc. All rights reserved.

1007 Servers temporarily unavailable

1008 Session timeout

1009 Internal Server Error

4.3 User-level Fault Codes

Code Message

1101 Unknown/missing parameter (required, wrong parameter)

1102 Bad size

1103 Not unique (This parameter already exists in the system)

1104 Syntax error (For example: not valid email, url)

1105 Invalid partner name or password

1106 Invalid user name or password

1107 Date error

1108 Data conflict

1109 Bad protocol id

1110 Upgrade protocol

1111 No data available

1112 Unknown/missing report id

1113 Report not supported

1114 Maximum number of projects reached

1115 Quota limit reached for this function

1116 User or organization is not allowed to use this function.

1117 Expired user

1118 Renew password

1119 User not active yet

Page 38: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 38/76

© 2000-2010 Yahoo! Inc. All rights reserved.

1120 No such order id in the specified date or the date is to early (<12 hours)

1121 Invalid project ID

1122 Invalid datasource ID

1123 Project ID and datasource ID mismatch

1124 Invalid/missing attachment

4.4 Filter Fault Codes

Code Message

1121 Invalid Filter Type

1122 Invalid Filter Operator

1123 Invalid Filter Value

For details about how to use filters, see sections 3.3.1 The ScheduleReportJobStandard Call and 3.3.2 The ScheduleReportJobBookmark Call.

Page 39: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 39/76

© 2000-2010 Yahoo! Inc. All rights reserved.

5 Appendix A: Constants

5.1 Campaign Types

Id Note

1 Banner Campaigns

2 Email Campaigns

3 CPC Search Engines

5 Affiliate Program

7 Other

5.2 Timezones

Id Note

1 Dateline : Eniwetok, Kwajalein

2 Samoa : Midway Island, Samoa

3 Hawaiian : Hawaii

4 Alaskan : Alaska

5 Pacific : Pacific Time (U.S. & Canada)

6 Mountain : Mountain Time (U.S. & Canada)

7 U.S. Mountain : Arizona

8 Canada Central : Saskatchewan

9 Central : Central Time (U.S. & Canada)

10 Mexico : Mexico City, Tegucigalpa

11 Eastern : Eastern Time (U.S. & Canada)

12 South Amercia Pacific : Bogota, Lima, Quito

13 U.S. Eastern : Indiana (East)

Page 40: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 40/76

© 2000-2010 Yahoo! Inc. All rights reserved.

14 Atlantic : Atlantic Time (Canada)

15 W. South America : Caracas, La Paz

16 Newfoundland : Newfoundland

17 E. South America : Brasilia

18 E. South America : Buenos Aires

19 Mid-Atlantic : Mid-Atlantic

20 Azores : Azores, Cape Verde Is.

21 Greenwich Mean Time : Casablanca, Monrovia

22 BST : Dublin, Lisbon, London

23 Balkan : Sarajevo, Sofija, Zagreb

24 Central Europe : Prague, Warsaw

25 Romance : Brussels, Madrid, Paris

26 W. Europe : Amsterdam, Berlin

27 E. Europe : E. Europe

28 Egypt : Cairo

29 Finland : Helsinki

30 GT : Athens, Istanbul

31 Israel : Israel

32 South Africa : Harare, Pretoria

33 Russian : Moscow, St. Petersburg

34 Saudi Arabia : Kuwait, Nairobi

35 Iran : Tehran

36 Arabian : Abu Dhabi, Muscat

37 Tbilisi : Tbilisi

38 Afghanistan : Kabul

Page 41: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 41/76

© 2000-2010 Yahoo! Inc. All rights reserved.

39 Ekaterinburg : Ekaterinburg

40 West Asia : Islamabad, Karachi

41 India : Bombay, New Delhi

42 loCentral Asia : Almaty, Dhakacation

43 Colombo : Colombo

44 Bangkok : Bangkok

45 Hanoi : Hanoi

46 Jakarta : Jakarta

47 China : Beijing, Hong Kong, Urumqi

48 Singapore : Singapore

49 Taiwan : Taipei

50 W. Australia : Perth

51 Korea : Seoul

52 Tokyo : Osaka, Sapporo, Tokyo

53 Yakutsk : Yakutsk

54 AUS Central : Darwin

55 Central Australia : Adelaide

56 E. Australia : Canberra, Sydney

57 E. Australia : Brisbane

58 Tasmania : Hobart

59 Vladivostok : Vladivostok

60 West Pacific : Guam, Port Moresby

61 Central Pacific : Magadan, Sol. Is.

62 Fiji : Fiji, Kamchatka, Marshall Is.

63 New Zealand : Auckland, Wellington

Page 42: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 42/76

© 2000-2010 Yahoo! Inc. All rights reserved.

5.3 CPC Engines

Engine Id Name

1 Overture US

2 FindWhat

3 Sprinks

4 Kanoodle

5 Ah-ha

6 ePilot

7 Overture UK

8 eSpotting UK

9 Overture DE

10 eSpotting FR

11 eSpotting DE

12 eSpotting IT

13 eSpotting ES

14 Overture FR

15 Overture JP

16 Google Adwords

17 Google Adwords Content

18 Shopping.com

19 BizRate.com

20 PriceGrabber.com

21 7Search

22 SearchFeed

23 RedZone Global

Page 43: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 43/76

© 2000-2010 Yahoo! Inc. All rights reserved.

24 eSpotting DK

25 eSpotting IE

26 eSpotting NO

27 eSpotting SE

28 Overture AT

29 Overture AU

30 Overture CH

31 Overture ES

32 Overture FI

33 Overture IT

34 Overture NO

35 Overture SE

36 Overture DK

37 Overture NL

38 Mirago

39 Nextag

40 Overture US Local Match

41 MySimon

5.4 Currencies

Currency ID Currency

30 AED

13 AUD

14 BGN

12 BRL

Page 44: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 44/76

© 2000-2010 Yahoo! Inc. All rights reserved.

1 CAD

15 CHF

16 CNY

39 CRC

10 CZK

31 DJF

5 DKK

17 EEK

2 EUR

3 GBP

37 HKD

18 HRK

6 HUF

40 ILS

36 INR

9 ISK

32 JOD

4 JPY

19 KRW

33 KWD

20 LTL

21 LVL

34 MTL

22 MXN

7 NOK

Page 45: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 45/76

© 2000-2010 Yahoo! Inc. All rights reserved.

23 NZD

24 PLN

25 RON

26 RSD

27 RUB

8 SEK

38 SGD

11 SKK

41 THB

28 TRY

29 UAH

0 USD

35 ZAR

5.5 Country Codes

Id Name

af Afghanistan

al Albania

dz Algeria

as American Samoa

ad Andorra

ao Angola

ai Anguilla

aq Antartica

ag Antigua and Barbuda

Page 46: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 46/76

© 2000-2010 Yahoo! Inc. All rights reserved.

ar Argentina

am Armenia

aw Aruba

ac Ascension Island

au Australia

at Austria

az Azerbaijan

bs Bahamas

bh Bahrain

bd Bangladesh

bb Barbados

by Belarus

be Belgium

bz Belize

bj Benin

bm Bermuda

bt Bhutan

bo Bolivia

ba Bosnia and Herzegovina

bw Botswana

bv Bouvet Island

br Brazil

io British Indian Ocean Territory

bn Brunei Darussalam

bg Bulgaria

Page 47: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 47/76

© 2000-2010 Yahoo! Inc. All rights reserved.

bf Burkina Faso

bi Burundi

kh Cambodia

cm Cameroon

ca Canada

cv Cap Verde

ky Cayman Islands

cf Central African Republic

td Chad

cl Chile

cn China

cx Christmas Island

cc Cocos (Keeling) Islands

co Colombia

com Commercial (.com)

km Comoros

cg Congo, Republic of

cd Congo,Democratic People's Rep.

ck Cook Islands

cr Costa Rica

ci Cote d'Ivoire

hr Croatia/Hrvatska

cu Cuba

cy Cyprus

cz Czech Republic

Page 48: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 48/76

© 2000-2010 Yahoo! Inc. All rights reserved.

dk Denmark

dj Djibouti

dm Dominica

do Dominican Republic

tp East Timor

ec Ecuador

edu Educational (.edu)

eg Egypt

sv El Salvador

gq Equatorial Guinea

er Eritrea

ee Estonia

et Ethiopia

fk Falkland Islands (Malvina)

fo Faroe Islands

fj Fiji

fi Finland

fr France

gf French Guiana

pf French Polynesia

tf French Southern Territories

ga Gabon

gm Gambia

ge Georgia

de Germany

Page 49: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 49/76

© 2000-2010 Yahoo! Inc. All rights reserved.

gh Ghana

gi Gibraltar

gov Governmental (.gov)

gr Greece

gl Greenland

gd Grenada

gp Guadeloupe

gu Guam

gt Guatemala

gg Guernsey

gn Guinea

gw Guinea-Bissau

gy Guyana

ht Haiti

hm Heard and McDonald Islands

va Holy See (City Vatican State)

hn Honduras

hk Hong Kong

hu Hungary

is Iceland

in India

id Indonesia

ir Iran (Islamic Republic of)

iq Iraq

ie Ireland

Page 50: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 50/76

© 2000-2010 Yahoo! Inc. All rights reserved.

im Isle of Man

il Israel

it Italy

jm Jamaica

jp Japan

je Jersey

jo Jordan

kz Kazakhstan

ke Kenya

ki Kiribati

kp Korea, Democratic People's Rep.

kr Korea, Republic of

kw Kuwait

kg Kyrgyzstan

la Lao People's Democratic Rep.

lv Latvia

lb Lebanon

ls Lesotho

lr Liberia

ly Libyan Arab Jamahiriya

li Liechtenstein

lt Lithuania

lu Luxembourg

mo Macau

mk Macedonia, Former Yugoslav Rep.

Page 51: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 51/76

© 2000-2010 Yahoo! Inc. All rights reserved.

mg Madagascar

mw Malawi

my Malaysia

mv Maldives

ml Mali

mt Malta

mh Marshall Islands

mq Martinique

mr Mauritania

mu Mauritius

yt Mayotte

mx Mexico

fm Micronesia, Federal State of

mil Military (.mil)

md Moldova, Republic of

mc Monaco

mn Mongolia

ms Montserrat

ma Morocco

mz Mozambique

mm Myanmar

na Namibia

nr Nauru

np Nepal

nl Netherlands

Page 52: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 52/76

© 2000-2010 Yahoo! Inc. All rights reserved.

an Netherlands Antilles

net Network (.net)

nc New Caledonia

nz New Zealand

ni Nicaragua

ne Niger

ng Nigeria

nu Niue

nf Norfolk Island

mp Northern Mariana Islands

no Norway

om Oman

org Organization (.org)

pk Pakistan

pw Palau

ps Palestinian Territories

pa Panama

pg Papua New Guinea

py Paraguay

pe Peru

ph Philippines

pn Pitcairn Island

pl Poland

pt Portugal

pr Puerto Rico

Page 53: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 53/76

© 2000-2010 Yahoo! Inc. All rights reserved.

qa Qatar

re Reunion Island

ro Romania

ru Russian Federation

rw Rwanda

kn Saint Kitts and Nevis

lc Saint Lucia

vc Saint Vincent and the Grenadines

sm San Marino

st Sao Tome and Principe

sa Saudi Arabia

sn Senegal

sc Seychelles

sl Sierra Leone

sg Singapore

sk Slovak Republic

si Slovenia

sb Solomon Islands

so Somalia

za South Africa

gs South Georgia / S. Sandwich Islands

es Spain

lk Sri Lanka

sh St. Helena

pm St. Pierre and Miquelon

Page 54: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 54/76

© 2000-2010 Yahoo! Inc. All rights reserved.

sd Sudan

sr Suriname

sj Svalbard and Jan Mayen Islands

sz Swaziland

se Sweden

ch Switzerland

sy Syrian Arab Republic

tw Taiwan

tj Tajikistan

tz Tanzania

th Thailand

tg Togo

tk Tokelau

to Tonga

tt Trinidad and Tobago

tn Tunisia

tr Turkey

tm Turkmenistan

tc Turks and Ciacos Islands

tv Tuvalu

ug Uganda

ua Ukraine

ae United Arab Emirates

gb United Kingdom

us United States

Page 55: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 55/76

© 2000-2010 Yahoo! Inc. All rights reserved.

uy Uruguay

um US Minor Outlying Islands

uz Uzbekistan

vu Vanuatu

ve Venezuela

vn Vietnam

vg Virgin Islands (British)

vi Virgin Islands (USA)

wf Wallis and Futuna Islands

eh Western Sahara

ws Western Samoa

ye Yemen

yu Yugoslavia

zr Zaire

zm Zambia

zw Zimbabwe

5.6 Reports

Id Report Title

104 Areas of the World

98 Bounce Rate (by Page Title)

97 Bounce Rate (by Page URL)

172 Bounce Rate of First Time Visitors (by Page Title)

171 Bounce Rate of First Time Visitors (by Page URL)

175 Bounce Rate of Returning Visitors (by Page Title)

Page 56: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 56/76

© 2000-2010 Yahoo! Inc. All rights reserved.

174 Bounce Rate of Returning Visitors (by Page URL)

31 Browser Type

32 Browser Version

101 Campaign Conversion

102 Campaign Conversion Details

100 Campaign Details

99 Campaign Summary (Old version)

182 Campaign Summary

26 Clicks to Pages (listed by Page Title)

25 Clicks to Pages (listed by Page URL)

36 Colour Depth

92 Content groups hosting exit links

106 Conversion Ratio by Countries

62 Conversion Ratio by Languages

55 Conversion Ratio by Referring Domains

56 Conversion Ratio by Referring URLs

58 Conversion Ratio by Search Engine Referrals

135 Conversion Ratio by Search Engine Referrals

59 Conversion Ratio by Search Phrases

136 Conversion Ratio by Search Phrases

66 Conversion Ratio by Top Entry Pages (by Page Title)

65 Conversion Ratio by Top Entry Pages (by URL)

63 Conversion Ratio by Visiting Organizations

67 Conversion Ratio Summary

39 Cookie Support

Page 57: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 57/76

© 2000-2010 Yahoo! Inc. All rights reserved.

103 Countries

107 CPC Search Engine Campaigns

112 CPC Search Listings

111 CPC Search Phrases

8 Daily Unique Visitors

109 Demographics Regions

86 Download pages by Content Groups

85 Download Pages by Title

84 Download pages by URL

83 Downloaded Files (by File Name)

81 Downloaded Files (by Full URL)

82 Exit Links (by full URL)

89 Exit Links (grouped by domain)

9 First Time Visitors

11 First Time vs. Returning Visits

227 Flash Version

40 Java Support

37 JavaScript Support

38 JavaScript Version

46 Languages

13 Last Visitors

148 Monthly Unique Visitors

50 Most Active Server Hours

15 Most Requested Pages by Page Title

14 Most Requested Pages by Page URL

Page 58: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 58/76

© 2000-2010 Yahoo! Inc. All rights reserved.

33 Operating System

34 Operating System Versions

133 Organic Search Engine Referrals

134 Organic Search Phrases

12 Page Views

27 Page Views by Document Group

2 Page Views Per Session

91 Pages hosting exit links (by Title)

90 Pages hosting exit links (by URL)

41 Referring Domains

42 Referring URLs

10 Returning Visitors

146 Sales detail

165 Sales Summary

127 Scenario Summary

35 Screen Resolution

44 Search Engine Referrals

45 Search Phrases

110 Time Spent On Site

4 Time Zones

49 Top Browsing Hours

52 Top Directories

143 Top Domains

18 Top Entry Pages by Page Title

16 Top Entry Pages by Page URL

Page 59: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 59/76

© 2000-2010 Yahoo! Inc. All rights reserved.

19 Top Exit Pages by Page Title

17 Top Exit Pages by Page URL

29 Traffic Summary

154 Visit Path

47 Visiting Organizations

28 Visitors by Document Group

7 Visits

147 Weekly Unique Visitors

5.7 ReportFileType

Id Name

0 XML

1 CSV

2 XLS

3 PDF

4 DOC

Page 60: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 60/76

© 2000-2010 Yahoo! Inc. All rights reserved.

6 Appendix B: Filters String Operators:

Equals, NotEquals, BeginsWith, NotBeginsWith, EndsWith, NotEndsWith, Contains, NotContains, Empty, NotEmpty, Regexp.

Number Operators:

Equals, NotEquals, Greater, GreaterOrEquals, Less, LessOrEquals.

Name Type ID Description Value

Browser 45 Equals String, e.g., Firefox.

Browser Version 61 All String operators String, e.g., Firefox 2.0.0.

Campaign (Direct) 493 In

Number List / campaign ids (which can be retrieved from the getcampaigns() call Format: Number separated by commas, e.g., 3,6,8,16.

Campaign (Intelligent) 73 In

Number List / campaign ids (which can be retrieved from the getcampaigns() call Format: Number separated by commas, e.g., 3,6,8,16.

Campaign (Original) 60 In

Number List / campaign ids (which can be retrieved from the getcampaigns() call Format: Number separated by commas, e.g., 3,6,8,16.

Campaign Category (Direct)

ccd01-ccd10 Equals String, e.g., Vendor.

Campaign Category (Intelligent) cci01-cci10 Equals String, e.g., Region.

Internal Campaign Category icc01-icc10 Equals String, e.g., Placement.

Color Palettes 51 Equals

Number, e.g., 3.

The possible options are: 3, 4, 8, 12, 15, 16, 24, 32.

Document Group 237 All String operators String, e.g., Products.

Entry Document Group 244 All String operators String, e.g., Signup.

Page 61: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 61/76

© 2000-2010 Yahoo! Inc. All rights reserved.

Entry Domain 442 All String operators String, e.g., www.abc.com.

Entry Page Title 43 All String operators String, e.g., Home.

Entry Page URL 41 All String operators String, e.g., www.abc.com/products

Internal Search Phrase 843 All String operators String, e.g., web analytics

Page Title 241 All String operators String, e.g., Home.

Page URL 239 All String operators String, e.g., www.abc.com/products

Referring Domain (Direct) 69 All String operators String, e.g., www.google.com.

Referring Domain (Intelligent) 44 All String operators String, e.g., www.google.com.

Referring Domain (Original) 70 All String operators String, e.g., www.google.com.

Referring URL (Direct) 71 All String operators

String, e.g., http://mail.google.com/mail/?ui=3&view=bpp&ver=ymdfwq981tpu

Referring URL (Intelligent) 46 All String operators String, e.g., mail.google.com/campaign.

Referring URL (Original) 72 All String operators String, e.g., mail.google.com/campaign.

Search Engines (Direct) 67 Equals String, e.g., mail.google.com/campaign.

Search Engines (Intelligent) 48 Equals String, e.g., Google.

Search Engines (Original) 68 Equals String, e.g., Google.

Search Listing (Direct) 66 All String operators String, e.g., lamps.

Search Listing (Intelligent) 38 All String operators String, e.g., office supplies.

Search Listing (Original) 62 All String operators String, e.g., chairs.

Page 62: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 62/76

© 2000-2010 Yahoo! Inc. All rights reserved.

Search Listings (Direct) 212 All String operators String, e.g., seesaw.

Search Listings (Intelligent) 211 All String operators String, e.g., gym.

Search Phrases (Direct) 65 All String operators String, e.g., lamps.

Search Phrases (Intelligent) 34 All String operators String, e.g., chairs.

Search Phrases (Original) 64 All String operators String, e.g., seesaw.

Time spent on site (sec) 96

All Number operators Number (seconds), e.g., 15.

Traffic Sources (Direct) 729 Equals

FilterValueTrafficSource enumeration

Possible values: PaidSearch, OrganicSearch,OtherCampaigns,OtherReferrals,DirectAccessOrBookmark.

Traffic Sources (Intelligent) 52 Equals

FilterValueTrafficSource enumeration

Possible values: PaidSearch, OrganicSearch,OtherCampaigns,OtherReferrals,DirectAccessOrBookmark.

Traffic Sources (Original) 730 Equals

FilterValueTrafficSource enumeration

Possible values: PaidSearch, OrganicSearch,OtherCampaigns,OtherReferrals,DirectAccessOrBookmark.

Visiting Countries 75 Equals

String, e.g., China.

Check the user interface for the correct string information.

Visiting Organizations 35 All String operators String, e.g., zen.co.uk.

Extra Fields cfXX

All String operators / All Number operators (depends on the type of the extra field)

String / Number (depends on the type of the extra fields)

String, e.g., Graph Type.

Number, e.g., Report Generation Time.

Page 63: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 63/76

© 2000-2010 Yahoo! Inc. All rights reserved.

7 Appendix C: SOAP Examples Example SOAP requests and responses are included for each call. Each call must be contained in an HTTP request with appropriate HTTP headers. The HTTP headers are not shown in the examples, as they are either fixed or vary by the client.

Most calls take a session_id within the server_url. The value for that server_url is obtained from

the response to the login call. An example server_url containing the session_id would be:

http://ondemand.indextools.com/IndexTools/service/IndexToolsApi;jsessionid=b6JBqiOTseKQZqyb

The SOAP examples are indented for readability. The Yahoo! Web Analytics API is not sensitive to indenting. The examples could be passed .as is. to the API, or they could be passed as one long line of text without any formatting. Responses from the sforce API are not normally formatted, without newlines (unless the data contains newlines).

7.1 SOAP Fault Code Example Response to a faulty request:

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <soapenv:Fault> <faultcode>soapenv:Server.generalException</faultcode> <faultstring>Session Timeout</faultstring> <detail> <ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">indextools</ns1:hostname> </detail> </soapenv:Fault> </soapenv:Body> </soapenv:Envelope>

7.2 login Call SOAP Example The login Request:

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <Login xmlns="http://v3.soap.api.indextools.com"> <PartnerId>PARTNERID</PartnerId> <PartnerPassword>PARTNERPASSWORD</PartnerPassword> <UserId>USERID</UserId> <UserPassword>USERPASSWORD</UserPassword> <secure>true</secure> </Login> </soapenv:Body> </soapenv:Envelope> The login Response:

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"

Page 64: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 64/76

© 2000-2010 Yahoo! Inc. All rights reserved.

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <LoginResponse xmlns="http://v3.soap.api.indextools.com"> <ServerUrl> https://api.web.analytics.yahoo.com/IndexTools/services/IndexToolsApiV3;jsessionid=FA60577E4AA2E30447D7502956C0D681 </ServerUrl> <SessionId>FA60577E4AA2E30447D7502956C0D681</SessionId> </LoginResponse> </soapenv:Body> </soapenv:Envelope>

7.3 logout Call SOAP Example The logout Request:

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <Logout xmlns="http://v3.soap.api.indextools.com" /> </soapenv:Body> </soapenv:Envelope>

The logout Response:

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <LogoutResponse xmlns="http://v3.soap.api.indextools.com" /> </soapenv:Body> </soapenv:Envelope>

7.4 createAccount Call SOAP Example The createAccount Request:

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <CreateAccount xmlns="http://v3.soap.api.indextools.com"> <UserId>testaccount</UserId> <UserPassword>password123</UserPassword> <Email>[email protected]</Email> <Firstname>John</Firstname> <Lastname>Sinclair</Lastname> <Tel>888.1234.1234</Tel> <Address>address</Address> <City>Boston</City> <Country>usa</Country> <Company>Test Co.</Company> <BaseUrl>www.test.com</BaseUrl>

Page 65: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 65/76

© 2000-2010 Yahoo! Inc. All rights reserved.

<ProjectName>TestProject</ProjectName> <TimeZone>GMT</TimeZone> <EditionId>STAT3TRL</EditionId> <DefaultCurrency>USD</DefaultCurrency> </CreateAccount> </soapenv:Body> </soapenv:Envelope>

The createAccount Response:

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <CreateAccountResponse xmlns="http://v3.soap.api.indextools.com"> <AccountId>42630</AccountId> <ProjectId>1968653905</ProjectId> </CreateAccountResponse> </soapenv:Body> </soapenv:Envelope>

7.5 createCampaign Call SOAP Example The createCampaign Request:

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <CreateCampaign xmlns="http://v3.soap.api.indextools.com"> <ProjectId>14</ProjectId> <Campaign> <Name>Test Campaign (from SOAP)</Name> <Description>This campaign was created by SOAP client</Description> <Type>Banner</Type> <State>Show</State> <CostType>PPC</CostType> <StartDate>2005-07-21</StartDate> <EndDate>2005-07-21</EndDate> <FixCost>0.5</FixCost> <Quantity>20</Quantity> <Operator>Contains</Operator> <Parameter>Url</Parameter> <Condition>index2</Condition> <Currency>USD</Currency> </Campaign> </CreateCampaign> </soapenv:Body> </soapenv:Envelope>

The createCampaign Response:

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

Page 66: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 66/76

© 2000-2010 Yahoo! Inc. All rights reserved.

<soapenv:Body> <CreateCampaignResponse xmlns="http://v3.soap.api.indextools.com"> <CampaignId>35328</CampaignId> </CreateCampaignResponse> </soapenv:Body> </soapenv:Envelope>

7.6 createProject Call SOAP Example The createProject Request:

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <CreateProject xmlns="http://v3.soap.api.indextools.com"> <BaseUrl>www.company.com</BaseUrl> <ProjectName>Test Project From Soap</ProjectName> <TimeZone>GMT</TimeZone> <EditionId>STAT3TRL</EditionId> <DefaultCurrency>USD</DefaultCurrency> </CreateProject> </soapenv:Body> </soapenv:Envelope>

The createProject Response:

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <CreateProjectResponse xmlns="http://v3.soap.api.indextools.com"> <ProjectId>1410519610</ProjectId> </CreateProjectResponse> </soapenv:Body> </soapenv:Envelope>

7.7 getActions Call SOAP Example The getActions Request:

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <GetActions xmlns="http://v3.soap.api.indextools.com"> <ProjectId>1234</ProjectId> </GetActions> </soapenv:Body> </soapenv:Envelope> The getActions Response:

Page 67: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 67/76

© 2000-2010 Yahoo! Inc. All rights reserved.

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <GetActionsResponse xmlns="http://v3.soap.api.indextools.com"> <Action> <Id>1</Id> <Name>SALE</Name> </Action> <Action> <Id>2</Id> <Name>SIGNUP</Name> </Action> <Action> <Id>3</Id> <Name>SUBSCRIPTION</Name> </Action> <Action> <Id>4</Id> <Name>CONTACT FORM</Name> </Action> </GetActionsResponse> </soapenv:Body> </soapenv:Envelope>

7.8 getCampaigns Call SOAP Example The getCampaigns Request:

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <GetCampaigns xmlns="http://v3.soap.api.indextools.com"> <ProjectId>1234</ProjectId> </GetCampaigns> </soapenv:Body> </soapenv:Envelope>

The getCampaigns Response:

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <GetCampaignsResponse xmlns="http://v3.soap.api.indextools.com"> <Campaign> <Id>13</Id> <Name>Overture UK</Name> <Description></Description> <Type>PaidSearch</Type> <State>Show</State> <CostType>LCR</CostType> <CreatedDate>2005-03-01</CreatedDate>

Page 68: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 68/76

© 2000-2010 Yahoo! Inc. All rights reserved.

<StartDate>2005-04-01</StartDate> <FixCost>0.0</FixCost> <Quantity>0.0</Quantity> <Operator>Contains</Operator> <Parameter>Url</Parameter> <Condition>ref=gotouk</Condition> <Currency>USD</Currency> <ActionId>0</ActionId> </Campaign> </GetCampaignsResponse> </soapenv:Body> </soapenv:Envelope>

7.9 getEditions Call SOAP Example The getEditions Request:

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <GetEditions xmlns="http://v3.soap.api.indextools.com" /> </soapenv:Body> </soapenv:Envelope>

The getEditions Response:

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <GetEditionsResponse xmlns="http://v3.soap.api.indextools.com"> <Edition> <Id>STAT3TRL</Id> <Name>eBusiness Trial Edition</Name> <Description>- Invisible real-time web site tracking&lt;br&gt;- incl. 5,000 pageviews per month&lt;br&gt;- Document grouping&lt;br&gt;- Conversion ratio analysis&lt;br&gt;- Action Tracking&lt;br&gt;- IP ing to exclude your own visits</Description> </Edition> </GetEditionsResponse> </soapenv:Body> </soapenv:Envelope>

7.10 getProjects Call SOAP Example The getProjects Request:

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body>

Page 69: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 69/76

© 2000-2010 Yahoo! Inc. All rights reserved.

<GetProjects xmlns="http://v3.soap.api.indextools.com" /> </soapenv:Body> </soapenv:Envelope>

The getProjects Response:

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <GetProjectsResponse xmlns="http://v3.soap.api.indextools.com"> <Project> <Id>1234</Id> <Name>Project name</Name> <Edition> <Id>STAT4</Id> <Name>eBusiness Edition with Live Cost Analysis</Name> <Description>includes standard Statistics eBusiness Edition features plus&lt;br&gt;- Real-time cost analysis functionality&lt;br&gt;- Specifically designed to suppport PPC search engines&lt;br&gt;- Imports click costs from all major PPC engines (such as Overture, Google Adwords, Findwhat etc.) in real-time&lt;br&gt;- Reports Clicks, ROAS (return on ad spend) as well as CPA (cost per action) on a keyword level</Description> </Edition> <BaseUrl>www.company.com</BaseUrl> <TimeZone>Europe_London</TimeZone> <FirstRecordDate>2005-01-01</FirstRecordDate> <DefaultCurrency>USD</DefaultCurrency> </Project> </GetProjectsResponse> </soapenv:Body> </soapenv:Envelope>

7.11 ScheduleReportJobStandard Call SOAP Example The ScheduleReportJobStandard Request:

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <ScheduleReportJobStandard xmlns="http://v3.soap.api.indextools.com"> <ProjectId>1234</ProjectId> <ReportId>31</ReportId> <StartDate>2005-07-03</StartDate> <EndDate>2005-07-09</EndDate> <Limit>2</Limit> <Sort>1</Sort> <SortDirection>Ascending</SortDirection> <IsShowDescription>true</IsShowDescription> </ScheduleReportJobStandard> </soapenv:Body> </soapenv:Envelope>

Page 70: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 70/76

© 2000-2010 Yahoo! Inc. All rights reserved.

7.12 XML Report Example <GetReportResponse> <Title>Campaign Summary</Title> <Description>This report summarizes the activity that originated as a result of a specific campaign. For more information on specific campaigns use the drill down call.</Description> <HasMoreRows>false</HasMoreRows> <TopHeadRows> <Row> <Item> <Name>Impressions</Name> <Span>1</Span> </Item> <Item> <Name>Clicks</Name> <Span>1</Span> </Item> <Item> <Name>Uniques</Name> <Span>1</Span> </Item> <Item> <Name>Returning</Name> <Span>1</Span> </Item> <Item> <Name>Bounce rate</Name> <Span>1</Span> </Item> <Item> <Name>Cost</Name> <Span>1</Span> </Item> <Item> <Name>Revenue</Name> <Span>1</Span> </Item> <Item> <Name>Action</Name> <Span>1</Span> </Item> <Item> <Name>Conversion</Name> <Span>1</Span> </Item> <Item> <Name>ROAS</Name> <Span>1</Span> </Item> <Item> <Name>CPA</Name> <Span>1</Span> </Item> <Item> <Name>ACC</Name> <Span>1</Span> </Item> </Row> </TopHeadRows> <LeftHeadLabels> <Name>Channel</Name>

Page 71: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 71/76

© 2000-2010 Yahoo! Inc. All rights reserved.

<Name>Market</Name> <Name>Vendor</Name> <Name>Category 44</Name> <Name>Campaign</Name> </LeftHeadLabels> <LeftHeadItems> <Item> <Name>Paid Search</Name> <Indent>0</Indent> </Item> <Item> <Name>US</Name> <Indent>1</Indent> </Item> <Item> <Name>Paid Search</Name> <Indent>2</Indent> </Item> <Item> <Name>Google</Name> <Indent>3</Indent> </Item> <Item> <Name>Google</Name> <Indent>4</Indent> </Item> <Item> <Name>Google test</Name> <Indent>4</Indent> </Item> <Item> <Name>Overture</Name> <Indent>3</Indent> </Item> </LeftHeadItems> <DataRows> <Row> <Cell> <Value>0</Value> <FormattedValue>0</FormattedValue> <Type>Int</Type> </Cell> <Cell> <Value>268</Value> <FormattedValue>268</FormattedValue> <Type>Int</Type> </Cell> <Cell> <Value>266</Value> <FormattedValue>266</FormattedValue> <Type>Int</Type> </Cell> <Cell> <Value>894</Value> <FormattedValue>894</FormattedValue> <Type>Int</Type> </Cell> <Cell> <Value>26.09%</Value> <FormattedValue>26.09%</FormattedValue> <Type>Percent</Type>

Page 72: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 72/76

© 2000-2010 Yahoo! Inc. All rights reserved.

</Cell> <Cell> <Value>22.82</Value> <FormattedValue>$22.82</FormattedValue> <Type>Currency</Type> </Cell> <Cell> <Value>0.00</Value> <FormattedValue>$0.00</FormattedValue> <Type>Currency</Type> </Cell> <Cell> <Value>0</Value> <FormattedValue>0</FormattedValue> <Type>Int</Type> </Cell> <Cell> <Value>0.00%</Value> <FormattedValue>0.00%</FormattedValue> <Type>Percent</Type> </Cell> <Cell> <Value>0.00%</Value> <FormattedValue>0.00%</FormattedValue> <Type>Percent</Type> </Cell> <Cell> <Value>0.00</Value> <FormattedValue>$0.00</FormattedValue> <Type>Currency</Type> </Cell> <Cell> <Value>0.08</Value> <FormattedValue>$0.08</FormattedValue> <Type>Currency</Type> </Cell> </Row> <Row> <Cell> <Value>0</Value> <FormattedValue>0</FormattedValue> <Type>Int</Type> </Cell> <Cell> <Value>268</Value> <FormattedValue>268</FormattedValue> <Type>Int</Type> </Cell> <Cell> <Value>266</Value> <FormattedValue>266</FormattedValue> <Type>Int</Type> </Cell> <Cell> <Value>894</Value> <FormattedValue>894</FormattedValue> <Type>Int</Type> </Cell> </Row> </DataRows> <TotalCells>

Page 73: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 73/76

© 2000-2010 Yahoo! Inc. All rights reserved.

<Cell> <Value/> <FormattedValue/> <Type>Text</Type> </Cell> <Cell> <Value>0</Value> <FormattedValue>0</FormattedValue> <Type>Int</Type> </Cell> <Cell> <Value>342</Value> <FormattedValue>342</FormattedValue> <Type>Int</Type> </Cell> <Cell> <Value>330</Value> <FormattedValue>330</FormattedValue> <Type>Int</Type> </Cell> <Cell> <Value>1694</Value> <FormattedValue>1,694</FormattedValue> <Type>Int</Type> </Cell> <Cell> <Value>33.23%</Value> <FormattedValue>33.23%</FormattedValue> <Type>Percent</Type> </Cell> <Cell> <Value>22.82</Value> <FormattedValue>$22.82</FormattedValue> <Type>Currency</Type> </Cell> <Cell> <Value>5108.52</Value> <FormattedValue>$5,108.52</FormattedValue> <Type>Currency</Type> </Cell> <Cell> <Value>84</Value> <FormattedValue>84</FormattedValue> <Type>Int</Type> </Cell> <Cell> <Value>24.56%</Value> <FormattedValue>24.56%</FormattedValue> <Type>Percent</Type> </Cell> <Cell> <Value>22386.15%</Value> <FormattedValue>22,386.15%</FormattedValue> <Type>Percent</Type> </Cell> <Cell> <Value>0.27</Value> <FormattedValue>$0.27</FormattedValue> <Type>Currency</Type> </Cell> <Cell>

Page 74: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 74/76

© 2000-2010 Yahoo! Inc. All rights reserved.

<Value>0.06</Value> <FormattedValue>$0.06</FormattedValue> <Type>Currency</Type> </Cell> </TotalCells> <SubtotalCells/> <UnknownCells/> </GetReportResponse>

7.13 getReports Call SOAP Example The getReports Request:

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <GetReports xmlns="http://v3.soap.api.indextools.com"> <ProjectId>14</ProjectId> </GetReports> </soapenv:Body> </soapenv:Envelope>

The getReports Response:

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <GetReportsResponse xmlns="http://v3.soap.api.indextools.com"> <Report> <Id>104</Id> <Name>Areas of the World</Name> <Description>This report page shows the number and percentage of your visitors who come from different areas of the world.</Description> <IsLimitNeed>false</IsLimitNeed> <IsSessionNeed>false</IsSessionNeed> <IsScenarioNeed>false</IsScenarioNeed> <CampaignNeed>notused</CampaignNeed> <ActionNeed>notused</ActionNeed> </Report> <Report> <Id>98</Id> <Name>Bounce Rate (by Page Title)</Name> <Description>Bounce rate is the percentage of web site visitors who arrive at an entry page, then leave without getting any deeper into the site.</Description> <IsLimitNeed>true</IsLimitNeed> <IsSessionNeed>false</IsSessionNeed> <IsScenarioNeed>false</IsScenarioNeed> <CampaignNeed>notused</CampaignNeed> <ActionNeed>notused</ActionNeed> <Help>This is an important metric, one all internet marketers should know about their e-businesses off the top of their heads. The rate should be a part of the marketing plan as well, normally as an objective accompanied by appropriate

Page 75: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 75/76

© 2000-2010 Yahoo! Inc. All rights reserved.

strategies and tactics designed to reduce the rate to an acceptable level. Once the bounce rate has been reduced to a consistent acceptable level, then efforts can be concentrated against increasing the buy rate.</Help> </Report> [...] </GetReportsResponse> </soapenv:Body> </soapenv:Envelope>

7.14 getScenarios Call SOAP Example The getScenarios Request:

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <GetScenarios xmlns="http://v3.soap.api.indextools.com"> <ProjectId>14</ProjectId> </GetScenarios> </soapenv:Body> </soapenv:Envelope>

The getScenarios Response:

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <GetScenariosResponse xmlns="http://v3.soap.api.indextools.com"> <Scenario> <Id>1</Id> <Name>Signup scenario</Name> <Description></Description> </Scenario> <Scenario> <Id>2</Id> <Name>Upgrade scenario</Name> <Description></Description> </Scenario> </GetScenariosResponse> </soapenv:Body> </soapenv:Envelope>

7.15 getTrackingCode Call SOAP Example The getTrackingCode Request:

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

Page 76: Yahoo Web Analytics API Reference Guide

Yahoo! Web Analytics Web Services API Reference Manual 76/76

© 2000-2010 Yahoo! Inc. All rights reserved.

<soapenv:Body> <GetTrackingCode xmlns="http://v3.soap.api.indextools.com"> <ProjectId>1234</ProjectId> <TransferProtocol>0</TransferProtocol> </GetTrackingCode> </soapenv:Body> </soapenv:Envelope>

The getTrackingCode Response:

<?xml version="1.0" encoding="utf-8"?> <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <soapenv:Body> <GetTrackingCodeResponse xmlns="http://v3.soap.api.indextools.com"> <IncludeCode>&lt;!-- Yahoo! Web Analytics Customization Code --&gt; &lt;!-- Remove leading // to activate custom variables --&gt; &lt;script language=&quot;Javascript&quot;&gt; //var DOCUMENTGROUP=''; //var DOCUMENTNAME=''; //var ACTION=''; &lt;/script&gt; &lt;!-- End of Customization Code --&gt; &lt;!-- Yahoo! Web Analytics Code v3.01 - All rights reserved --&gt; &lt;script language=&quot;javascript1.1&quot; src=&quot;http://www.indextools.com/indextools.js&quot;&gt;&lt;/script&gt;&lt;noscript&gt; &lt;img src=&quot;http://stats.indextools.com/p.pl?a=1234&amp;js=no&quot; width=&quot;1&quot; height=&quot;1&quot;&gt;&lt;/noscript&gt;&lt;!--//--&gt; &lt;!-- End of Yahoo! Web Analytics Code --&gt;</IncludeCode> <JsLocation>/ittc3/100014/indextools.js</JsLocation> </GetTrackingCodeResponse> </soapenv:Body> </soapenv:Envelope>