How to differentiate different sources in Google analytics - google-analytics

Is it possible to add something to the URL so Google analytics has statistics on where it came from. Right now I have "https://my-site.com" link everywhere. What if I put some path parameters to the URLs like "https://my-site.com?source=stack-overflow" or "https://my-site.com?source=catalogue".
My question is: what can I attach to the URL so Google analytics knows what source requests came from.

You have to use UTM parameters: https://support.google.com/analytics/answer/1033863?hl=en

Related

Manually push data to Google Analytics Goals

I have create a goal in GA based on destination. But due to some changes that we did, we not using destination anymore and based on ajax result. So I wonder here if I still can track the goals by using it manually.
I found some docs here Google Annalytics Developer Guide, but did not found anything related to Goals.
Would be great if got experienced people in GA to advice on this
Send to analytics a fictitious pageview (virtual pageview) to activate the goal where you want.
In the measurement protocol you can use the dp parameter to define the page path (or dl the location URL) and match it to the one that activates the goal in Analytics.

How does google anayltics know about Google ads?

There is something quite basic that confuses me. I use Google ads conversion tracking with Google Tag Manager, and I don't understand how my google analytics know about these ads in the first place. I mean, the conversion tags I create in Google Tag Manager don't include the Google Analytics tracking code at all.
What am I missing?
Thanks
It knows based on the url structure of the incoming links.
This link gives a good overview.
UTM Codes: How to Track Campaign URLs in Google Analytics
This tool allows you to see how the different urls are built and decomposed in GA.
campaign-url-builder
Essentially the structure is integrated and google analytics logically decomposes and presents the data in a meaningful format based on URL.

Google analytics url link tracking

Lets say I want to advertise a link to a blog, app link etc, and I want to put that link on my business card using QR code.
Are there any services out there that I can attach a tag to the link so I would know if user runs the URL, it would know it came from the business card?
UTM parameters are what you are looking for.
This article gives a good overview of what UTM parameters are and how to use them.
https://support.google.com/analytics/answer/1033863?hl=en
You can also use this Campaign URL Builder created by Google Analytics.
https://ga-dev-tools.appspot.com/campaign-url-builder/

What is utmu parameter in google analytics __utm.gif request?

I am trying to make the google analytic __utm.gif request using php. I have broken all the variables and the only one which I don't know about is utmu parameter. It is not documented anywhere.
When I see a pageview tracking request it is appended to the end of request as &utmu=qB~
While doing ecommerce tracking it is appended as &utmu=qBAL~
Please help me with this.
It is a bitmap of all of the methods used to build the request.
Source: http://glucik.blogspot.com/2011/02/utmu-google-analytics-request-parameter.html
utmu doesn't actually contain anything of external meaning. Google uses it to store some internal values that help them improve ga.js. It's not required to make any functionality work, so, your PHP code doesn't need to account for it.
However, you should know there are already a few long-standing PHP-based Google Analytics projects, like Server Side Google Analytics (SSGA), as well as the semi-official Google Analytics for Mobile PHP and PHPGA.

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/

Resources