dcsimg

Using Fiddler for troubleshooting client tagging

Products

Webtrends Analytics 8.x
Webtrends Analytics 9.x

Cause

You have a client with issues you believe to be related to tagging. This is limited to a change that would be made to either the HTML or JavaScript on the client’s site in order to resolve it.

Resolution


You can use a HTTP proxy such Fiddler to intercept your browser’s requests for the files on the customer’s site and replace them with your own. This allows you to download a copy of their tag, modify it with what you believe will be corrections, and then load the page using your modified tag instead of the customer’s.

Fiddler is available for Internet Explorer and is available for download from http://www.fiddler2.com/fiddler2/

Once installed, you can work with customer’s files locally.

Here is an example using www.webtrends.com.

1. In Internet Explorer, navigate to http://www.webtrends.com
2. Click File > Save As and the Save Webpage dialog box will open.
3. Navigate to an easy to access location.
4. Change “Save as type:” to Webpage, HTML only (*.htm,*.html)
5. Click Save

Now you’ll want to edit the file you just saved. Also keep in mind you can do this with JavaScript files, not just HTML files, so you can edit the customer’s tag itself. Just remember, all of these changes are only to your browser so you are not actually changing the customer’s site. Also, unless you have a local SDC and have their SDC’s URL changed pointing to the local SDC in your hosts file, these hits will still register on the data collection server.

For our change, we’re going to do something simple, override the page title by inserting a meta tag into the file we just downloaded. To do this, we need to first change the file and then set up Fiddler to use that file rather than the client’s file (on their site) when we request the page.

To change the file:

1. Open the .htm file you downloaded in a text editor. Do not use Wordpad.

2. Below the current meta tags, add the following line:

3. Save the file and exit.

Now, we’ll set up Fiddler to use this file instead of the current one available on the web site.

1. Open Internet Explorer and under Tools, click on Fiddler2. On the left you will see HTTP traffic like you would see in HTTPWatch or HttpFox.

2. In Internet Explorer, navigate to http://www.webtrends.com. You will see the HTTP traffic appear in Fiddler.

3. In Fiddler, find and click on the request in the list of traffic that is for the page you want replaced with your edited page. In this case, the URL shows as “/” since it’s the default page we’re editing.

4. Click on the AutoResponder tab on the right side of Fiddler.

5. With your request still highlighted on the left, click Add.

6. At the bottom of the window, you will see your response has been added to the Rule Editor. From the rightmost dropdown, select “Find a file…”

7. Navigate to your edited file, select it and click Open.

8. Click Save.

9. Uncheck any other rules that may exist.

10. In Internet Explorer, reload the page.

11. Switch back to Fiddler and click on the newest hit to the SDC.

12. On the right, under the Inspectors tab, click on WebForms to view the query parameters and verify that your new parameter value was passed.

If you are making changes other than query parameter values, there will be other ways to check. For instance, if your change involves pointing to a different SDC, you’ll want to look for a request to the new SDC in the http traffic window.

More Information

http://kb.webtrends.com/How_To/How-to-test-a-SmartSource-Data-Collector-installation