Google Analytics Interface - Adding onLoad Event to Goals - google-analytics

Hey I'm having some trouble using the Google Analytics interface and wondering if anyone has ever experienced this.
I recently added an onLoad event to track certain pages of a site but I can't seem to understand how to add the Goals to my Analytics account.
Any help would be greatly appreciated!
thank you

Use this information from here and put it into "Goal Type:Event" Section 1
_gaq.push(['_trackEvent', 'category', 'action', 'opt_label', opt_value]);

There is a problem with terminology here since "event" is ambigous - did you add a Javascript onload event handler to your page (which wouldn't be necessary for GA tracking) or do you want to use Google Analytics event tracking (which is was Silas assumed) ?
In any case, Analytics Goal are created in the admin section in your account, under profile settings->goals. There you have to enter a unique name and a type.
Type "Url destination" mean your visitors have reached a particular page (goal url) in your website (either the precise url (match type "exact"), a url that starts with your goal url (head match) or a url that matches a given pattern (regular expression).
If people are supposed to follow a given path before they visit the goal url you can create a funnel by checking the "Use funnel" checkbox and enter the individual urls they have to visit before getting to the goal url. That's useful especially if you have some sort of checkout process - the funnel visualization report will show you how many people exited the process before they reached your goal url and at which url (high exit rate at a given steps means there is a problem and you should optimize this particular page).
In the same way you can create a goal for a google analytics event, only those do not have funnels (an event has more or less by definition only one step).

Related

Google Analytics is removing our ad tracking query and the last word of the URL, then adds "none" and splits analytics into two pages

We've been experiencing this problem with Google Analytics and our URL ad tracking query strings for about a year and a half now, spanning approximately 40 different URLs and query strings which all did this.
When we look up the pages in Google Analytics, a couple of problems are occurring:
The URL is split up and tracking as 2 different pages and the
analytics are split between them. (more on this in the example and
screenshot)
The new (2nd) page that is created within the analytics, has the ad
tracking query and the last item of the URL deleted and replaced with
the word "none".
If the URL ends with a word, it removes the word and
the tracking query.
If the URL ends with "index", it removes "index"
and the tracking query.
If the URL ends with a "/", it removes the /
and the tracking query.
and replaces them with "none"
Example:
This is the original URL and tracking query:
/ucm/lp/FY18/search/cas/index?from=UG-F18-Search
In Google analytics it gets divided into 2 pages:
/ucm/lp/FY18/search/cas/index?from=UG-F18-Search
and the new /ucm/lp/FY18/search/cas/none.
(Note how the query and the word "index" are removed and replaced with "none".)
The way the analytics get split up between the pages is interesting:
On the first URL, (the real page), the average time on page is 00:00:04, and for the second URL it's 00:01:03.
Entrances on the first = 7,888. Entrances on the second = 147
Exits on first = 26.43%. Exits on second = 87.15%
Seemingly what's happening is the user will land on the original page, /ucm/lp/FY18/search/cas/index?from=UG-F18-Search, and it starts to record the analytics, but, then something happens and it loads /ucm/lp/FY18/search/cas/none where the analytics will finish recording.
In addition, our 404 page gets a hit during this process too because /ucm/lp/FY18/search/cas/none isn't actually a real page. I don't have proof of the 404 issue right now, but that's what I'm told. I thought it was worth mentioning just it case it helps, but take it for what it is.
From our testing, we're pretty confident that the user has a seamless experience, and this is fully a "just-in-the-analytics" problem. The main reason this is a problem for us is because we can't accurately, or easily, tell which of our ads and venders are performing the best.
Please let me know if I can explain this better or provide more examples or screenshots. Thank you!
GA is splitting' the page because you're sending it 2 hits:
You can easily verify it in the Network tab of Chrome developer tools or by using the Tag Assistant browser extension.
I'd try commenting out the two remarketing tags and check the tracking, or migrating all these tags to Google Tag Manager.

Google Analytics: Unifying Single Page Application URLs that Contain IDs

We'd like to track behavior flow in our single page application using Google Analytics. We use the hash to route in the application, and we can track the URL within the app with virtual pageviews as described in Google's documentation. However, many of the URLs in the application contain ids, and are considered distinct URLs, despite representing the same page. Thus, we're unable to get accurate behavior flow information in Google Analytics for those pageviews.
For example,
http://example.com/#/dashboards/8a86204a-7b10-4bf5-961b-be16d209f2b0
and
http://example.com/#/dashboards/d8d6a9b5-b6f1-4159-bd6b-622e628f87b2
would be considered distinct pages, when really, we'd like to group these two urls together to determine how users use the dashboard view, rather than how users use a particular dashboard.
Is there a way to unify URLs like this so we can view metrics and behavior flow in aggregate (either in Google Analytics, or in the SPA)?
Completing the answer from #Eike. You can indeed use virtual pageviews to just set the url to '/#/dashboards' using the command
ga('set', 'page', '/#/dashboards'); and then send your pageview. But in my opinion keep the individuality in your data and use a custom dimension to achieve the aggregation you want. Meaning that you should define first a custom dimension that is named for example 'sitePageAggregate'. This dimension will take the value of your website's 'section' url for example 'dashboards' or 'search results' or anything else that might need the aggregation for the behavior flow. This can be done by code in before your pageview hit in each page like this
ga('set', 'dimensionN', 'dashboards');
where N is the custom dimension index. More info on how you can do this here. Now you will just go to your GA interface, Under Behavior -> Site Content -> All pages and just set the secondary dimension as 'sitePageAggregate'. In that way you are retrieving the results you want.

Destination Goal not taking funnel into consideration

I have a very basic site goal:
When someone gets to the '/my-account' page directly from the '/component/community/ajaxregister/ajaxregister' page, it needs to count it as a conversion (Registration).
I have a custom destination goal set up:
Destination = '/my-account'
Funnel: ON
Step 1 '/component/community/ajaxregister/ajaxregister' Requires? YES
The registration counts in my db do not match the goal count and the 'Reverse Goal Path' report shows that there are conversions being registered where the 'Goal Previous - Step 1' includes pages other than the registration page.
Any ideas on how to make this goal register only when one lands on my-account from the registration page?
The "required step" merely affects funnel visualization, not goal conversion. So by default there is no way not make this count only when people come from the registration page.
To solve this in code (and thus make the question on topic :-) ) you could
check the referring page on your goal conversion page, then
fire an event when the referrer is the registration pages, and
then switch to an event-based goal in the GA backend
That way you would not have a funnel (does not work with event based goals), but at least you'd have the "correct" number of conversions.

Google Analytics funnel - Virtual Pageview 100% backfill - what am I doing wrong?

My first post. I'm having big problems with a Goal Funnel in Google Analytics.
We've set up a funnel to track registration from our main company site to user registration which is handled on a third-party site (using a virtual pageview to track the user's 'click' to continue to the registration).
We're clearly doing something wrong however as the funnel seems to have a conversion rate of 100% for several steps. From the many tutorials and posts I've read it looks like there could be something wrong in our syntax and GA is seeing at least two pages as the same then backfilling the funnel to give this incorrect 100%.
Problem is - after many tweaks - we still can't seem to find quite what this error is. I'm also not entirely sure if we should be using 'begins with' or 'regular expression' for the funnel and if that the correct application of one of those would nip this data issue in the bud instantly.
Underneath is the configuration and then the data it's showing us in GA.
Thanks for any help on this!
p.s. Since we're using tag manager, I also wasn't sure if this could this be something in our firing rules but since the first conversion step in the funnel looks ok I guess that rules this out and points straight to the funnel??
p.p.s. Sorry, since I normally just read, I don't have permission to embed images.
[The goal flow]
[IMG]http://i60.tinypic.com/pmwk8.png[/IMG]
[The funnel setup]
[IMG]http://i58.tinypic.com/23lkqqt.png[/IMG]
The virtual pageview you have in the second image in step 2, is: virtual/registration. The virtual pageview that is firing off when I click on Register for online account is: /virtual/cas-registration#https://signin.mygovscot.org/home/?sp=register/CLK. So you'll want to update step 2 to: /virtual/cas-registration(.*) - I believe you can use regular expressions in goal funnel steps.

URL-based Goal doesn't get reached in Google Analytics despite the same URL-based PageView being registered correctly.

I've got a multi-stage online questionnaire form, and I use a _gaq.push(['_trackPageview', '/Form_Stage_XX']) code to register form's stages destinations (the "XX"s stand for actual stage numbers).
I also set up the URL-destination Goals based on pages /Form_Stage_XX (same as in _gaq.push).
Now in the Site content -> Pages report I can see the visits of /Form_Stage_XX registered as expected, but the related Goals won't get reached.
Any ideas why is this?
Many thanks.
Please do check your goals configuration in the Profile Settings - > Goals Page to see if the URL is set to the same as /Form_Stage_XX and also if the Match Type is set to Exact Match. I would also recommend using the Match Type: Regular Expression with .*\Form_Stage_XX as the parameter.
You should be able to see if your goals are beign tracked as expected in the Conversions - > Goals Report.
One more thing is that form goals are usually better tracked as a Funnel Conversion, so you can track the flow from each step and thus visualize where visitors are leaving your form.
You can find more information in this great video lesson, made by Google

Resources