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.

The API to access the Visit object follows the conventions described in Version 5 Overview.

OperationHTTP VerbURL FormatAbility Requirements
ReadGEThttps://pi.pardot.com/api/v5/objects/visitors/<id>?<params>Prospect > Visitors > View ability
QueryGEThttps://pi.pardot.com/api/v5/objects/visitors?<params>Prospect > Visitors > View ability
Assign to ProspectPOSThttps://pi.pardot.com/api/v5/objects/visitors/{id}/do/assignToProspectProspect > Visitors > View ability
Identify CompanyPOSThttps://pi.pardot.com/api/v5/objects/visitors/{id}/do/identifyCompanyProspect > Visitors > View ability

Read-Only Fields

FieldTypeDescription
idIntID of the object.
campaignParameterStringVisitor's campaign parameter utm_campaign from Google Analytics.
contentParameterStringVisitor's content parameter utm_content from Google Analytics.
createdAtDateTimeTime the object was created.
hostnameStringEquivalent to visitor.hostname
ipAddressStringEquivalent to visitor.ip_address
mediumParameterStringVisitor's medium parameter utm_medium from Google Analytics.
pageViewCountIntEquivalent to visitor.visitor_page_view_count
prospectIdProspect[prospect-v5.md]Pardot ID for the associated prospect.
campaignIdCampaign [campaign-v5.md]Campaign ID for the associated visitor.
sourceParameterStringVisitor's source parameter utm_source from Google Analytics.
termParameterStringVisitor's term parameter utm_term from Google Analytics.
updatedAtDatetimeLast updated time for the object.
isIdentifiedBooleanIf True, the visitor's company is identified.

Assign to Prospect Fields

FieldRequiredTypeDescription
prospectIdTrueIntThe ID of the prospect to be assigned to the Visitor.
assignDeletedProspectFalseBooleanTrue if the visitor can be assigned to a deleted prospect. If the Prospect isn’t deleted, the value of this property isn’t used. Defaults to false.

Retrieve a single visitor following the conventions described in the Version 5 Overview.

Example request:

Example response:

Retrieving a collection of visitors follows the conventions described in Version 5 Overview.

Sortable Fields

When executing a query, the following fields can be specified in the orderBy parameter. See the conventions for query described in the Version 5 Overview.

  • id
  • prospectID
  • createdAt
  • updatedAt

Example request:

Example response:

Filtering Results

When executing a query, the following parameters can be used to filter the returned results. These parameters can be specified in the request along with any shared parameters defined in Version 5 Overview. When specifying more than one parameter, all parameters must match the record in order for it to be returned in the results.

| Parameter | Description | | -------------- | ----------------------------------------------------------------- | --- | | id | Returns any visit where ID is equal to the given integer. | | prospectId | Returns any visit where ProspectId is equal to the given integer. | | createdAt | Returns any visit where CreatedAt is equal to the given datetime. | | updatedAt | Returns any visit where UpdatedAt is equal to the given datetime. | | isIdentified | When True, returns only identified visitors. | |

Example request:

Example response:

Assigns a visitor record to a prospect.

Example request

Example Responses

Visitor assigned to prospect successfully

Status Code: SUCCESS (200)

Visitor not found

Status Code: NOT FOUND (404)

Prospect not found

Status Code: BAD REQUEST (400)

Prospect is deleted and “assignedDeletedProspect“ is false (or not defined)

  • Status Code: BAD REQUEST (400)

Returns information about the visitor's company, if identified.

Example request

Example Responses

If the visitor has an identified company, the request responds with the status SUCCESS 200, and returns these fields:

FieldTypeDescription
nameStringCompany name
cityStringCompany city
stateStringCompany state
postalCodeStringCompany postal code
countryStringCompany country

If the visitor doesn’t have an identified company, the request responds with the status NOT FOUND (404).