USASearch

How to Add JavaScript for Your Third Party Web Services

Do you want your search results page to run web services such as 4Q, AddThis, Foresee, Google Analytics, Omniture, or WebTrends?

Log in to the Admin Center and select the option, Third Party Tracking. Input the JavaScript code you’d like to call from your search results page. Click submit to send us your request. We’ll input your code for you and send you an email to confirm that we’ve done it.

Google Analytics tip: In your Google Analytics JavaScript, be sure to set your domain if you’ve requested domain masking and you want to include your search subdomain (e.g., search.commerce.gov) with your main domain (e.g., commerce.gov).

_gaq.push([‘_setDomainName’, ‘commerce.gov’]);

For more information, read Google’s tip, Tracking Multiple Domains.

ForeSee tip: Coordinate with your ForeSee representative and USASearch to implement your customer satisfaction survey on your results page. The four general steps follow.

  1. Email USASearch to set up a CNAME for search.{yourdomain}.gov.
  2. Update the files path in your Foresee code to use an absolute path instead of a relative path.

    Find => ‘files’: ‘/fsrscripts/’,

    and replace it with => ‘files’: ‘//{yourdomain}/fsrscripts/’,

    in the following five files.
    a. foresee-trigger.js
    b. foresee-tracker.js
    c. foresee-alive.js
    d. foresee-qualifier.js
    e. foresee-test.js
  3. Ask ForeSee to send USASearch your foresee-trigger.js file.
  4. USASearch will send you an email to confirm that we’ve set up your CNAME and installed your foresee-trigger.js file.

USASearch > Admin Center > YourSite > 3rd Party Tracking

Filed under third party how to