Tracking Social Media Logged In Users Help
-
Hi, I recently read Tom Anthony's post on "Monitor Which Social Networks Your Visitors are Logged Into With Google Analytics". I have looked and re-looked at the code implemented and after two days I am still not getting any results tracking. Could somebody please take a look at my site and tell me if they see any conflicts or errors I may have made when installing the code.
Thanks for any help!
-
If fixing the bracket doesn't work then forcing the variable to be set is probably best done with an event tracker, and not a pageview tracker so it doesn't screw with your bounce rate or your pageview count.
If you look at google's example they follow up their custom variable code with the following code:
_gaq.push(['_trackEvent', 'Shopping', 'Item Removal', ]);
You would want to put that in just below the custom variable lines:
_gaq.push(["_setCustomVar", slot, network + "_State", "LoggedIn", 1]);
You probably want to change the details of the event to say something like:
_gaq.push(['_trackEvent', 'login check', 'successful check', ]);
This event is fairly useless for segmenting as it will get fired off every time the code runs, but it will be sure all of your info gets passed to google.
I wouldn't try this until you try putting the bracket in I mentioned above though.
-
Actually, I just took a look at your code, and I think it is something much simpler.
You somehow deleted the opening "{" after the function call.
Your function declaration code looks like this:
function record_login_status(slot, network, status)
if (status)
it should look like this:
function record_login_status(slot, network, status)** {**
if (status)
The key is that bracket telling JS to start the function.
-
Thanks for this, so tell me, how would you rewrite the code so that it works. Are you suggesting that
_setCustomVar()
should be replaced with_trackPageview()
-
This is probably occuring because you are calling the custom variable function after the main track pageview function. Without another track pageview or event tracking call you aren't ever really passing the data back to google.
The talk about this in the setup guide for using customer variables in the GA help documentation: http://code.google.com/apis/analytics/docs/tracking/gaTrackingCustomVariables.html#setup
Scroll all the way down to the bottom and you will see this:
Call the
_setCustomVar()
function when it can be set prior to a pageview or event GIF request.In certain cases this might not be possible, and you will need to set another
_trackPageview()
request after setting a custom variable. This is typically only necessary in those situations where the user triggers a session- or visit-level custom var, where it is not possible to bundle that method with a pageview, event, or ecommerce tracking call.I will put this into the original posts comments as well so he can update his method, or tell me I am wrong
Got a burning SEO question?
Subscribe to Moz Pro to gain full access to Q&A, answer questions, and ask your own.
Browse Questions
Explore more categories
-
Moz Tools
Chat with the community about the Moz tools.
-
SEO Tactics
Discuss the SEO process with fellow marketers
-
Community
Discuss industry events, jobs, and news!
-
Digital Marketing
Chat about tactics outside of SEO
-
Research & Trends
Dive into research and trends in the search industry.
-
Support
Connect on product support and feature requests.
Related Questions
-
I am tracking my domain e.g www.xyz.com to an existing google analytics account . I want to track www.xyz.com/blog separately in the google analytics account. How can I do that?
I am tracking my domain e.g www.xyz.com to an existing google analytics account . I want to track www.xyz.com/blog separately in the google analytics account. How can I do that?
Reporting & Analytics | | Windlass0 -
Google Analytics: How to Track Blog Traffic that Enter the Purchase Funnel?
I've been trying to figure this out for awhile, but I have had no luck. The current ecommerce store that I work for is trying to find out how to track how many people coming in via the blog are converting/buying. The site lives on Magento and the blog is on wordpress and they both use the same Google Analytics code. Site URL: http://website.com/ Blog URL: http://website.com/blog Is there anyway to do this so you can see which landing pages are driving conversions? If not, Is it possible to set up Google Analytics to show conversions and revenue coming from people who enter through blog directory?
Reporting & Analytics | | Erik-M0 -
Subdomain tracking in GA
Hi Moz community. Wonder if you could help us out with a baffling Analytics issue. Are there any reasons why the _setDomainName() function in Google Analytics wouldn't track across subdomains correctly? We have been seeing visits to a subdomain come up as referral traffic, even after implementing the right tracking code. Would be interested to hear everyone's thoughts on this. Thanks in advance.
Reporting & Analytics | | mrdavidingram1 -
Want to track AJAX form submits. Is this correct?
Hi! I would like to track everytime a visitor clicks a AJAX contact form's submit button. I created an event in Google Analytics and plan to add some javascript to the submit button code. This is the current submit button code: This is how it'll look after I add the category, action, etc.: Is this correct or am I missing something? Please let me know if you need further detail. Thanks a lot!
Reporting & Analytics | | alfredo.uy0 -
Registration tracking with Google Analytics
Hi everyone, I want to track user registrations with Google Analytics for a customer's website. The thing is after registration visitors are not directed to a specific page, so I can't set it as a goal. I thought of tracking submit button with event tracking, but that data would not be true as a visitor may click it more than once, and there's the login with facebook and twitter thing. Before convincig customer to create a registration confirmation page, I want to make sure there's no other way as they don't want to make any changes to the current website. Any ideas?
Reporting & Analytics | | ugurcanuzer0 -
Google Analytics - Tracking a Goal from 1 Domain to Another
Hi there, been combing this page for some answers - https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSite but can't seem to figure it out. Scenario - Site A Site B Currently have 2 different GA accounts set up on each. Is it possible to Track a Goal that happens on Site B, that comes from Site A - In Site A Reports? So say, Site A has a Newsletter, directing them to Site A but promoting Site B - i'd like to track the effectiveness of the newsletter. Site A is running a white label of Site B service. Thoughts? Cheers
Reporting & Analytics | | IsHot0 -
Cover my tracks / two websites on the same Analytics
Hi, I've got 2 websites and I like one of them to make some links to the other one. These two sites are on the same Google Analytics account. They have been set up 3 month ago and they have some articles on them. I've heard that Google can see that those websites are related in my Analytics and use this information to give less power to the link I could make between them. What do think about it and what do you recommend me ? Shoud I closed the Analytics account ? Or down one of the website and rebuilt it whith a different domain / host / analytics ? The thing is if I delete one of the website i'll be force to republish the articles, because there are links on it, and they're part of a deal I've already made. Thank you
Reporting & Analytics | | Spleen0 -
Social Shares Metrics?
I notice in the OSE Link Metrics the reporting of Social Shares. The total shares do not include the Facebook Likes. What I'm wondering is what does this mean? Do Shares count more than Likes? Are Likes not counted by Google. What about LinkedIn Shares, why are they not being reported on? If Google is now putting more emphasis on Social where is the best use of effort? Getting Likes, Getting Shares only Twitter and Facebook and Google+?
Reporting & Analytics | | underthesun8080