Adobe Launch Page View Count Condition to Fire Tag

session_page_view_count_adobe_launch_rule_condition

You are given a 3rd party pixel tag from Facebook or Google and asked to fire the tags when the visitor has viewed 3 pages. Or you have an email capture overlay and you don’t want to distract your visitor when they land on your site on the first page view. Adobe Launch has built in functionality to track the session page view count and let’s you fire a tag when the visitor has 3 page views (or how every many page views you want).

Adobe Launch Rule Condition 3 Page Views

Within your Launch Rule choose Logic Type = Regular; Extension = Core; Condition Type= Page Views. Then choose The user’s number of page views is equal to the value of 3 Current Session. Then add your 3rd party tags to the Actions section of the rule and voilĂ  your 3rd party tags will fire when your visitor hits 3 page views in their current session.

Adobe Launch Data Element Session Page View Count

If you also want to capture the session page view count, lifetime page view count (total number of page views for a visitor), or session count (total number of sessions for a visitor) you can set up one or multiple Launch data elements.
Add a New Data Element; Enter a Name i.e. pageViewCount; choose Extension = Core; Data Element Type = Visitor Behavior. For our example of page views in a session you select the Attribute = Session Page View Count.
session_page_view_count_adobe_launch_data_element

If you’ve named your data element pageViewCount you can view it in your browser console or use it in your Launch custom code:
_satellite.getVar("pageViewCount")

Adobe Launch Visitor Tracking in Local Storage

A bonus of enabling at least of of the Visitor Behavior data elements in Adobe Launch is that the visitor tracking module is included in your Launch library build and stores the values of the visitor behavior attributes. So if in a few months you want to store the session count for a visitor or the lifetime count of page views for a visitor in Adobe Analytics in prop or eVar it is there for you in localStorage.

If you type localStorage into your browser you can see the variables com.adobe.reactor.core.visitorTracking  or get a specific value of one of the variables like the visitor session count by typing this into your browser console: localStorage.getItem("com.adobe.reactor.core.visitorTracking.sessionCount")

Should you Include Visitor Tracking in Your Launch Library Today?

If your Launch Library isn’t bloated with rules and data elements this seems like a no brainier. Go ahead and implement at least one for Visitor Behavior types of data elements if you think you may have a use for this kind of persistent visitor behavior metrics in your Adobe Analytics data or as conditions to trigger other tags in the future. You can see more discussion on this from Adobe Product Manager Aaron Hardy on Jim Gordon’s blog.

You could also set the count of page views in a session in a cookie, but it is nice to not have to set another cookie and have the option to use the existing Adobe Launch functionality.