Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6963651
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T15:49:16+00:00 2026-05-27T15:49:16+00:00

The last thing my application does before it launches is start a new thread

  • 0

The last thing my application does before it launches is start a new thread that performs a simple HttpWebRequest that I would like to track with Google Analytics or Piwik:

Thread thread2 = new Thread(new ThreadStart(this.ThreadAnalytics));
thread2.IsBackground = true; thread2.Start();

public void ThreadAnalytics()
{
    try
    {
    HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create("http://netlauncher.org/version1.0.0.html");
    request.Method = "GET";
    WebResponse response = request.GetResponse();
    StreamReader sr = new StreamReader(response.GetResponseStream(),System.Text.Encoding.UTF8);
    string result = sr.ReadToEnd();
    sr.Close();
    response.Close();
    }
    catch (Exception) { /* do nothing */ }
}

Note: Although StreamReader is not required, I have included it for testing purposes.

I can see the HTTP GET with WireShark, however I do not see anything in Google Analytics. This lead me to believe it was a Java issue. I switched to Piwik and used their Image Tracker Code that does not require Java:

<img src="http://mydomain.com/piwik.php?idsite=1&rec=1" style="border:0" alt="" />

As with Google Analytics I can navigate to this page using IE for Firefox and see the hit appear. However the hit from my application does not. I have also tried specifying the user agent, language, etc. Is there something I am over looking?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T15:49:16+00:00Added an answer on May 27, 2026 at 3:49 pm

    Google Analytics does not require Java either (it uses JavaScript).

    The problem is that GA, Piwik, and most other analytics tools require some sort of callback to be made by a resource that is loaded as part of the HTML page – typically either an image or a JavaScript call. By only reading the HTTP response, your code is currently not loading any of the dependent resources that would be used by one of these tools.

    Google Analytics may provide an API that you can call directly for what you’re attempting. Similarly, with your Piwik code, you may be able to get it to work by directly calling the http://mydomain.com/piwik.php?idsite=1&rec=1 URL as part of your HttpWebRequest – instead of calling an HTML page that contains an image reference to that URL. Otherwise, you will need to use additional code or libraries to act as a browser and actually “load” the HTML that you’re receiving in the response to your request.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ok my application does everything that is it suppeded to do and it does
I have a GWT application which I would like to run from within a
svn is slow as it is ( leaving the rant out) the last thing
I did a lot of PHP programming in the last years and one thing
Last year, Scott Guthrie stated You can actually override the raw SQL that LINQ
I have been using Uploadify in my PHP application for the last couple months,
I currently have a Windows Application that uses TCP Sockets to connect users and
I wrote a .Net application that has nothing to do with network communication. There
In my C# Windows Forms application, I have a user control that contains other
I am deploying my django application on a server, and on last stages I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.