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
-
Change Phone Number Based on Traffic Source + Ping URL for Call Tracking Number
Hi Everyone, Is there a tool that can change the phone number on a web page based on the visitor source (i.e., direct, organic, paid, etc.)? I'd like to implement a solution like this with different call tracking numbers based on the visitor source. We use the Google suite for our analytics (GA, GTM, Google Data Studio, Google Optimize is also an option as well). - Also, is there a good call tracking service that will ping a URL each time the phone number is called so that we can track these calls as events in GA? The majority of our visitors use a desktop PC and dial in the number on the screen rather than clicking (tapping) on it from a mobile device. Thanks, Andy
Reporting & Analytics | | AndyRCWRCM0 -
Tracking specific path and referral for unique session
Happy Monday everyone! We recently received a unique lead on our site and I was wondering if there was anyway to pinpoint the exact behavior flow and/or specific referral source they came from on Google Analytics. I know you can view the general behavior flow for all or segmented users based on what pages they viewed, but I wanted to see if I can track by unique sessions to see where this person exactly found us. Any insight is appreciated! Thanks
Reporting & Analytics | | KathleenDC0 -
Need help with my "ghost" blog...
...when I fired my original web designer, did they sabotage coding? I have never checked my Alexa/Google Analytics, or any blog ranking until last night. Subsequently, I have spent the last 24 hours googling away, and finally joining MOZ b/c I'm desperate to find out WHY I'm not ranking. I've googled and found many answers to a problem directly opposite of mine: (How to increase traffic with a high ranking), but I already have quite a bit of traffic (via Wordpress Stats), but can not be found on any ranking system. So, fiddled with some NoFollow/NoIndex boxes in Genesis SEO settings thinking maybe when my domain name changed it messed everything up? Most the boxes HAD been checked, so I unchecked them all. Anyhow, basically signed up for the monthly service so i could ask this question on the forum. My site is hellowhitney.com **it's so weird---i have a LOT of organic direct hits coming directly to my blog (for instance a celebrity re-posted a post which gained a lot of traffic from Twitter to the page), but Google nor another ranking is seeing it. IN FACT, it stops any and all ranking data back to FEBRUARY 2016 when I changed my domain name from Myscriptedreality.com to HelloWhitney.com Ignorance is NOT bliss in this case--would appreciate any help! #ForeverGrateful
Reporting & Analytics | | hellowhitney0 -
Event Tracking on GTM 2.0
I have created new account in google tag manager 2.0 Now can any body help me how to track event in GTM 2.0? Like example this is the site - flipkart(dot)com if you little bit scroll down then there is 3 tab ( pfa of snapshot) - 1) new arrivals 2) Men's Bestsellers 3) Women's Bestsellers. So i want to know that if anyone click on tabs or button given above then 1) what steps to do in tag manager then 2) what changes i have to update on my site and 3) where to check in google analytic on which tab visitor has clicked. Please tell me tracking and code for only above given 3 buttons. As on web i am very confused looking lots of post. Your inputs very valuable to me.......................bkmitesh thESmOe
Reporting & Analytics | | bkmitesh0 -
Virtual Pageviews vs. Destination URL for Goal tracking
I am working on setting up goal tracking. Currently when we receive a new signup, the person gets sent to their dashboard homepage and this is not a valuable a goal tracking destination. My suggestion was to build a "Welcome" interstitial page to send a user to when they create an account. Our tech team suggested using a Virtual pageview instead as it is their thinking that a "Welcome" page adds little value. Is there any downside to using Virtual Pageviews with regards to goal tracking?
Reporting & Analytics | | Vacatia_SEO
Are interstitial page more reliable?
Can you still use funnel visualization with Virtual Pageviews?0 -
Cross Domain Tracking in GA (without cross domain links)
Hi everyone, Been doing some research about cross-domain tracking in Google Analytics (preferably Universal Analytics where documentation is a bit spare). All of the tutorials focus on the auto-linking and ensuring links to the other site are taken care of. I'm considering a site that may not cross-link like that at all (or it may, but won't be the main avenue). A good example is: www.gap.com
Reporting & Analytics | | ketanmv
www.bananarepublic.com
www.oldnavy.com Now, they do link to the other brands in their navigation but let's pretend that they don't necessarily do that. Gap Corporate may want to roll up all these domains into a single reporting profile because customers can clearly visit any of those sites on their own and buy. It would be nice to know that Visitor X bought 2 items from gap.com and 3 from oldnavy.com... and of course, here were their campaigns, etc. From what I am reading, I am not sure this is really possible. It seems that the cross-domain code is really only best for when my main site links to another domain for checkout or something. But in my example, we are definitely not in control of that kind of behavior. Thoughts? Perhaps I need to recommend they go with subdomains only which Universal GA seems to handle quite fine out of the box. Thank you!0 -
Is there any web analytics tool that let us track number of outgoing clicks (and visits) ?
I just wonder if we can measure outgoing visits from a specific URL with an online tool or not?
Reporting & Analytics | | merkal20050 -
What's the best way to track moble traffic / sales from a subdomain in Google Analytics?
Hello, I've been trying to figure out the best way to track traffic and sales for a subdomain mobile site and would appreciate any feedback or guidance. I've set up an advanced segment but have found that I'm not able to source traffic since the segments get disabled when trying to view top content pages. I've also setup an additional sub-profile under the main domain profile in google analytics and have set up an advanced filter using the following guildelines http://code.google.com/apis/analytics/docs/tracking/gaTrackingSite.html In the Profile Settings page, click the Add Filter link. Choose Add New Filter and provide the filter a name. Choose Custom Filter and select Advanced on the Filter type settings. Under Advanced settings: FieldA should be set to Hostname FieldB should be set to Request URI Set the values for both Field A and Field B to (.*), which is an expression that captures all characters. Set the Output To --> Constructor option to Request URI and provide $A1$B1 as the value for that choice. I'm unsure if I've set up the profile / filter correctly, the traffic stats are different than the segment. The mobile profile is also tracking all ecommerce transactions instead of just mobile. Here's the code I have in place. we're using the Traditional code Thanks, Jamie
Reporting & Analytics | | marketing_zoovy.com0