Skip to main content

Visit Listener

The Visit Listener can be used to store channel-specific metrics, such as visit timestamps, the number of visits, first visit date, and average visit time in the profile. This listener differs from the out-of-the-box Global Listener, which handles cross-channel metrics.

The Visit Listener is particularly beneficial for companies with several distinct brands (e.g., publishers and their different publications), as it allows you to track and evaluate visits separately for each brand's website.

The following sections detail how to install the Visit Listener in BlueConic, add it to your individual tenant, and configure it as desired.

Note

This specialized listener was created outside the BlueConic product development team and does not come preinstalled in the BlueConic platform. It is not a fully supported BlueConic plugin.

Installing the Visit Listener

By default, the Visit Listener is not installed in BlueConic. To install it, navigate to BlueConic Settings > Plugins, click the Add plugin button, and register the following external URL:

For more detailed instructions, see What are BlueConic plugins? And if you need further assistance, reach out to your BlueConic Customer Success Manager.

Adding the Visit Listener

  1. With the Visit Listener installed in BlueConic, click Listeners in the main navigation bar at the top.

  2. Click the Add listener button.

  3. In the Add listener window that opens, check the Show all box, then scroll down to the bottom and click the Visit Listener option.

  4. On the Visit Listener page that opens, configure the listener as described in the next section.

  5. When finished, use the toggle at the top to turn the listener on and click the Save button. The listener will then start collecting visit data.

Configuring the Visit Listener

The Visit Listener page contains the following configurations:

  • Where: Define the channels (and specific URLs within these channels) on which you want this listener to be active. By default, the "All pages on all channels" option is selected here, but you can change this to "Limited set of channels (and pages)" and then search for and add the channels you want.
    ​Tip: Make sure you restrict the listener to only the appropriate channel(s).

  • Only Direct Visits: Check this box for the listener to only count direct visits (i.e., visits with no referrer). This box is unchecked by default; when it is checked, metrics will get updated during direct visits only.

  • Visit Timestamp Property: Select the profile property to store the timestamps for each visit.

  • Max. Number of Timestamps: Input the maximum number of timestamps to store in the configured profile property. This value is 10 by default.

  • Number of Visits (ranged) Property: Select the profile property to store the number of visits for the configured number of days. Only the visits for which a timestamp has been persisted in the profile are included.

  • Number of Days: Input the number of days for the system to track the number of visits. This value is 30 by default.

  • Total Number of Visits Property: Select the profile property to store each person's total number of visits.

  • Start Session Property: Select the profile property to store the date and time of the first page view of the most recent visit (i.e., the "start of the session”).

  • Number of Page Views Property: Select the profile property to store each person's page-view total.

  • Number of Page Views (last session) Property: Select the profile property to store each person's visit total in their last session.

  • First Visit Date Property: Select the profile property to store the date of each person's first visit.

  • Last Visit Date Property: Select the profile property to store the date of each person's last visit.

  • Average Visit Time Property (minutes): Select the profile property (of data type: number) to store each person's average visit time in minutes.

  • Total Visit Time Property (minutes): Select the profile property (of data type: number) to store each person's total visit time in minutes.

How visit metrics are updated

The Visit Listener runs in the visitor’s browser. It writes profile properties only when a new visit starts (a new session, after 30 minutes of inactivity). There is no background or daily job that rewrites these values for people who do not return.
​

That applies to all metrics this listener stores, including visit timestamps, total visits, last visit date, and Number of Visits (ranged).
​

Number of Visits (ranged) is a snapshot: at the start of a visit, the listener counts how many stored visit timestamps fall within the Number of days window and writes that count. The number does not keep decreasing as calendar time passes. If the person does not come back, the last written value stays on the profile even after those visits fall outside the window.
​

The Number of days setting is used only at that moment. It does not continuously remove old timestamps from the Visit Timestamp property. Old timestamps stay until Max. Number of Timestamps is exceeded (newest timestamps are kept).
​

When the person returns, the listener recounts from that moment. The current visit is always inside the window, so a dormant profile typically becomes 1, not 0. The ranged property will not drop to 0 on its own.

How each count is calculated

Every count this listener writes comes from data it stored on that profile. Nothing is filled in for visits that happened before the listener was turned on.

At the start of a visit, the listener counts how many dates in Visit Timestamp Property fall inside Number of Days, and writes that number. The count cannot be higher than Max. Number of Timestamps, because dates beyond that cap are dropped and only the newest ones are kept. The default cap is 10, so a 30-day or 90-day count stays at 10 or below until you raise the cap.

The ranged number is rewritten only when a new visit starts. It does not tick down each day while the person is away. The last number stays on the profile until they come back.

The sharp drop happens on that next visit. The listener counts again from the dates it still has. Dates older than Number of Days are left out, and dates already dropped by the cap are gone. A profile that showed 10 can come back as 1. That is the window moving forward, not a daily decay job.

Total Number of Visits: Adds 1 at the start of each new visit on the channels in Where. It does not reset when dates age out.

Number of Page Views and Number of Page Views (last session): Page views add up during the visit. The last-session figure is replaced when the next visit starts.

First Visit Date and Last Visit Date: First visit is kept. Last visit is replaced at the start of each new visit.

Average Visit Time and Total Visit Time: Updated from the length of visits this listener has seen since it was turned on. They are not rebuilt from history before that.

Count visits to one path in the last N days

Use one Visit Listener for that path. A timeline rollup on the system pageview event cannot do this: those events store the referrer and the BlueConic items that ran on the page, not the page path.

  1. Open Listeners, choose Add listener, enable Show all, and select Visit Listener.

  2. Under Where, choose Limited set of channels (and pages) and set the page rule to the path.

  3. Leave Only Direct Visits unchecked, unless you only want visits with no referrer.

  4. Set Visit Timestamp Property to a profile property that can hold more than one date.

  5. Set Max. Number of Timestamps to at least N. If N is 90 and this stays at the default of 10, the 90-day count cannot go above 10.

  6. Set Number of Visits (ranged) Property to the number property you will use in segments, and set Number of Days to N.

  7. Turn the listener on and click Save.

To check it, open that path in a private window, end the visit, then open the same path again. On that profile, the ranged property should be 1 or higher. Visits from before the listener was on are not added later.

For a longer choice between this setup, a Behavior Listener timestamp, and a timeline rollup, see Measuring visits and engagement over time windows.

Mobile apps

On an iOS or Android channel, this listener runs inside the BlueConic SDK that is compiled into the app. A fix to that logic reaches people only after a new SDK is in an app release. Data collected while the app is offline is sent on a later open, so a profile can update after the visit you are looking at. See Listeners in mobile apps (iOS / Android SDK).

Privacy management

Listeners can be added to Objectives, allowing for privacy management of the information that is being picked up. The listener will only update a profile if the visitor consented to at least one of the objectives that it is linked to.

Did this answer your question?