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
-
How to resolve warning of pages with redirect chain when its your http:// to https://www.
how do I write a 301 redirect in the htaccess file so that http:// goes straight to https://www. Moz replyEli profileHey there!Thanks for reaching out to us!
Technical SEO | | VelocityWebsites0 -
Http:// vs Https:// in Og:URL
Hi, Recently, we have migrated our website from http:// to https://. Now, every URL is in https:// and we have used 301 permanent redirection for redirecting OLD URL's to New Ones. We have planned to include http:// link in og:url instead of https:// due to some social share issues we are facing. My concern is, if Google finds the self http:// URL on every page of my blog, will Google gets confused with http and https:// as we are providing the old URL to Google for crawling. Please advice. Thanks
Technical SEO | | SameerBhatia0 -
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 -
WWW and Without WWW Backlinks
I have just seen through ahrefs and found without WWW have more backlinks instead of WWW. Is there any way to forward all those without WWW to WWW domain, is there any harm or effect in serp ranking?
Technical SEO | | chandubaba0 -
Why Google not picking My META Description? Google itself populate the description.. How to control this Search Snippets??
Why Google not picking My META Description? Google itself populate the description.. How to control this Search Snippets??
Technical SEO | | greyniumseo0 -
Do we need to manually submit a sitemap every time, or can we host it on our site as /sitemap and Google will see & crawl it?
I realized we don't have a sitemap in place, so we're going to get one built. Once we do, I'll submit it manually to Google via Webmaster tools. However, we have a very dynamic site with content constantly being added. Will I need to keep manually re-submitting the sitemap to Google? Or could we have the continually updating sitemap live on our site at /sitemap and the crawlers will just pick it up from there? I noticed this is what SEOmoz does at http://www.seomoz.org/sitemap.
Technical SEO | | askotzko0 -
Google webmaster tools
I have linked webmaster tools to Google analytics account. My question is where can i see Webmaster reports in Google analytics ?
Technical SEO | | seoug_20050 -
Tracking twitter traffic in Google Analytics
I would like to track twitter traffic to my account in GA. After going through the step in the help tutorial about how to do it, I managed to generate this url ( with the help of url builder ) http://twitter.com/UltraSEO?utm_source=Twitter&utm_medium=Social%2BMedia&utm_campaign=Ultraseo Now what should i do next ? Please help. How can i track visits to my twitter profile ?
Technical SEO | | seoug_20050