Search code examples
adobeanalyticssegmentadobe-analytics

Using segments to compartmentalize custom link clicks within a specific site section in Adobe Analytics - formerly Omniture SiteCatalyst


Background

My group recently set up several custom links, using an onclick handler with the s.tl function, on a particular page (we'll call it page A) in our website. Functionality was validated via Fiddler, Clickstream Data Feed and in Reports and Analytics.

Problem

I thought I could set up a segment which would compartmentalize the above links in the Custom Link report, based on the fact that they only exist on page A; however, when I create my segment I get the dreaded "No data match these criteria. Please verify the segment, metrics, date range and filters." message in my report. My segment logic is as follows:

Visit [Exclude]

--Page "does not include" page A

Thoughts on why this isn't working or what I can do to solve my problem using segments?

Cheers,

Art

linkedin/in/arthurlwebb


Solution

  • If you don't use s.linkTrackVars, s.tl won't associate other variables to those clicks. I normally handle that situation with a custom function

    function customFunc(){
      s.linkTrackVars = 'pageName';
      s.tl(this,'o','Change Readiness Focusing CM | Text Link | Change Management Main Page');
    }
    

    Then use customFunc() in the onclick handler. If you have other variables you need to track as the requirements, you can add those to the linkTrackVars string also and set the vars within the function.

    function customFunc(){
      s.linkTrackVars = 'pageName,evar1,events';
      s.events = s.linkTrackEvents = "event1";
      s.eVar1 = "test click";
      s.tl(this,'o','Change Readiness Focusing CM | Text Link | Change Management Main Page');
    }
    

    Using that method, you can get creative and pass the element into the function and make use of data attributes, element text etc and make the tracking a little more programatic.