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
-
Redirect our www.website.com to website. Com/target-keyword
Dear moz community I have been analyzing the websites that rank in top 20 for our target keywords. All of the top 20 sites except us have their websites re directing to websites.com/target keyword. This is due to probably because they have multiple city's and one of the target keywords term is cityname + word. My question is and idea - make a 301 to our www.website.com to /city-keyword and start linking to that page with new links. Would that bring any benefit? Seems that it's a very strong ranking signal. Any threats that I must take into account? We currently rank as #9
Technical SEO | | advertisingcloud0 -
Duplicate Page Content for www and non-www. Help!
Hi guys, having a bit of a tough time here... MOZ is reporting duplicate content for 21 pages on eagleplumbing.co.nz, however the reported duplicate is the www version of the page. For example: http://eagleplumbing.co.nz and http://www.eagleplumbing.co.nz are considered duplicates (see screenshot attached) Currently in search console I have just updated the non-www version to be set as the preferred version (I changed this back and forth twice today because I am confused!!!). Does anyone know what the correct course of action should be in this case? Things I have considered doing include: changing the preferred version to the www version in webmaster tools, setting up 301 redirects using a wordpress plugin called Eggplant 301 redirects. I have been doing some really awesome content creation and have created some good quality citations, so I think this is only thing that is eaffecting my rank. Any help would be greatly appreciated. view?usp=sharing
Technical SEO | | QRate0 -
SSL, www issue. Should we buy WWW license or just add redirect from www to non-www site?
Hi, We've installed SSL certificate (Symantec Safe Site).
Technical SEO | | Ryan_V
Now our site shows with https, but when someone types www before site name it leads to http and shows strikethrough https unsafe icon in the browser. As it appears, our SSL was purchased without www domain name license. Should we buy www license or just add redirect from www to without www site? If so how to set up this redirect properly. Thanks.0 -
No descripton on Google/Yahoo/Bing, updated robots.txt - what is the turnaround time or next step for visible results?
Hello, New to the MOZ community and thrilled to be learning alongside all of you! One of our clients' sites is currently showing a 'blocked' meta description due to an old robots.txt file (eg: A description for this result is not available because of this site's robots.txt) We have updated the site's robots.txt to allow all bots. The meta tag has also been updated in WordPress (via the SEO Yoast plugin) See image here of Google listing and site URL: http://imgur.com/46wajJw I have also ensured that the most recent robots.txt has been submitted via Google Webmaster Tools. When can we expect these results to update? Is there a step I may have overlooked? Thank you,
Technical SEO | | adamhdrb
Adam 46wajJw0 -
Google Analytics Annotation
Is there a way to add annotations to the GA visitors graph? There is a YouTube tutorial on how to do this but the comments suggest is has not be rolled out yet in the US and I can't get it to work. Best,
Technical SEO | | ChristopherGlaeser
Christopher0 -
Staging & Development areas should be not indexable (i.e. no followed/no index in meta robots etc)
Hi I take it if theres a staging or development area on a subdomain for a site, who's content is hence usually duplicate then this should not be indexable i.e. (no-indexed & nofollowed in metarobots) ? In order to prevent dupe content probs as well as non project related people seeing work in progress or finding accidentally in search engine listings ? Also if theres no such info in meta robots is there any other way it may have been made non-indexable, or at least dupe content prob removed by canonicalising the page to the equivalent page on the live site ? In the case in question i am finding it listed in serps when i search for the staging/dev area url, so i presume this needs urgent attention ? Cheers Dan
Technical SEO | | Dan-Lawrence0 -
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 -
Google plus
With Google search plus your world, would i see results ONLY from Google plus followers ? or from someone who is my facebook friend as well.
Technical SEO | | seoug_20050