Google Analytics Server Side - asp.net

I'd like to track downloads of a PDF on my website.
I'd prefer it to be some kind of event tracking with Google Analytics.
I've been reading up on the Mobile SDK with ASP.Net but it still seems like you need to execute some javascript client side for it to work properly.
Anybody have any ideas for a completely server side Google Analytics implementation?
I'm hoping for some kind of HTTP Post to ga.js?useragent=THIS&ip=THAT&cookie=SOMETHING...

Related

What is equivalent of Facebook pixel in GTM for server side tagging?

With recently introduced feature of GTM, server side tagging and it's known benefits, I want to move my Facebook pixel browser code on server. So I am looking for equivalent of Facebook pixel for server side tagging.
The closest thing I found is Facebook Conversion api but not exactly same.
Would like to hear other views on how they are achieving this
There are quite a lot to learn and work to do this.
You need to understand the Facebook pixel hit's payload. Something like https://www.facebook.com/tr/?id={{pixelId}}&ev={{event}}&dl={{Document location}}...
Assemble the payload and send it to your Server Side GTM.
Create Client in the Server Side GTM to receive the hit.
Create Tag to dispatch the hit to Facebook.
The Server-Side GTM is not supported the 3rd party cookie and it means that the Facebook will not recognize the user you send from Server-Side GTM.
Facebook report will only show the conversion or event amount.
Can't use this for remarketing or attribution.
There are was no official Tag from Facebook for GTM Server Side. That's why I created my own https://github.com/gtm-server/facebook-tag
The tag sends the event data from the Universal Analytics/GA4 client to Facebook.
It developed exactly like an easy replacement for Facebook WEB pixel.

Can I get server side events sent into Google Tag Manger

We need to track some server-side events given that some of the activity done by our users is offline over the phone and send these events over to multiple tracking tools and ad networks to stop or intensify remarketing budget.
We have been reading about Google Analytics Measurement Protocol But this only fixes the issue for GA and other Google products (Google Ads), but it won't fix the issue for other networks (Facebook Ads, AdRoll, Outbrain, etc)
What I think would solve the issue is having these events pushed into Google Tag Manager, and collected by triggers and variables that would shoot out the right tags. This setup would allow our marketing team to stay in control of notifying the desired ad network to take action.
While it might be technically feasible I think making GTM work on server side would be a huge hack. Google Tag Manager is used to manage JavaScript and HTML tags and does not provide any server side API (apart from REST Api used to mange your accounts and containers).
The reason why I think it is technically feasible is this: GTM injects scripts to your website and relies on window component and events that do not exist on the server side. Therefore you would have to spin up some client on your server (like Electron) to make it work and then feed events to the client. You can try doing this for fun but I would not advise doing this for any commercial server.

Using Google Analytics for an API

I have a small API written in node.js that has no website attached, it works only on AJAX calls. I want to know if it is possible to use Google Analytics, or other good Analytics tool to monitor traffic.
I think it depends on how you have things set up but I wonder if you couldn't just add the normal JavaScript tracking to your API since its JavaScript as well. In the event you cant do that you should check out the Measurement Protocol Overview, it will allow you to send the raw data to Google Analytics yourself.

Is it possible to send data to Google Analytics service by url?

I've been trying to send data to Google Analytics through url, but it's not working.
Here is the url:
http://www.google-analytics.com/__utm.gif?utmac=MY-UA
&utmn=0.57942900+13058623924dd5e0f88d784
&utmp=%2Fmypage.html
&utmr=http%3A%2F%2Fpp.test%2Fmypage-ref.html
&utmdt=test+ga&utmul=en-us
&utmhn=pp.test
&utmcc=__utmz%3D1.1304060743.1.1.utmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%3B+__utma%3D1.100229728.1304060743.1304060743.1304060743.1%3B+__utmz%3D185677488.1304391672.1.1.utmcsr%3D%28direct%29%7Cutmccn%3D%28direct%29%7Cutmcmd%3D%28none%29%3B+__utma%3D185677488.2126025763.1304391672.1304667350.1305106191.6%3B+PHPSESSID%3Dpghin7v4q3g5lssq5c5mjchfj6
&utmcn=1
&utmcr=1
&utmwv=1
&utmsr=1280x1024
&utmsc=32-bit
&utmcs=-
&utmje=0
I have been trying follow the parameter here http://code.google.com/apis/analytics/docs/concepts/gaConceptsOverview.html
I call the url by curl and tested through the address bar, but not working, no data in my Google Analytics :(
Any ideas please?
It's possible, although if you're trying to do it you're probably doing something wrong.
But there's more to it than you can see at first sight. The best way to achieve it is to use a mobile library for Google Analytics. Google already provides this for a couple of languages. These libraries are built to send data to Google Analytics via your server. And if you check the server code you'll see that there are some calculations involved. You can possibly change one of these libraries to be run without a request. They're not complicated.
http://code.google.com/mobile/analytics/docs/web/

track visits from nonbrowser application using google analytics

is it possible use google analytics to track visits from nonbrowser application? will ga be able to recognize custom user agents or other http headers? Anyone has experience in this area? thanks!
No. Only browsers execute Javascript, which is required for Google Analytics tracking. To track robots, you need to get server side logs. AWStats is a good tool for parsing Apache logs, allowing you to track robots and such.

Resources