Fired when a profile makes its first request to a website since at least 24 hours after their previous visit. The event is queued from the request-handling path and raised asynchronously once the visit has been recorded, with event id "userVisit". Automations and funnel goals listen for this event to trigger visit-based rules, and it exposes the visited path, the request cookies and a rolling count of daily visits made this week.

Group: Journeys

Implements: TriggerEvent, FunnelEvent


Properties

PropertyReturnsDescription
attributesMap<String,Object>Extra attributes attached to this event. Always an empty, mutable map for this event since none are populated when it is constructed.
cookiesMap<String,String>The cookies that were sent with the request that raised this event, keyed by cookie name.
eventIdStringThe persistence-friendly identifier for this event type, always "userVisit".
leadProfileProfileThe profile associated with this event for lead-tracking purposes. Always the same profile returned by getSourceProfile.
numDailyVisitsThisWeekintCounts how many distinct days the visiting profile has accessed the website so far this week, from the start of the current week up to now. Queries the access log on each call, so treat it as an expensive lookup rather than a cached value.
relatedLeadLeadThe lead already associated with this event, if any. Always null for a visit event since visits are not tied to an existing lead.
sourceProfileProfileThe profile whose visit raised this event.
triggerItem1StringThe trigger key value used to match this event against automations, set to the id of the visited website.
triggerItem2StringThe trigger key value used to match this event against automations, set to the path that was requested.
triggerItem3StringUnused trigger key for this event.
triggerItem4StringUnused trigger key for this event.
triggerItem5StringUnused trigger key for this event.
websiteWebsiteThe website the profile visited to raise this event.

Inherited from TriggerEvent

Properties

PropertyReturnsDescription
serialisablebooleanWhether this event's attributes were built to survive being persisted, ie every value is a plain serialisable value rather than a persistent entity or some other object that only makes sense inside the firing transaction. Only the firing app can know this, so it declares it - see EventBuilder. An agent that subscribes to an event does not run when it fires. The event is written to storage as JSON, buffered with others, and read back minutes later in a different session, so a value that cannot be written and read back is not merely awkward, it breaks the whole delivery. The agent framework therefore ignores any event which does not say yes here.

Methods

isSerialisable()

Returns: boolean

Whether this event's attributes were built to survive being persisted, ie every value is a plain serialisable value rather than a persistent entity or some other object that only makes sense inside the firing transaction. Only the firing app can know this, so it declares it - see EventBuilder. An agent that subscribes to an event does not run when it fires. The event is written to storage as JSON, buffered with others, and read back minutes later in a different session, so a value that cannot be written and read back is not merely awkward, it breaks the whole delivery. The agent framework therefore ignores any event which does not say yes here.


Methods

toProps() · getEventId() · getWebsite() · getSourceProfile() · getTriggerItem1() · getTriggerItem2() · getTriggerItem3() · getTriggerItem4() · getTriggerItem5() · getAttributes() · getNumDailyVisitsThisWeek() · dailyVisits(Date from, Date to) · getCookies() · getLeadProfile() · getRelatedLead()

toProps()

Returns: Map<String,Serializable>

Builds the serialisable property map used to describe this event to automations and external systems such as LLMs. Extends the base event properties with the visited path and a URN reference to the website.

getEventId()

Returns: String

The persistence-friendly identifier for this event type, always "userVisit".

getWebsite()

Returns: Website

The website the profile visited to raise this event.

getSourceProfile()

Returns: Profile

The profile whose visit raised this event.

getTriggerItem1()

Returns: String

The trigger key value used to match this event against automations, set to the id of the visited website.

getTriggerItem2()

Returns: String

The trigger key value used to match this event against automations, set to the path that was requested.

getTriggerItem3()

Returns: String

Unused trigger key for this event.

getTriggerItem4()

Returns: String

Unused trigger key for this event.

getTriggerItem5()

Returns: String

Unused trigger key for this event.

getAttributes()

Returns: Map<String,Object>

Extra attributes attached to this event. Always an empty, mutable map for this event since none are populated when it is constructed.

getNumDailyVisitsThisWeek()

Returns: int

Counts how many distinct days the visiting profile has accessed the website so far this week, from the start of the current week up to now. Queries the access log on each call, so treat it as an expensive lookup rather than a cached value.

dailyVisits(Date from, Date to)

Returns: List<DayStat>

Looks up the visiting profile's per-day visit counts for the website over the given date range. Queries the access log on each call.

ParameterDescription
fromthe start of the date range to count visits from, inclusive
tothe end of the date range to count visits to, inclusive

getCookies()

Returns: Map<String,String>

The cookies that were sent with the request that raised this event, keyed by cookie name.

getLeadProfile()

Returns: Profile

The profile associated with this event for lead-tracking purposes. Always the same profile returned by getSourceProfile.

getRelatedLead()

Returns: Lead

The lead already associated with this event, if any. Always null for a visit event since visits are not tied to an existing lead.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.