Visit Resources

Use visit resources to learn about a user visit to your website. Discover the user's Pardot ID, Google Analytics parameters, and other information.

Note: Include the authentication header with every request. For information on how to authenticate, see Authentication.

Resource Name Operation Description
Visit Query GET Request information for visit records that matches the specified criteria.
Visit Read GET Request information for a single visit record.

Visit Query

Request information for the visit records that match the specified criteria. You can specify the visit records and fields to request. A maximum of 200 records are returned. To return all visit records, specify the output as mobile.

URI

/api/visit/version/4/do/query?<selection parameter>...

Replace <selection parameter> with ids, visitor_ids, or prospect_ids. Your visit query request must include one selection parameter.

Parameters to Select Visit Records

Use these parameters to specify the visit records to return.

Parameter Type Possible Values Description
<ids> array Pardot visit IDs Requests visit records with the specified Pardot visit ID. Separate the IDs with a comma (no spaces). We recommend using a POST request.
<visitor_ids> array Pardot visitor IDs Request visit records with the specified Pardot visitor IDs. Separate the IDs with a comma (no spaces). We recommend using a POST request.
<prospect_ids> array Pardot prospect IDs Request visit records with the specified Pardot prospect IDs. Separate the IDs with a comma (no spaces). We recommend using a POST request.

Parameters to Specify Which Results Are Returned

Use these parameters to specify the visit fields to return.

Parameter Type Possible Values Description
limit integer Any integer from 1 through 200. The number of visit records to return. Default value is 200.
offset integer Any positive integer The number of visit records to omit from the response (the number to "skip over"). Remember to include one of the parameters ids, visitor_ids, or prospect_ids. Example: Retrieve a list of visits for the prospect with Pardot ID 1234. Sort the visits by Pardot ID, and skip over the first 10 visits: /api/visit/version/4/do/query?offset=10&sort_by=ids&prospect_ids=1234.

Sort Order

Visits are returned in order of ascending ID.

Visit Read

Request information for a single visit record.

URI

/api/visit/version/4/do/read/id/<ID>

Replace <ID> with the Pardot ID of the visit record.

Example

Request information about the visit record with ID 1234.

/api/visit/version/4/do/read/id/1234

XML Response

The XML response for a query request contains information for multiple visit records. The XML response for a read request contains information for a single visit record.

XML Response for a Visit Query

<rsp stat="ok" version="1.0">
    <result>
        <total_results>...</total_results>
        <visit>...</visit>
        <visit>...</visit>
        <visit>...</visit>
    </result>
</rsp>
Tag Description
<result> Parent tag. Contains information about the visit records that match the parameters specified in your query.
<total_results> Contains the number of visit records selected by the query. Note The query request returns a maximum of 200 visit records. If your query matches more than 200 records, you can make several requests to retrieve all matching records.
<visit> Contains information about a single visit record. See Visit in Object Field References for a complete description of fields.

XML Response for a Visit Read

<rsp stat="ok" version="1.0">
    <visit>
        ...
        <visitor_page_views>
            <visitor_page_view>
                ...
            </visitor_page_view>
        </visitor_page_views>
    </visit>
</rsp>
Tag Description
<visit> The information about a single visit. See Visit in Object Field References for a complete description of fields.