2 Replies Latest reply on Mar 13, 2013 11:21 PM by bjoern.koth

    CQ5.5 and SiteCatalyst TagManager: creating an overlay for s_code.js

    bjoern.koth

      Hey guys,

       

      I'm currently integrating SiteCatalyst in CQ5.5. In order to keep the SiteCatalyst library independent from our release cycles we try to use the SiteCatalyst TagManager instead. The TagManager replaces the contents of the "s_code,js" to load the library contents from the Adobe CDN instead.

       

      My question is now whether there is a way to overlay the standard s_code.js file with the generated code from the TagManager without actually manipulating the core library contents?

       

      The file is situated in /etc/clientlibs/foundation/sitecatalyst/sitecatalyst/s_code.js . Since it's not a /libs/ path the normal overlay approach of putting the new code into "/apps/path/to/s_code.js" does not work so right now my assumption would be that this would only be feasible with a content package which replaces the original code.

       

      Any ideas?

       

      Cheers from Switzerland,

      Bjoern

        • 1. Re: CQ5.5 and SiteCatalyst TagManager: creating an overlay for s_code.js
          Sham HC Level 7

          Hi Bjoern,

           

              You are right overlay approach does not work for clientlibs.  However for foundation with some trick it will work though there are few drawbacks.

              Taking your example overlay /etc/clientlibs/foundation/sitecatalyst/sitecatalyst as /apps/foundation/sitecatalyst/sitecatalyst .

              Refresh the page there will be two request such as [1]. Since your custom overlayed clientlib called later the changes will persist & work as you expect.

              The drawback is 2 requests Plus if you are hosting other websites changes gets affected to all.  See if below approach works for your case.

           

          [1] 

          <script type="text/javascript" src="/etc/clientlibs/foundation/sitecatalyst/sitecatalyst.js"></script>

          <script type="text/javascript" src="/apps/foundation/sitecatalyst/sitecatalyst.js"></script>

           

          Thanks,

          Sham

          • 2. Re: CQ5.5 and SiteCatalyst TagManager: creating an overlay for s_code.js
            bjoern.koth Level 1

            Thanks Sham,

             

            I guess in this case I'll rather overwrite the default library with the TagManager generated code. Not elegant as well but better than making a redundant resource request.

             

            Cheers,

            Bjoern