6 Replies Latest reply: Apr 27, 2012 2:27 PM by DORA BABU KOTTHRU RSS

New Async Tag Questions

Johnny Mitchell Newbie

Hello

 

Couple of questions in regards to the new Async tag.

 

  1. Am I correct in presuming the minified JS file is always the same and never changes? I am thinking on certain sites within my company that are all run of the same CMS, to just upload the one JS file and use the specific inline html on the individual sites.
    1. Additionaly if this is the case, why not offer a js file that is hosted at webtrends?
  2. In tag builder, Domain divert is no longer available? This was quite handy for me with some of my sites that change domains for purchases, and i could just create the one tag. Can this still be used? What are the customisations to do?

 

Cheers

 

John

  • New Async Tag Questions
    Paul Lawbaugh Novice

    Hi, thanks for the questions.

     

    1.  Yes, the tag is never changed because all the config options have been moved out into either the html block or you can create a "loader" JS and make the code in your pages a single line.

     

    We are currently investigating the hosted option.  There are things to consider like what happens when it is changed... do we version the tag, do we notify customers, etc.? 

     

    That said, we are already hosting our JS for the Webtrends Heatmaps, Webtrends Ads and Facebook plugins to the new tag so there isn't a technical limitation.  We're just following a rigorous process to understand all our customers needs naturally. 

     

    2. You can use the same tag on multiple domains.  The only thing the domain is really useful for is using the same cookie for the visitor ID (i.e. the Id stored in the same first party cookie crumb that both domains can read).

     

    I'll look into other thoughts on the domain question internally here.  BTW, if you were previously doing the "dual tagging" thing in the past, I believe there is a new help topic up on the docs for the tag for this.  It's pretty easy to do.

    • Re: New Async Tag Questions
      Johnny Mitchell Newbie

      Thank you for the reply Paul

       

      i didnt have much luck finding a help article, but wanted to run this past you.

       

      I need to do the dual tagging as I want to maintain the visitor ID when a user navigates into our booking process,

       

      so in the js file for the v9 tag it looks like this

       

      function WebTrends(){
                var that=this;
                // begin: user modifiable
                this.dcsid=(function(){var domlist="123.co.uk";var doms=that.dcsSplit(domlist);var dlen=doms.length;var host=window.location.hostname.toLowerCase();for (var i=0;i<dlen;i++){if (host==doms[i]){return("dcs4xnpt6vz5bdye9ju58axxx_xxxx");}}return("dcsve4ymuvz5bdasfudke9xxx_xxxx");})();
                this.domain="statse.webtrendslive.com";
                this.timezone=0;
                this.fpcdom=".abc.com";
                this.onsitedoms="abc.com, 123.co.uk";
                this.downloadtypes="xls,doc,pdf,txt,csv,zip,docx,xlsx,ics";
                this.navigationtag="div,table";
                this.trackevents=true;
                this.trimoffsiteparams=true;
                this.enabled=true;
                this.i18n=false;
                this.fpc="WT_FPC";
                this.paidsearchparams="gclid";
                this.splitvalue="";
                this.preserve=true;
      
      

       

      To edit this for the async tag will this work?

       

      <!-- START OF SmartSource Data Collector TAG v10.2.0 -->
      <!-- Copyright (c) 2012 Webtrends Inc.  All rights reserved. -->
      <script>
      window.webtrendsAsyncInit=function(){
          var dcs=new Webtrends.dcs().init({
              dcsid:(function(){var domlist:"123.co.uk",var doms:that.dcsSplit(domlist),var dlen:doms.length,var host:window.location.hostname.toLowerCase(),for (var i:0,i<dlen,i++){if (host::doms[i]){return("dcs4xnpt6vz5bdye9ju58axxx_xxxx"),}}return("dcsve4ymuvz5bdasfudke9xxx_xxxx"),})(),
              ,domain:"statse.webtrendslive.com"
              ,timezone:0
              ,offsite:true
              ,download:true
              ,downloadtypes:"xls,doc,pdf,txt,csv,zip,docx,xlsx,rar,gzip"
              ,onsitedoms:"abc.com, 123.co.uk"
              ,plugins:{
                  hm:{src:"//s.webtrends.com/js/webtrends.hm.js"}
              }
              }).track();
      };
      (function(){
          var s=document.createElement("script"); s.async=true; s.src="/scripts/webtrends.min.js";    
          var s2=document.getElementsByTagName("script")[0]; s2.parentNode.insertBefore(s,s2);
      }());
      </script>
      <noscript><img alt="dcsimg" id="dcsimg" width="1" height="1" src="//statse.webtrendslive.com/dcsc399cuvz5bd7wwers2rxxx_xxxx/njs.gif?dcsuri=/nojavascript&amp;WT.js=No&amp;WT.tv=10.2.0&amp;dcssip=www.abc.com"/></noscript>
      <!-- END OF SmartSource Data Collector TAG v10.2.0 -->
      
      

       

      Does this.fpcdom=".abc.com"; not matter anymore?

       

      Hope you can help

      • Re: New Async Tag Questions
        Paul Lawbaugh Novice

        Before you jump down that path let me note that we have a method for dual tagging already without any special code insertion. 

         

        We're writing it up for a help doc now but here are the details:

         

        Two scenarios:

        Scenario #1:  You want to send data to two DCSID’s


         

                   <script type="text/javascript">
                         // Async Loader function, called bywebtrends.js after load
                         window.webtrendsAsyncInit = function() {
                               var dcs1=new Webtrends.dcs().init({
                                   dcsid:"dcsxxxxxxxxxxxxxxxxxxx_xxxx"
                                   ,timezone:-5
            ,fpc:"WT_FPC1"
                               });
        
                               var dcs2=new Webtrends.dcs().init({
                                   dcsid:"dcsyyyyyyyyyyyyyyyyyyyy_yyyy"
                                   ,timezone:-2
                                   ,fpc:"WT_FPC2"
                               });
                               dcs1.track();
                               dcs2.track();
                         };
        
                         ( function() {
                               var s = document.createElement('script'); s.async = true; s.type = "text/javascript";
                               s.src = "scripts/webtrends.js";
                               var s2 = document.getElementsByTagName("script")[0];
                               s2.parentNode.insertBefore(s, s2);
                         }());
        
                   </script>        
        
        

         

         

        Scenario #2:  You want to senddata to their local SDC and to our WTOD.  Same DCSID or different doesn’t matter.

         

         

                  <script type="text/javascript">
                         // Async Loader function, called bywebtrends.js after load
                         window.webtrendsAsyncInit = function() {
                               var dcs1=new Webtrends.dcs().init({
                                   dcsid:"dcsxxxxxxxxxxxxxxxxxxx_xxxx"
            ,timezone:-5
                                   ,domain:"statse.webtrendslive.com"
            ,fpc:"WT_FPC1"
                               });
        
                               var dcs2=new Webtrends.dcs().init({
                                   dcsid:"dcsyyyyyyyyyyyyyyyyyyy_yyyy"
                                   ,timezone:-5
                                   ,domain:"sdc.my-domain.com"
                                   ,fpc:"WT_FPC2"
                               });
                               dcs1.track();
                               dcs2.track();
                         };
        
                         ( function() {
                               var s = document.createElement('script'); s.async = true; s.type = "text/javascript";
                               s.src = "scripts/webtrends.js";
                               var s2 = document.getElementsByTagName("script")[0];
                               s2.parentNode.insertBefore(s, s2);
                         }());
        
                   </script>  
        
        
        • Re: New Async Tag Questions
          Johnny Mitchell Newbie

          Thank you again Paul,

           

          I'm not sure either of these fit my requirements, but I might have read the code wrong.

           

          Basically I have a domain,

           

          abc.com

           

          whenever a user goes to booking section of this site they are moved to a completely different domain.

           

          123.com

           

          In a user journey perspective we want to treat this journey as part of the same site and track the visit.

           

          In the past I have tracked each domain seperatly and just added both data sources to a profile in Webtrends and selected roll up sessions. (as per instructions from a support call)

           

          However some of my sites are not developed in house, so using this domain divert go me the ability to provide one tag, which would switch out the DCSID based on the domain.

           

          I could then still add both data sources into the one profile and report as normal.

           

          Does that make sense? That is why i thought to copy the v9 tag method and apply it to the v10 tag.

           

          Sorry for all the questions, but really appriciate your help.

           

          Cheers

           

          John

          • New Async Tag Questions
            Paul Lawbaugh Novice

            There is nothing wrong with trying the sync the way you are (though the code looks difficult to interpret if it would even work).  Go ahead and try it and tell us how it works.

             

            But we also have created JS plugins for the new 10.2 tag to perform this purpose as well.  These plugins are designed to sync up the visitor ID and session across domains (without having to use cookies).

             

             

            There are two plugins:

            One that will append the visitor ID and session info to any outbound links (to specified domains that you configure).

            The other plugin listens for these parameters and will overwrite the current Webtrends cookie ID on this domain to make it match the ID from the sending domain (there is also a configuration where you specify which domains to trust).

             

             

            Plugins are here.

            https://developer.webtrends.com/docs/DOC-1245

             

             

            Please note the plugins are community supported/owned so tech support won't be able to walk you through these if you have questions or customization needs.  Our pro services might be able to help you though.

      • New Async Tag Questions
        DORA BABU KOTTHRU Newbie

        Hi Paul,

         

        Our application was build on BPM tool , I was included as suggeted in this discussion thread

         

        looks like request is not going to webtrends server.

         

        Just info to help : old version (9.0) , below line last stage in the tag version.

        <noscript><img alt="dcsimg" id="dcsimg" width="1" height="1" src="http://statse.webtrendslive.com/dcs7kg05suz5bd2iusbd4bvkg_6c1c/njs.gif?dcsuri=/nojavascript&WT.js=No&WT.tv=10.2.0&dcssip=www.biefarmersinsurance.com"/></noscript>

         

        Any idea when we include following snippet , what is the JavaScript method invoked ? so that i can put alerts to find the issue.

        <script type="text/javascript" src="webtrendsload.js"></script>