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 Account Engagement 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
FieldTypeDescription
idIntegerID 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.
doNotSellBooleanIndicates whether the prospect, or a visitor associated with the propect, recorded an activity with the Global Privacy Control Header enabled.
hostnameStringEquivalent to visitor.hostname
ipAddressStringEquivalent to visitor.ip_address
mediumParameterStringVisitor's medium parameter utm_medium from Google Analytics.
pageViewCountIntegerEquivalent to visitor.visitor_page_view_count
prospectIdProspectAccount Engagement ID for the associated prospect.
campaignIdCampaignCampaign 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.
FieldRequiredTypeDescription
prospectIdTrueIntegerThe 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.

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:

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.

ParameterDescription
idReturns any visitor where ID is equal to the given integer.
idListReturns any visitor where ID is included in the given list of values.
prospectIdReturns any visitor where ProspectId is equal to the given integer.
createdAtReturns any visitor where CreatedAt is equal to the given datetime.
updatedAtReturns any visitor where UpdatedAt is equal to the given datetime.
isIdentifiedWhen true, returns only identified visitors.
deletedDetermines whether to return deleted records. The value can be false (default), true, or all.

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).