How to track one domain from two google analytics account? - google-analytics

We got one domain that has data for different client. What we wanna do is have a separate Google Analytics profile under one account to track traffic data for each of their pages.
In other word, in google analytics code can we have two Account id ? So both accounts can get see the tracking data for specific pages.
I think I have not made myself clear yet. let me try again..
There is one domain abc.com with several pages. For example abc.com/xvy belongs to userA and abc.com/kju belongs to userB. We have one google Analytics account that is tracking everything on abc.com. What I want to do is have another profile or new google analytics account to track all the data belongs to userA and userB separately. I do have an option to put different tracking code on pages that belongs to different users.
For example, pages belongs to userA can have diferent tracking from pages belong to userB.
But at the same time I want to track all the pages under one account as well...
Is there anyway I can achieve that ?

You should set up a separate profile for each area of the site you want tracked separately. Profiles all belong to the same account, so you will be able to see all of your data with a single sign-in.
Keep the same tracking code on all areas of the site, but just apply filters to the different profiles.
To follow your example, I would set up Profile A and Profile B. You could keep a Whole Site profile to collect all of the data, too, if that is useful to you. For Profile A, apply a Request URI filter for ^/xvy and for Profile B, apply a Request URI filter for ^/kju. I'm assuming here that the different areas of the site are defined by the first subdirectory, so you may have to adjust those filter suggestions if the structure of the site is different.

Related

Duplicate domain tracking on Google Analytics issue

We've accidentally placed the same Google Analytics tracking code on two different domains.
www.y.com
www.x.com
We've rectified the issue now but retrospectively, is there any way to filter that data going to the specific domain name www.x.com for example?
Note: this is not a duplicate of Google Analytics: Track two domains as one
You could add a filter to the view (profile) in question. That will remove the data that you don't want. Another option if you don't want to loose the data in the view would be to create a custom segment that you could use when ever you want to split the data out.
Update from Google+
You can search with regex
^/app/
in the small search bar (custom segment) in your page reports (e.g. Behavior -> Site Content -> All Pages), after which you can look at the aggregate metrics for all pages which start with /app/ (i.e. all the pages with different parameters).
If all the /app/.* have the same page title, you can look at the Behavior > Overview report, but choose Page Title as the dimension.

Programmatically track subdomains in different view for google analytics

I've a site which allows users to register, creating a store front page like a shopping cart for them to customize. Each page is a subdomain of the main page, and is coded using one jsp.
Eg: User creates store front page named "abc", his store front page will be abc.mydomain.com
Is there a way to track these different subdomains individually separately using google analytics programmitically?
I've googled and currently did it by creating views and filters, but as i researched there are no way to create these views and filters programmitically, having to go to the google analytics page to create at there. I saw there is also a limit of views one can create thus am wondering if there are any other solution to this.
Thank You
You can use the Management API to create, update, and delete profiles, but as you've found out there is a limit of 50 profiles (views) per non-premium account. I would say to use advanced segments to segment out hostnames, but again there is also a limit of 100 advanced segments per view. One idea (and I haven't tested this) could be that when a user creates an account, they create a sub subdomain abc.foo.mydomain.com, and after there have been 100 sub subdomains created, switch the subdomain to bar.mydomain.com, etc. This way, you could get 5000 possible combinations. Again, you would want to test.
One other option, and this is similar to what Shopify does, is to have the user input their own GA account through the admin - but the downfall of this is that you (the site designer) wouldn't have visibility into that subdomains data.
Anyway, hope this helps.

Traffic from logged in users with Google Analytics

I would like to separate out the traffic between logged in users and users who have not logged into our site. The Sensr.net login link in the top right of the page turns into the user name when they are logged in. Is there a way to use this DOM state to segment the GA stats?
We have integer user ids from our database, should we use custom variables and put the Sensr.net UID into one of the custom variables?
Advance segments and Event Tracking is not wrong, you can use them creatively. But custom variables are there to track situations like this.
There are three main options such as Visitor Level, Session Level and Page Level. Visitor Level is recommended for this situation.
I will submit some referrals which will be very useful.
1) http://www.lunametrics.com/blog/2012/08/28/20-ways-use-custom-variables/
2) http://online-behavior.com/analytics/custom-variables-segmentation
Couldn't you create a new advanced segment where one of the conditions (or the only one for that matter) is that they should've visited a certain url, i.e. login confirmed? Or when it's ajax based you could try creating an event for that action and create a segment for that specific event.

List of visited pages per logged in user

I use custom google analytics variables to track the user ID of the visitor.
What I want is to see which pages a user visits after he signups to my website.
To achieve this I try to create a custom report about which pages a certain user ID visits.
I can't get this to work, on the custom report system I cannot select the correct filters & settings.
I hope anyone here has experience in doing this and can help me in the right direction.
Google Analytics won't show you this information at scale. It might work for 1-2 visitors, but Google Analytics purposefully restricts you from seeing individual visitor details.
Your best bet is to use a software product so you don't violate any privacy restrictions.
I would suggest looking into Universal Analytics. Much more centered around users - http://online-behavior.com/analytics/universal

tracking users with google analytics after they leave my domain to make a purchase and come back

I would like to track where users originally came from when they make a purchase on my site so I know which keywords are more profitable and which websites are best for advertising.
an example is a user is on my site with my google analytics tracking code which has details of where they came from, and then decides to upgrade. they leave my domain to go to my biller (2checkout) complete the purchase and return to my thank you page.
I have transaction code and analytics code on my thank you page and the transactions are showing up with the correct product/amounts in GA however there is no other data and in my reports the referring url is always my biller or a credit card companies authorisation page.
i can manually connect which customer is which by saving their referring data when they first come to the site and then matching it up after they make a sale, but I would like it to show up in my google adwords / analytics account where it is easier to manipulate the data and see trends.
if anyone can help me with this annoying issue I would be vbery greatful, but I fear I may end up living off reports I create and then matching them up with adwords manually :/
One thing you can do is have a click event trigger a custom variable. When the user clicks on whatever link that takes them to your biller, have the custom variable trigger with the information you want to carry over (like the current page URL, some campaign name, whatever). Specify the custom variable's scope as Session or Visit so that it get associated with the thank you page.
http://code.google.com/apis/analytics/docs/tracking/gaTrackingCustomVariables.html
An alternative is to do campaign tracking:
http://www.google.com/support/analytics/bin/answer.py?hl=en&answer=55540
That is more or less the same principle as the first suggestion, but with using specified URL parameters. Depending on how your pages are actually coded, you may need to push a virtual page view with the campaign code(s):
http://www.google.com/support/analytics/bin/answer.py?hl=en&answer=55521

Resources