2 Replies Latest reply on Apr 6, 2013 5:54 PM by EbodaWill

    CQ_Analytics.record

    EbodaWill Level 1

      As for tracking in CQ5 I am using CQ_Analytics javascript call. I have CQ_Analytics.record in template body.jsp that applies for all pages and have another CQ_Analytics.record at a component level that writes only event and evar.

      1.

      In Body.jsp - writing all traffic variables         

      CQ_Analytics.record({event: 'pageView', values: { section_channel: '<%=makUtil.getProperty(currentPage, "section_channel")%>', subsection1: '<%=makUtil.getProperty(currentPage, "subsection1")%>', subsection2: '<%=makUtil.getProperty(currentPage, "subsection2")%>', subsection3: '<%=makUtil.getProperty(currentPage, "subsection3")%>', subsection4: '<%=makUtil.getProperty(currentPage, "subsection4")%>', locale: '<%=makUtil.getProperty(currentPage, "locale")%>' }, componentPath: '<%=resource.getResourceType()%>'})

      which gets applied on all pages.

       

      1. Another CQ_Analytics.record call at a given component level that is applied only when that particular component is included.

      CQ_Analytics.record({event: 'LeadCompletePref', values: { LeadType: 'Lead Complete' }, componentPath: '<%=resource.getResourceType()%>'})

        

      When I open a page that does not contain this component, the second record call does not kick in and I see all s.prop values set in step 1 in the Adobe Digitalplus debugger

       

      When I open a page that does contain this component, the second record call kicks in and I see the event7 and evar10 but all s.prop values set in step 1 record are not visible in the Adobe Digitalplus debugger  any more. Is my approach correct? Does the second binding in record unbinds the one in step1 so those s.props are not sent to Omniture? In that scenario, how to handle it?