Visitor Object

Use visitor resources to learn about the people who interact with your website, including their IP address and Google Analytics information. A visitor is someone who has visited a page with your Pardot tracking code on it, but hasn’t converted to a prospect yet. Learn more about visitors in Salesforce Help.

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

Visitor Resources

Resource NameOperationDescription
Visitor AssignPOSTAssign a visitor record to a prospect.
Visitor QueryGETRequest information for the visitors that match the specified criteria.
Visitor ReadGETRequest information for a single visitor.

Visitor Assign

Associate a visitor to a prospect. Most prospects are related to their visitor activity when they convert, but you can manually associate a visitor with a prospect. This feature comes in handy when you’re in contact with a potential prospect whose company is in your visitor's report.

URI

Replace <ID> with the Pardot ID of the visitor. Replace <prospect ID> with the Pardot ID of the prospect.

Parameters

Include <prospect ID> to identify the prospect that the visitor is assigned to.

Example

Assign the visitor 1234 to the prospect 5678

Visitor Read

Request information for a single visitor.

URI

Replace <ID> with the Pardot ID of the visitor.

Example

Request information for the visitor with ID 1234

Visitor Query

Request information about the visitors that match the specified criteria. You can specify which visitors and which fields to request. A maximum of 200 visitors are returned, unless you specify the output as mobile. If you specify the output as mobile, then all visitors are returned.

To request information about a specific visitor, use Visitor Read.

URI

Parameters to Select Visitors

Use these parameters to specify which visitors are returned. Parameters can be used in any combination and in any order unless otherwise specified.

Notes:

ParameterTypePossible ValuesDescription
created_afterstringtoday, yesterday, last_7_days, this_month, last_month,<custom_time>Request visitors created after the specified date and time. Example: To request forms created in 2020, use /api/visitors/version/3/do/query?created_after=2019-12-31 24:59:59.
created_beforestringtoday, yesterday, last_7_days, this_month, last_month, <custom_time>Request visitors created before the specified date and time. Doesn’t include visitors created at the specified time. <custom_time> Example: to request visitors created before today (but not created today), use /api/visitor/version/3/do/query?created_before=today.
id_greater_thanintegerAny positive integerRequest visitors that have a Pardot ID greater than the specified number.
id_less_thanintegerAny positive integerRequest visitors that have a Pardot ID less than the specified number.
only_identifiedbooleantrue, falseRequest visitors that have an identified company. Default value is true.
prospect_idsarrayany set of valid prospect IDs, falseRequest visitors with the specified prospect IDs. Separate prospect IDs with a comma.
updated_afterstringtoday, yesterday, last_7_days, this_month, last_month, <custom_time>Request visitors that were last updated after the specified date and time.
updated_beforestringtoday, yesterday, last_7_days, this_month, last_month, <custom_time>Request visitors that were last updated before the specified date and time.

Parameters to Specify Which Results Are Returned

Use these parameters to specify which visitor fields are returned, and how the visitors are sorted.

ParameterTypePossible ValuesDescription
fieldsarrayAny valid field names.Lists the fields to return. The visitor ID is always returned. Separate field names with a comma.
limitintegerAny integer from 1 through 200.The number of visitors to return. Default value is 200.
offsetintegerAny positive integerThe number of visitors to omit from the response (the number to "skip over"). Example: Retrieve a list of visitors, omitting the 50 most recently updated visitors. Sort the query by the updated_at field and use offset=50: api/visitor/version/3/do/query?sort_by=updated_at&offset=50
outputstringsimple, mobile, fullThe format to use for the query results. mobile returns fewer fields. full returns all fields including prospect information. simple returns all fields except for prospect information - only prospect ID is returned.
sort_bystringcreated_at, id, updated_atThe field by which the results are sorted. See Sort Order.
sort_orderstringascending, descendingThe sort order. The default value depends on which sort_by value you specify. See Sort Order.

Sort Order

Use sort_by to specify which field Pardot uses to sort the results. Different fields have different default sort orders.

ValueDefault Sort OrderDescription
created_atdescendingSort the results by the visitors' created_at timestamps.
idascendingSort the results by the visitors' id fields.
updated_atdescendingSort the results by the visitors' updated_at timestamps.

Example

Request a list of visitors, sorted in ascending order by the records' creation time.

XML Response

The XML response for a query request contains information about multiple visitors. The XML response for a read request contains information about a single visitor.

XML Response for Visitor Query

TagDescription
<result>Parent tag. Contains the visitors that match the parameters specified in your query.
<total_results>The number of visitors selected by the query. Note: The query request returns a maximum of 200 visitors. If your query matches more than 200 visitors, you can make several requests to retrieve all matching records.
<visitor>The information for a single visitor. For information about visitor fields, see Visitor.