Hosting my own Google Analytics solution - c#

I want to collect, store et report tracking datas (like used features, clicked buttons, ...) using javascript library and .net API. I know Google Analytics will be perfect for this. But my direction doesn't want to use it for privacy and security reasons. So i have to develop one or use an all-in-one package (piwik maybe).
Do you have any tips for me ?
Thanks

You could use ID's these are allowed to use as long as google cannot identify the user behind it, so a system which uses the id's in GA to obtain more information about a user can be very useful solution.
Since your direction does not want to use GA you could create it yourself.
It has been done at my company for certain situations.
I will not do your homework but the concept of it is :
Send calls to a homemade webservice (json format is pretty good for this),
create the service so it can interpret the json and put the raw data in a temporary Database. Do data checks , merges with backend data and possible conversions and store everything in a database from where you will make your reports.

Related

How to track Adwords visitor and pass a variable into the downloaded software?

What I want is to calculate the ROI of a campaign and this is my scenario. A user comes from Google Adwords into my webpage and then downloads a software. The software is coded in C#.
I know that there is a conversion option from Google that registers the action when the download button is clicked. But this is not the end because the ROI is not calculated when the software is downloade, but from his spending inside the software.
However, my question is more technical than that.
What I want to achieve is to "marry" the adwords visitor with his downloadable software. Meaning, to pass a unique code (or anything that works maybe a cookie) from the webpage to the software.
Some possible answers that lack extended knowledge from my side are:
Create a cookie with a unique id when a user enters the webpage from google adwords, and then somehow the software will read it. As far as I know a software can not read a cookie (I may be mistaken) but what if on software's first launch opens a webpage on his browser?
Make use of IP address. So, if a user comes from google adwords, get his IP, save it into a database and the same happens when he opens the software. Theoretically you have a match.
Did you encounter such things?
Do you know any way that actually works?
You can make use of universal analytics measurement protocol. Please check here :
https://developers.google.com/analytics/devguides/collection/protocol/v1/

Get Html from Web page and create Setup project for Wpf Application (C#)

I'm trying to create a wpf application such as a movies library because i would like to manage and sort out my movies with a pretty interface.
I'd like to create a library with all my movies getting information from the web, but i don't know how very well.
I thought to get the information from a web site, for example imdb, but i don't know if it's legally to capture html from page to get the nested information.
It's my first desktop application and I would also like to know if it is necessary to create a database within the project and then create a setup project with specified script for deploy it.
Sorry for the confusion but i would like to know too much things :)
Thanks a lot in advance.
The legality of web scraping is a grey area. See my question, "Legality of Web Scraping vs Normal Use" and the corresponding answers for some insight.
Even if the legality is not a problem, web scraping is a flimsy approach because the webpage structure may change without notice, making your application suddenly useless until you update it to the new format. You are much better off using some sort of web API (if the site providing the information offers it).
Whether you need a database or not depends entirely on what your application will be doing and how you design it - it's not something any of us can tell you.
Same goes for the setup project - in fact I wouldn't worry about that until you actually have a working application. Take it step by step and keep the scope within control.
Yes I did not think about api.
It's a great idea, maybe use "themoviedb".
But if i create an application based on it, that has to show all the movies that you have stored on your hdd and get , for example, the posters, the description and the ranking, i have to create a database according to you?
Thanks a lot.

C# web extracting programming. Which libraries, examples and samples?

I have just started programming and have made a few small applications in C and C#. My understanding is that programming for the web and things related to the web is a very easy task nowadays.
Please note this is for personnel learning, not for rent a coder or any money making.
An application which can run on any Windows platform (even Windows 98).
The application should start automatically at a scheduled time and do the following.
Connect to a site which displays stock prices summary (high low current open).
Capture the data (excluding the other things in the site.)
And save it to disk (an SQL database)
Please note:-
The Internet connection is assumed to be there always.
I do not want to know how to make a database schema or a database.
The stock exchange has no law prohibiting the use of the data provided on its site, but I do not want to mention the name in case I am wrong, but it's for personal private use only.
The data of summary of pricing is arranged in a table such that when copied pasted to MS Excel it automatically forms a table.
What are some steps, guidance, examples and libraries for achieving this task?
You can use the HTML Agility Pack to parse web pages.

