1 Reply Latest reply: Apr 5, 2012 7:17 AM by James Nicholas RSS

Need to add SmartSource Data Collector into Drupal CMS

Newbie

Hi,

 

I have webtrend.js which I already configured with my Drupal CMS theme .info file

 

Now I need to add below code on every page of my Drupal CMS. Where I have to put this? Please help me

 

<!--START OF SmartSource Data Collector TAG -->

<!--Copyright (c) 1996-2009 WebTrends Inc. All rights reserved. -->

<!--Version: 8.6.2 -->

<!--Tag Builder Version: 3.0 -->

<scriptsrc="bcwebtrends.js"type="text/javascript"></script>

<!--------------------------------------------------------------------------------------->

<!--Warning: The two script blocks below must remain inline. Moving themto an external -->

<!--JavaScript include file can cause serious problems with cross-domaintracking. -->

<!--------------------------------------------------------------------------------------->

<scripttype="text/javascript">

//<![CDATA[

var_tag=new WebTrends();

_tag.fpcdom=".fursa.britishcouncil.org";

_tag.dcsGetId();

//]]>>

</script>

<scripttype="text/javascript">

//<![CDATA[

//Add custom parameters here.

//_tag.DCSext.param_name=param_value;

_tag.WT.sp="uaebcfursa";

_tag.dcsCollect();

//]]>>

</script>

<noscript>

<div><imgalt="DCSIMG" id="DCSIMG" width="1"height="1"src="http://statse.webtrendslive.com/dcsozkqgb00000sh0y1unaabw_9e3r/njs.gif?dcsuri=/nojavascript&WT.js=No&WT.tv=8.6.2"/></div>

</noscript>

<!--END OF SmartSource Data Collector TAG -->

 

Message was edited by: Muhammad Shaji Uddin

  • Need to add SmartSource Data Collector into Drupal CMS
    James Nicholas Newbie

    When I have done this in the past, I used the following steps to add the Drupal tag to my theme. Keep in mind that if you use multiple themes, you will need to apply this to each. Since it is possible to apply a separate theme to the Administration section, this gives the customer the added bonus of not having to track the administrator.

     

    1. Go to http://tagbuilder.webtrends.com to build the tag. After selecting "Build Tag," in the "Javascript Folder Name:" field enter the path "/sites/all/libraries/webtrends/".

     

    3. Save the tag, then extract its contents.

     

    4. Copy the webtrends.js file to the "/sites/all/libraries/webtrends/" of your site, creating it if it doesn't already exist.

     

    5. Use a text editor to open the main template file for each theme ("page.tpl.php" by default) and webtrends.html (extracted from the Tag Builder archive).

     

    6. Copy the contents of webtrends.html and paste it above the </html> tag in the theme's template file.

     

    7. Save the template and close both files.

     

    8. Repeat steps 6 and 7 for each theme.

     

    The theme should now be functioning and the you'll want to test it as you would any other site. Also, I haven't tested this with the async tag, but in theory it should work the same with the exception that you'll likely want to add it right above the page-wrapper div or use drupal_add_js to add the webtrends.load.js file. Again, I haven't tested adding the async tag.

     

    Thanks,

     

    James