Visitor Activity Object
Use activities resources to learn how visitors and prospects have interacted with your website. Examples of activities include:
- Viewing and clicking your website
- Submitting a form
- Clicking a social media post
Learn more about visitor activities in Salesforce Help.
The API to access the Visitor Activity object follows the conventions described in Version 5 Overview.
Operation | HTTP Verb | URL Format | Ability Requirements |
---|---|---|---|
Query | GET | https://pi.pardot.com/api/v5/objects/visitor-activities?<params> | Prospect > Visitors > View ability |
Read | GET | https://pi.pardot.com/api/v5/objects/visitor-activities/<id>?<params> | Prospect > Visitors > View ability |
Field | Type | Description |
---|---|---|
campaignId | Integer | Account Engagement ID for the associated campaign. |
campaign | Campaign | Object representing the campaign related to this object. See documentation for Campaign for fields. |
createdAt | DateTime | Time that visitor activity occurred; Time is reported in API user's preferred timezone. |
customRedirectId | Integer | Account Engagement ID of the custom redirect associated with this visitor activity Note: Appears only if this visitor activity has a custom redirect associated with it. |
customRedirect | Custom Redirect | Object representing the custom redirect related to this object. See documentation for Custom Redirect for fields. |
details | String | Details about this visitor activity such as the name of the object associated with this activity, the search phrase used in a site search query, etc. |
emailId | Integer | Account Engagement ID of the email associated with this visitor activity. Appears only if this visitor activity has an email associated with it. |
emailTemplateId | Integer | Account Engagement ID of the email template associated with this visitor activity. Appears only if this visitor activity has an email associated with it. |
emailTemplate | Email Template | Object representing the email template related to this object. See documentation for Email Template for fields. |
email | Object representing the email related to this object. See documentation for Email for fields. | |
fileId | Integer | Account Engagement ID of the file associated with this visitor activity. Appears only if this visitor activity has a file associated with it. |
file | File | Object representing the file related to this object. See documentation for File for fields. |
formHandlerId | Integer | Account Engagement ID of the form handler associated with this visitor activity. Appears only if this visitor activity has a form handler associated with it. |
formHandler | Form Handler | Object representing the form handler related to this object. See documentation for Form Handler for fields. |
formId | Integer | Account Engagement ID of the form associated with this visitor activity. Appears only if this visitor activity has a form associated with it. |
form | Form | Object representing the form related to this object. See documentation for Form for fields. |
id | Integer | Account Engagement ID for this visitor activity. |
landingPageId | Integer | Account Engagement ID of the landing page associated with this visitor activity. Appears only if this visitor activity has a landing page associated with it. |
landingPage | Landing Page | Object representing the landing page related to this object. See documentation for Landing Page for fields. |
listEmailId | Integer | Account Engagement ID of the list email associated with this visitor activity. Appears only if this visitor activity has an email associated with it. |
listEmail | List Email | Object representing the list email related to this object. See documentation for List Email for fields. |
multivariateTestVariationId | Integer | Account Engagement ID of the multivariate test variation associated with this visitor activity. Appears only if this visitor activity has a multivariate test variation associated with it. |
opportunityId | Integer | Account Engagement ID for the associated opportunity. |
opportunity | Opportunity | Object representing the opportunity related to this object. See documentation for Opportunity for fields. |
paidSearchAdId | Integer | Account Engagement ID of the paid search ad associated with this visitor activity. Appears only if this visitor activity has a paid search ad associated with it. |
prospectId | Integer | Account Engagement ID for the associated prospect. |
prospect | Prospect | Object representing the prospect related to this object. See documentation for Prospect for fields. |
siteSearchQueryId | Integer | Account Engagement ID of the site search query associated with this visitor activity. Appears only if this visitor activity has a site search query associated with it. |
typeName | String | Visitor activity's type name. |
type | Integer | Visitor activity's type number. |
updatedAt | DateTime | Time that visitor activity update occurred; Time is reported in API user's preferred timezone. |
visitId | Integer | Account Engagement ID for the associated visit. |
visit | Visit | Object representing the visit related to this object. See documentation for Visit for fields. |
visitorId | Integer | Account Engagement ID for the associated visitor. |
visitorPageViewId | Integer | Account Engagement ID for the associated visitor page view. |
visitorPageView | Visitor Page View | Object representing the visitor page view related to this object. See documentation for Visitor Page View for fields. |
visitor | Visitor | Object representing the visitor related to this object. See documentation for Visitor for fields. |
Retrieve a single visitor activity following the conventions described in the Version 5 Overview.
Example request:
Example response:
Retrieving a collection of visitor activities 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
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.
Parameter | Description |
---|---|
id | Returns any visitor activity where ID is equal to the given integer value. |
idList | Returns any visitor activity where ID is included in the given list of values. |
idGreaterThan | Returns any visitor activity where ID is greater than the specified value, non-inclusive. |
idGreaterThanOrEqualTo | Returns any visitor activity where ID is greater than or equal to the specified value. |
idLessThan | Returns any visitor activity where ID is less than the specified value, non-inclusive. |
idLessThanOrEqualTo | Returns any visitor activity where ID is less than or equal to the specified value. |
type | Returns any visitor activity where type is equal to the given value. |
visitorId | Returns any visitor activity where VisitorId is equal to the given integer value. |
visitorIdGreaterThan | Returns any visitor activity where VisitorId is greater than the specified value, non-inclusive. |
visitorIdGreaterThanOrEqualTo | Returns any visitor activity where VisitorId is greater than or equal to the specified value. |
visitorIdLessThan | Returns any visitor activity where VisitorId is less than the specified value, non-inclusive. |
visitorIdLessThanOrEqualTo | Returns any visitor activity where VisitorId is less than or equal to the specified value. |
prospectId | Returns any visitor activity where ProspectId is equal to the given integer value. |
prospectIdGreaterThan | Returns any visitor activity where ProspectId is greater than the specified value, non-inclusive. |
prospectIdGreaterThanOrEqualTo | Returns any visitor activity where ProspectId is greater than or equal to the specified value. |
prospectIdLessThan | Returns any visitor activity where ProspectId is less than the specified value, non-inclusive. |
prospectIdLessThanOrEqualTo | Returns any visitor activity where ProspectId is less than or equal to the specified value. |
createdAt | Returns any visitor activity where CreatedAt is equal to the given datetime value. |
createdAtAfter | Returns any visitor activity where CreatedAt is after the given datetime value, non-inclusive. |
createdAtAfterOrEqualTo | Returns any visitor activity where CreatedAt is after or equal to the given datetime value. |
createdAtBeforeOrEqualTo | Returns any visitor activity where CreatedAt is before or equal to the given datetime value. |
createdAtBefore | Returns any visitor activity where CreatedAt is before the given datetime value, non-inclusive. |
updatedAt | Returns any visitor activity where UpdatedAt is equal to the given datetime value. |
updatedAtAfter | Returns any visitor activity where UpdatedAt is after the given datetime value, non-inclusive. |
updatedAtAfterOrEqualTo | Returns any visitor activity where UpdatedAt is after or equal to the given datetime value. |
updatedAtBefore | Returns any visitor activity where UpdatedAt is before the given datetime value, non-inclusive. |
updatedAtBeforeOrEqualTo | Returns any visitor activity where UpdatedAt is before or equal to the given datetime value. |
Example request:
Example response:
Account Engagement creates an activity when a visitor or prospect interacts with a web page, such as viewing a form or clicking an advertisement. A web activity can have the following values for the type
field:
1
(Click)2
(View)3
(Error)4
(Success)5
(Visitor/Session)7
(Search)20
(Visit)21
(Custom URL Click)
The information in the details
field and the name of the primary ID field give you information about the web activity.
type | typeName | details | Primary ID |
---|---|---|---|
1 (Click) | Visit Tracker | URL clicked | visitId |
1 (Click) | Landing Page Tracker | URL clicked | landingPageId |
1 (Click) | Paid Ad Search | Headline | paidSearchAdId |
1 (Click) | Form Tracker | URL clicked | formId |
2 (View) | Form | form name | formId |
2 (View) | Landing Page | landing Page Name | landingPageId |
2 (View) | File | file name | fileId |
2 (View) | Multivariate Landing Page | selected landing page name | multivariateTestVariationId |
3 (Error) | Multivariate Landing Page | selected landing page name | multivariateTestVariationId |
3 (Error) | Landing Page | landing page name | landingPageId |
3 (Error) | Form Handler | form handler name | formHandlerId |
3 (Error) | Form | form name | formId |
4 (Success) | Multivariate Landing Page | selected landing page name | multivariateTestVariationId |
4 (Success) | Landing Page | landing page name | landingPageId |
4 (Success) | Form Handler | form handler name | formHandlerId |
4 (Success) | Form | form name | formId |
5 (Visitor / Session) | Visitor | # page views (Visitor) | - |
7 (Search) | Site Search Query | search terms | siteSearchQueryId |
20 (Visit) | Visit | # page views (Session Visit) | visitId |
21 (Custom URL Click) | Custom Redirect | name of redirect | customRedirectId |
When a visitor or prospect fills out a form, Account Engagement creates an activity with type
=2
(View) and typeName
= Form
. The visitor activity representation for this record contains the name of the form ("Event Registration") and the formId
.
Account Engagement creates an activity when it sends an email or when a visitor or prospect interacts with the email. An email activity can have the following values for the type
field:
1
(Click)6
(Sent)11
(Open)12
(Unsubscribe Open)13
(Bounce)14
(Spam Complaint)15
(Email Preference Open)16
(Opt In)17
(Third Party Click)35
(Indirect Unsubscribe Open)36
(Indirect Bounce)37
(Indirect Opt In)
The information in the details
field and the emailId
field give you information about the email activity. If the email is sent as part of a list email, the list ID returns in the listEmailId
field. If the email is created from a template, the template ID returns in the emailTemplateId
field.
type | typeName | details |
---|---|---|
1 (Click) | Email Tracker | URL Clicked |
6 (Sent) | Email Subject | |
15 (Email Preference Open) | - | - |
16 (Opt In) | Email Subject | |
37 (Indirect Opt In) | Email Subject | |
11 (Open) | Email Subject | |
12 (Unsubscribe Open) | Email Subject | |
35 (Indirect Unsubscribe Open) | Email Subject | |
13 (Bounce) | Email Subject | |
36 (Indirect Bounce) | Email Subject | |
14 (Spam Complaint) | Email Subject | |
17 (Third Party Click) | URL |
When a prospect clicks a link in an email, Account Engagement creates an activity with type type
=1
and typeName
= Email Tracker
. The visitor activity representation for this record contains:
- The URL of the link in the
details
field. - The ID of the email in the
emailId
field. - The ID of the list from which the email was sent, in the
listEmailId
field. - The ID of the template used to create the email, in the
emailTemplateId
field.
Account Engagement creates an activity when an opportunity is created, or information on an opportunity changes. A visitor activity representation for opportunity activities contain a field called opportunityId
, which contains the ID of the Salesforce opportunity. Opportunity activities don’t contain a populated details
field. An opportunity activity can have the following values for the type
and typeName
field:
type | typeName |
---|---|
8 (Opportunity Created) | New Opportunity |
9 (Opportunity Won) | Opportunity Won |
10 (Opportunity Lost) | Opportunity Lost |
18 (Opportunity Reopen) | Opportunity Reopen |
19 (Opportunity Linked) | Opportunity Associated |
38 (Opportunity Unlinked) | Opportunity Dissociated |