I've built a site which has forms with event tracking codes, but now the client wants to create goals for specific landing page -> form submission
And all the forms have the same tracking codes at the moment.
Looking in google analytics goal setup it seems I can only add one part goals e.g. by URL or by event tracking code but not
if {this page and this tracking code}
record {this goal}
Is this possible or do I just need to make tracking codes for each individual form on every page?
No, you can't combine event and page conditions in the goals configuration. You'll need to customize your tracking codes to track this, and this can be quite tricky if your form is on some other page than landing page.
By the way, with the current setup, your client can see exactly the same information in Behavior > Site Content > Landing page report in Google Analytics
Related
I am sorry if my question seems to be weird but I can't find any information on the Web..
The question is simple: how Google analytics can be able to track ANY e-commerce website's data?
Websites are different and each one is coded differently so how Google Javascript tag could detect special events like transactions and adding to cart?
Note: I am not talking about simple data like visit duration or seen pages or the URL etc. I am talking about spacial information like:
Visitors commands
Visitors carts
Visitors carts amount
Etc
Basically it works like this. There is a standard piece of javascript for google analytics that is placed on ever page typically done via an include file of some sort that causes it to be included on ever page of the website.
That basically gets you all the standard analytics (visits, page views, etc).
Then if you want ecommerce tracking (like value of orders placed, products ordered, etc) you place a second javascript file on your thank you page and that piece of javascript has parameters for order value, and products on the order (qty and price). You can see more details of the many fields that can be passed about the order here: https://developers.google.com/analytics/devguides/collection/analyticsjs/ecommerce
In summary: Outside of the standard analytics that it can collect with the sitewide javascript file, Google Analytics only knows what you tell it. So if you want cart or order tracking, you need to include a special javascript file for that and pass it the information you want to see in Google Analytics.
Looking at the JavaScript they use, it seems that there should not be any issues. It looks as if it is just pushing some simple data up to google. Just wondering if there is anything I should think about when using Google Analytics on User Restricted ASP.NET MVC pages, or any restricted page for that matter.
I'm also thinking of tracking regular users vs admin users, most of which use separate pages, but I could load one google analytics script over another depending on the user role.
You can still use Google Analytics on those pages.
How can I add google analytics tracking code to a page that redirects.
For example say I have a vanity url www.simpleurl.com that is redirected to www.hardtorememberlongurlofdoom.com/folder/?q=qwerqwe
What would the best method be to track hits to the simpleurl.com. Currently Im using the redirect feature from my hosting company. What I think I should do is turn that off and create and index.html that runs the tracking JS and then redirects the page.
Does anyone know if there is a standard practice for this technique?
If you want to track it with JavaScript and not by using PHP on the simple domain (before the redirect) then you could set the script to track on the long domain and filter by referrer? You can get the referrer using document.referrer.
Another solution could be to set up Google Analytics to track by referrer on all visits and then you've got data to see how many goes through the (or maybe even several) simple domain(s) and how many goes straight to the long domain.
EDIT:
Actually you could just have the tracker on the long domain and all the data should be fine in Google Analytics: Here
The only problem with this approach would be if you want information about the referrer from the simple domain.
The homepage of my website is a form (like Google's homepage) that sends the user to the same page once it's submitted. In other words, when the form is submitted, the page basically refreshes and loads something else.
Using Google Analytics, I can tell that a lot of people are exiting from my homepage. I want to find out if they're exiting before or after submitting the form. Is this possible?
If the users are coming to your homepage directly, you can check the difference between the bounce rate and the exit rate. A bounce occurs when someone views a single page on the site and then leaves. So if they are submitting the form they shouldn't be bouncing but rather exiting.
You can also setup a funneled goal. Basically you'd setup a goal based on destination (your homepage) and then select to have a one step funnel that would also be your homepage. I haven't tested this but if it works like the documentation states then the goal should only be reported when users go from your homepage to your homepage (eventually)...
I'd suggest adding a query-string parameter to the form action so you can easily see when people are viewing your homepage after submitting the form. If your action is like this:
<form action="/index.php" ...
then change it to something like:
<form action="index.php?form=submitted" ...
I think this is the easiest way to track which data is being displayed on a page. Another method would be to use a custom bit of JS that reports the URL of the page to Google, so you can append the query-string parameter transparently to the user or even use a different file name in the URL.
When I take-over a site and AJAX-ify it, I normally use a combination of query-string parameters and custom reporting to Google (in JS) to mimic regular page-views so that analytics make sense for both versions of the site (meaning good time-over-time reports can be had).
I'm trying to solve a problem with tracking traffic to individual blog posts on a system that uses a javascript redirect system where something somehow break tracking.
The way the system works is as follows:
Permalinks are in the format of domain.com/ab_XXXXXX where ab_XXXXXX is a unique code. That code is parsed by a piece of javascript, which tells the browser to load the individual blog post page. This page has a URL format of blog.html/?cd_XXXXXX_ef=YYYYYY. Here too, XXXXXX and YYYYYY are unique codes which, combined, identify the particular page.
When I load the blog.html/?cd_XXXXXX_ef=YYYYYY URL directly, Google Analytics does seem to track the page and the user shows up in the real-time dashboard as visiting that particular page.
However, when I load the domain.com/ab_XXXXXX URL, the user does not show up in Analytics' real time dashboard, even though the analytics tracking gif gets loaded.
Since the ab_XXXXXX URL is the permalink, Analytics appears to contain no data on individual blog post visits at all.
I'm not the programmer on this system, and at this point I'm not sure what to test or to suggest as changes to the programmers.
My question is: why would Analytics track the user in the one occasion, but not in the other? And what could be done to remedy this?
Does the page ab_XXXXXX actually redirect the user to cd_XXXXXX_ef=YYYYYY or does it simply load the contents of that blog post into the same page? In either case, but particularly the latter, you can simply choose to manually track the page view in your existing Javascript snipped by adding something along the lines of _gaq.push(['_trackPageview', 'blog.html/?cd_XXXXXX_ef=YYYYYY']);