HubSpot Personalization: Counting Rolling Page Views for Smarter Emails
Ever wish you could send an email that says, "Hey, we noticed you visited 14 pages on our site in the last 7 days! Here's more of what you love"? That's the dream for many marketers looking to hyper-personalize their outreach. For those of us running stores or managing content, understanding recent engagement is gold. But as a recent HubSpot Community discussion revealed, turning that dream into a reality within HubSpot isn't always as straightforward as it seems.
We recently dived into a fascinating thread titled "Personalize a marketing email with website pages visited during the last x days" on the HubSpot Community. The original poster, supporting a non-profit publisher, had a clear goal: leverage HubSpot's tracking code on their external news website to personalize marketing emails. Specifically, they wanted to know the rolling count of pages visited by a contact over the past 3, 7, and 28 days. HubSpot clearly tracks individual page views, as shown in their example:
The challenge was transforming this granular data into a dynamic personalization token like "Over the past 7 days you have visited 14 pages on our website." Sounds like a common use case, right? You'd think HubSpot, with its robust CRM and marketing automation, would have an out-of-the-box solution.
The HubSpot Community Weighs In: A Puzzle Without a Perfect Piece
The initial responses confirmed the original poster's suspicion: there isn't a direct, native personalization token for rolling page view counts. A senior community moderator acknowledged the difficulty and reached out to several HubSpot experts for their insights, highlighting just how complex this seemingly simple request can be.
The Workflow & Custom Property Attempt
One community member proposed a clever workaround involving custom contact properties and workflows. The idea was to:
- Create three custom number properties on the contact record: "Pages visited last 3 days", "Pages visited last 7 days", and "Pages visited last 28 days". These would eventually become the personalization tokens.
- Build a daily workflow that re-enrolls all contacts. This workflow would then theoretically update these custom properties.
The proposed mechanism for updating the properties involved using a "Set property value" action combined with lists that filter contacts by page views within specific date ranges. The thought was that the list would segment the contacts, and the workflow would then write a value to the custom property, updating it daily.
However, another expert quickly pointed out a critical flaw in this approach. While HubSpot offers filters for date ranges and for the number of times a page is viewed, these are often mutually exclusive when trying to count specific events within a rolling date window directly into a custom property via a standard workflow action. In simpler terms, you can easily segment contacts who visited any page in the last 7 days, or contacts who visited a specific page X times, but getting a total count of all pages visited by a single contact within a rolling 7-day window and writing that number to a property is where the native capabilities hit a wall.
The Developer's Route: Serverless Functions
Another community expert chimed in, suggesting that this kind of advanced data manipulation likely requires a combination of custom properties and serverless functions. This solution, while powerful, pushes beyond standard HubSpot configuration and into the realm of custom development. It's a job for a technical strategist or a developer, capable of writing code that can query HubSpot's data (or an external data source), perform the rolling calculations, and then push those calculated values back into custom HubSpot properties via API. This confirms that for truly sophisticated, real-time, or rolling calculations, native HubSpot often needs a helping hand from custom code.
The original poster expressed understandable frustration, noting that such rolling counts could easily be expressed in a SQL statement and seemed like a common marketing requirement. It highlights a recurring theme for many HubSpot users: the platform is incredibly powerful, but some advanced use cases necessitate creative workarounds or custom development.
ESHOPMAN Team Comment
This discussion perfectly illustrates a common challenge for e-commerce marketers and RevOps professionals using HubSpot. While HubSpot is a fantastic CRM and marketing platform, its native analytical capabilities for rolling, aggregate event data into personalizable properties can be limited. We believe that for sophisticated e-commerce operations, relying solely on native HubSpot for these kinds of deep, real-time insights can be a bottleneck. This is precisely why integrations and specialized tools become so valuable. For an online ecommerce website builder that integrates deeply with HubSpot, the ability to pull and use this kind of behavioral data is crucial for truly personalized experiences.
What Can Marketers Do?
So, if you're facing a similar challenge, what are your options? While a direct, native "rolling page view count" token might not exist, you can still get creative:
- Segment, Don't Count (Natively): You can still build lists and workflows to segment contacts based on whether they visited any page or specific high-value pages in the last X days. For example, "Contacts who visited our product pages in the last 7 days." This allows for targeted emails even if you can't state the exact page count.
- Focus on Key Actions: Instead of a generic page count, identify key conversion pages or content pillars. You can then use workflow enrollment triggers based on visits to these specific pages within a timeframe, and use that to trigger personalized follow-ups.
- Consider Integrations & Custom Development: For the most precise and dynamic personalization, the developer's route using serverless functions or integrating with a data warehouse that can perform these calculations and push them back to HubSpot is the most robust solution. This might be a bigger investment, but it unlocks a new level of personalization power.
- Leverage ESHOPMAN Data: If your store is built with ESHOPMAN, you're already benefiting from a deeply integrated storefront within HubSpot. This means your e-commerce data (product views, cart activity, purchase history) is inherently linked to your HubSpot contacts, often providing richer, more actionable behavioral data than general page views alone.
The HubSpot Community continues to be an invaluable resource for navigating these challenges, showcasing the ingenuity of marketers and developers alike. While HubSpot is constantly evolving, sometimes the most impactful personalization requires a bit of extra strategic thinking, or a helpful integration, to bridge the gap between powerful data and actionable marketing.