How can I read data from a textbox with no web server, then save it in an XML file?

I am studying computer science and we have to do a programming project which must be strongly related to XML and using XSD and XSLT or XQuery/XPath at least. Because I like C# I'd like to do it in this language, but I could use another if anyone has another idea.
My Idea is now to code some kind of appointment book. I imagine that all appointments for the week are shown as HTML and you can enter for each day appointment notes in the textarea for this day.
Now my question: How can I take over the data entered in the textboxes? The application is an offline one so I have no web server receiving the GET request containing the entered data. Is it possible to read the current HTML DOM from memory with all its entered values and then transform it to an XML format for persistent storage from which it could be read in later?
Or is this idea totally stupid?
How else can I put all those XML technologies in one app?
If you want to show UI Generation from XSLT, the web page approach is easiest.
More impressive is generation of XAML from XSLT -> windows app (WPF).
Download Visual Web Developer (FREE)
or
Visual C#
Why does it have to be Web based?
You can use those technologies in a Windows Application.
You can use JavaScript. Convert the data into XML or JSON and output it to another element, like div, or textarea.
What you need to do is set a function that does all this and gets executed on submit.
Check this example. Also to speed things up, you can use a library like jQuery.
Being at home and offline do not mean you don't have a Web server. There are zillions of ready-made packages which offer an embedded HTTP server so that the same application can run online and offline without any modification. Very convenient.
(I know you us C# but, just to show an example, I use wsgiref.simple_server for that purpose.)
Why not make a windows app that allows the user to update the appointments which are stored in an XML file. Then use a stylesheet to display the appointments in a web browser.

Google Maps - Easy way in ASP.Net?

I'm wanting to use google maps and see a million ways to do it on the web. Some are javascript methods and some are asp.net server components with which I have hit and miss luck. What's the easiest and most reliable way using c# and asp.net?
I have my location data including geocodes in a database. I want to provide users a method to do a lookup for certain locations. From there, my code will provide a table of geocodes to google maps with markers on the map corresponding to the found entries. Users can see each entry and need to be able to tell which is which if multiple rows are returned.
Is there a good way to do this?
The Google Maps API is accessed via JavaScript (any server controls are just abstracting this away from you). In the case you described, you would need to dynamically output the required JavaScript to tell the maps API what to display.
See http://dotnet.sys-con.com/node/171162
There are a few server controls to do it, like this, but you have to learn how to do things in one way (server control) or another (Javascript Google API).
I recommend using the Google API, since it has more samples all over the web, and you can use new features implemented by Google right after they release them and don't have to wait for the server control developer to do it.
I would recommend using direct JavaScript to create the Google Maps. It's fairly straight forward and then you will be able to understand what's going on behind the scenes.
Google has some pretty good tutorials and documentation to get you up and running quick. Once you add one to your site, it will become very easy to setup the rest of the customization that you need.
Take a look at this site for examples.
http://code.google.com/apis/maps/documentation/examples/
As usual I point to ComponentOne who has a nice SilverLight control for this that can use google-maps or Microsofts Live Maps, it uses Silverlight Deep Zoom to handle it nicely:
http://www.componentone.com/SuperProducts/MapsSilverlight/
Live example:
http://demo.componentone.com/Silverlight/Factories/
(I'm not from ComponentOne, just a satisfied customer) ;)
I know you can do it yourself with scripts and other ways, but its just so much more fun to use code allreade written. ;)
Best .NET Wrapper for Google Maps or Yahoo Maps?
BTW: I found a great post here that has an example on how to do a store lookup. Works really well. I recommend!!
http://blog.donnfelker.com/post/HOWTO-Build-a-Store-Locator-in-ASPNET.aspx
Check out this example: Data driven Google Maps in ASP.Net
I used ASP.Net Ajax to create a web-service that is callable from JavaScript.
The web-service talks to the database and fills a very basic object. ASP.Net Ajax, then makes the object available to my client javascript. The rest is easy: In the client, you call the webservice from Javascript, read the data returned and populate Google Maps, using simple Google Maps API calls.
Check out the site at link text
Please, try my GoogleMaps control for ASP.NET

Categories

Resources