Follow up from http://www.seomoz.org/qa/discuss/52837/google-analytics
-
Ben,
I have a follow up question from our previous discussion at
http://www.seomoz.org/qa/discuss/52837/google-analytics
To summarize, to implement what we need, we need to do three things:
- add GA code to the Darden page
_gaq.push(['_setAccount', 'UA-12345-1']);_gaq.push(['_setAllowLinker', true]);_gaq.push(['_setDomainName', '.darden.virginia.edu']);_gaq.push(['_setAllowHash', false]);_gaq.push(['_trackPageview']);
- Change links on the Darden Page to look like
http://www.darden.virginia.edu/web/MBA-for-Executives/ and [https://darden-admissions.symplicity.com/applicant](<a href=)">Apply Now and make into [https://darden-admissions.symplicity.com/applicant](<a href=)" > onclick="_gaq.push(['_link', 'https://darden-admissions.symplicity.com/applicant']); return false;">Apply Now
- Have symplicity add this code.
_gaq.push(['_setAccount', 'UA-12345-1']);_gaq.push(['_setAllowLinker', true]);_gaq.push(['_setDomainName', '.symplicity.com']);_gaq.push(['_setAllowHash', false]);_gaq.push(['_trackPageview']);
Due to our CMS system, it does not allow the user to add onClick to the link. So, we CANNOT add part 2) What will be the result if we have only 1) and 3) implemented? Will the data still be fed to GA account 'UA-12345-1'? If not, how can we get cross domain tracking if we cannot change the link code?
Nick
-
Hi Nick,
I'm following up on older, unanswered questions here in Q&A. Did you ever get this sorted out?
-
I think that if you leave out part two, traffic from each site to the other will show up as referred. I'm not sure that there are any other consequences.
As for the jQuery stuff, I can't fault the logic, but I'm no web developer... sorry not to be more helpful.
-
Sergei,
I have put everything in place that I think I should. But, my results are not showing up in Google Analytics. Do you see anything wrong with
- The css on the "Apply Now" link at
http://www.darden.virginia.edu/web/MBA/Admissions/Home/
-
The code at http://www.darden.virginia.edu/web/js/gaq.js that is included works.
-
The code at https://darden-admissions.symplicity.com/ works.
Nothing comes up in Google Analytics content. What am I missing?
-
I will give it a try and get back to you.
-
Yes , this should work.
-
If I understand you correctly, I am hearing this.
Include a javascript file called replace_on_click.js which includes
$(document).ready(function{
$('.class_with_onclick').click(function(){
_gaq.push(['_link', 'https://darden-admissions.symplic...']); return false;
})
});Then in html
[https://darden-admissions.symplic...](<a class=)">Apply Now
Is this what you are saying?
-
You do not have to add onClick event to the link. You may try jQuery and its event binder, such as click(); in your case. Just assign specific classes to these links and do smth like this
$(document).ready(function{
$('.class_with_onclick').click(function(){
//your stuff goes here.
})
});
Sorry if am being too techy
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
-
Drupal, http/https, canonicals and Google Search Console
I’m fairly new in an in-house role and am currently rooting around our Drupal website to improve it as a whole. Right now on my radar is our use of http / https, canonicals, and our use of Google Search Console. Initial issues noticed: We serve http and https versions of all our pages Our canonical tags just refer back to the URL it sits on (apparently a default Drupal thing, which is not much use) We don’t actually have https properties added in Search Console/GA I’ve spoken with our IT agency who migrated our old site to the current site, who have recommended forcing all pages to https and setting canonicals to all https pages, which is fine in theory, but I don’t think it’s as simple as this, right? An old Moz post I found talked about running into issues with images/CSS/javascript referencing http – is there anything else to consider, especially from an SEO perspective? I’m assuming that the appropriate certificates are in place, as the secure version of the site works perfectly well. And on the last point – am I safe to assume we have just never tracked any traffic for the secure version of the site? 😞 Thanks John
Technical SEO | | joberts0 -
Website is not indexed in Google
Hi Guys, I have a problem with a website from a customer. His website is not indexed in Google (except for the homepage). I could not find anything that can possibly be the cause. I already checked the robots.txt, sitemap, and plugins on the website. In the HTML code i also couldn't find anything which makes indexing harder than usual. This is the website i am talking about: http://www.xxxx.nl/ (Dutch) The only thing that i am guessing now is the Google sandbox, but even that is quite unlikely. I hope you guys discover something i could not find! Thanks in advance 🙂
Technical SEO | | B.Great0 -
Non WWW. versus WWW. versions, current best practice ?
Hi Im increasingly seeing sites not using the www., but understand from various sources including seomoz that best practice is to be on the www. with the non www version 301'd to the www version. Since alot of sites are clearly doing this the other way round now is that better practice or the former still best ? I appreciate that non www version gives you 3 more characters for url's but apart from that is there any benefit over the www. version ? Cheers Dan
Technical SEO | | Dan-Lawrence0 -
Does http://my.dudamobile.com/ Effect SEO
Hi, Hope everyone is enjoying the new year! I was wondering if converting your desk top website to a mobile one, example via http://my.dudamobile.com/, has any negative effects on SEO. Did it effect your site? Do you recommend doing it? Does it effect links? When people link to your desk top URL does that authority carry to the mobile, or would it be better if they link to the mobile (m.website.com) URL? Is http://my.dudamobile.com/ a good choice? Any feedback, as always, is greatly appreciated! Thanks Jimmy
Technical SEO | | jimmy02250 -
Having www. and non www. links indexed
Hey guys, As the title states, the two versions of the website are indexed in Google. How should I proceed? Please also note that the links on the website are without the www. How should I proceed knowing that the client prefers to have the www. version indexed. Here are the steps that I have in mind right now: I set the preferred domain on GWMT as the one with www. I 301 redirect any non www. URL to the www. version. What are your thoughts? Should I 301 redirect the URL's? or is setting the preference on GWMT enough? Thanks.
Technical SEO | | BruLee0 -
Google Not Indexed WWW name
Here is my domain - http://www.plugnbuy.com . When i see through "site" google not showing with WWW index but the same when i do without WWW.. it is showing in search. So yesturday i changed the setting from GWM to preferred domain as a WWW appear but today still not showing anything... Please help..
Technical SEO | | mamuti0 -
Google support eTag?
Hello~ People! I have a questions regarding eTag. I know Google support If-Modified-HTTP-Header aka last modified header. I used eTag instead of last modified header. It seems like Google does support, yet here is my questions. code.google suggest as following. GData-Version: 2.0
Technical SEO | | Artience
ETag: "C0QBRXcycSp7ImA9WxRVFUk." but I used etag as following . ETag: "10cd712-eaae-b279a480" I didnt include "GData-Version: 2.0". is this mean Google may not support my etag?0 -
Why do I see dramatic differences in impressions between Google Webmaster Tools and Google Insights for Search?
Has anyone else noticed discrepancies between these tools? Take keyword A and keyword B. I've literally seen situations where A has 3 or 4 times the traffic as B in Google Webmaster Tools, but half the traffic of B in Google Insights for Search. What might be the reason for this discrepancy?
Technical SEO | | ir-seo-account0