EmailCampaignEvents
Fetches event-level data related to email campaigns, allowing detailed tracking of recipient interactions.
Table Specific Information
Email campaign events represent individual events that occurred during an email campaign. These are generally events such as a contact clicking on a link that was included in the email.
SELECT
Email campaign events may be filtered by RecipientEmail, AppId, CampaignId, Type, and CreatedAt. Email campaign events can also be retrieved one at a time by specifying both the Id and CreatedAt, but the CreatedAt datetime will need to be correct to the millisecond. For example:
SELECT * FROM EmailCampaignEvents WHERE CreatedAt = '9/23/2014 5:28:00.280 PM' AND Id = '123456789' SELECT * FROM EmailCampaignEvents WHERE CampaignId = '14229773' AND AppId = '113' AND Type = 'CLICK' AND CreatedAt > '9/23/2014 1:28:00 PM' AND CreatedAt < '9/23/2014 7:29:00 PM'
Columns
| Name | Type | References | Description |
| Id [KEY] | String | Unique identifier assigned to the email campaign event. | |
| CampaignId | String | Identifier of the email campaign associated with this event. | |
| Type | String | Specifies the type of event, such as open, click, bounce, or unsubscribe.
The allowed values are SENT, DROPPED, PROCESSED, DELIVERED, DEFERRED, BOUNCE, OPEN, CLICK, PRINT, FORWARD, STATUSCHANGE, SPAMREPORT. | |
| RecipientEmail | String | Email address of the recipient involved in the event. | |
| PortalId | Long | Unique identifier of the HubSpot account (portal) that sent the email. | |
| AppId | Long | Identifier of the HubSpot application used to send the email message. | |
| AppName | String | Name of the HubSpot application responsible for sending the email message. Can change over time. | |
| CreatedAt | Datetime | Timestamp indicating when this event was created. | |
| SentById | String | Unique identifier of the SENT event that corresponds to the email message. | |
| SentByCreatedAt | Datetime | Timestamp when the email message's SENT event occurred. | |
| ObsoletedById | String | Unique identifier of the follow-up event that made this current event obsolete. | |
| ObsoletedByCreatedAt | Datetime | Timestamp when the event that obsoleted the current event occurred. | |
| CausedById | String | Unique identifier of the event that directly caused this event. | |
| CausedByCreatedAt | Datetime | Timestamp when the event that caused this event occurred. | |
| Subject | String | Subject line of the email message. | |
| From | String | Email address in the 'from' field of the email message. | |
| ReplyTo | String | Email address in the 'reply-to' field of the email message. | |
| Cc | String | List of email addresses in the 'cc' field of the email message. | |
| Bcc | String | List of email addresses in the 'bcc' field of the email message. | |
| DropReason | String | Reason explaining why the email message was dropped.
The allowed values are PREVIOUSLY_BOUNCED, PREVIOUS_SPAM, PREVIOUSLY_UNSUBSCRIBED_MESSAGE, PREVIOUSLY_UNSUBSCRIBED_PORTAL, INVALID_TO_ADDRESS, INVALID_FROM_ADDRESS, BLOCKED_DOMAIN, BLOCKED_ADDRESS, EMAIL_UNCONFIRMED, CAMPAIGN_CANCELLED, MTA_IGNORE, PORTAL_OVER_LIMIT, PORTAL_SUSPENDED. | |
| DropMessage | String | Detailed message providing additional information on why the email message was dropped. | |
| Category | String | Category describing the type of bounce encountered. Might be empty if undetermined.
The allowed values are UNKNOWN_USER, MAILBOX_FULL, CONTENT, SPAM, POLICY, GREYLISTING, MAILBOX_MISCONFIGURATION, ISP_MISCONFIGURATION, DOMAIN_REPUTATION, DMARC, SENDING_DOMAIN_MISCONFIGURATION, TIMEOUT, THROTTLED, UNCATEGORIZED, IP_REPUTATION, DNS_FAILURE, TEMPORARY_PROBLEM. | |
| Response | String | Full response message received from the recipient's email server. | |
| SmtpId | String | SMTP identifier attached to the message by HubSpot. | |
| Attempt | Integer | The attempt number indicating how many times delivery was attempted. | |
| Status | String | Status code returned by the recipient's email server. | |
| DeviceType | String | Type of device used that triggered the event, if available. | |
| HMID | String | Randomly generated identifier matching the 'X-HubSpot-MID' header in the email. | |
| Referer | String | URL of the webpage that linked to the clicked URL. Value depends on recipient's email client. | |
| Url | String | The URL clicked by the recipient within the email message. | |
| UserAgent | String | User agent string responsible for the event. | |
| BrowserFamily | String | Browser family used when the event occurred. | |
| BrowserName | String | Name of the browser used during the event. | |
| BrowserProducer | String | Producer of the browser used during the event. | |
| BrowserProducerUrl | String | URL of the browser producer, if available. | |
| BrowserType | String | Type of browser used during the event. | |
| BrowserUrl | String | URL to a description of the browser, if available. | |
| BrowserVersion | String | Version of the browser used during the event. | |
| LocationCity | String | City where the event occurred. | |
| LocationCountry | String | Country where the event occurred. | |
| LocationState | String | State where the event occurred. | |
| FilteredEvent | Boolean | Boolean flag indicating whether the event was filtered out of reporting based on customer settings. | |
| Source | String | Source of the subscription change event.
The allowed values are SOURCE_LIST_UNSUBSCRIBE, SOURCE_RECIPIENT, SOURCE_IMPORT, SOURCE_HUBSPOT_CUSTOMER, SOURCE_SPAM_REPORT, SOURCE_NON_DELIVERY_REPORT, SOURCE_DIRECT_COMPLAINT, SOURCE_MTA_RECORD, SOURCE_HUBSPOT, SOURCE_MIGRATION, SOURCE_HUBSPOT_CLEANUP, SOURCE_KNOWN_SPAM_TRAP. | |
| RequestedBy | String | Email address of the person requesting the subscription change on behalf of the recipient. | |
| Subscriptions | String | Status of subscriptions associated with the recipient. | |
| PortalSubscriptionStatus | String | Recipient's subscription status within the HubSpot portal.
The allowed values are SUBSCRIBED, UNSUBSCRIBED. | |
| ExtraUrlParameters | String | Optional input-only property for specifying additional query parameters. Format: 'param1=value1, param2=value2, param3=value3'. |