How to Turn Google Analytics Into Your Own Rank Tracker Using Custom Variables
-
I followed the instructions here http://www.seomoz.org/blog/gettings-rankings-into-ga-using-custom-variables, but cannot see the report in Analytics under "Custom Variables".
As I dont know JS syntax, I assume the code is wrong. I just added dohertyjf's code under my normal tracking code. Can someone tell me if and where the error is?
| |
Much obliged!
-
yup, it works now. you're the best yannick! thanks a lot for helping me with this!
-
ok, i changed it. Thanks Yannick! I'll post in a couple of days if the tracking works now.
-
Your body tag is this:
<body id="page_bg" class="color_blue bg_blue width_fmax">
And should be:
<body id="page_bg" class="color_blue bg_blue width_fmax" onLoad="rankingsPush();">
-
It doesn't work in either new or old interface.
I've not added any other custom variables. I don't think I added any additional onLoad Code to the tag either (not sure what you're referring to though). You can find the site here: http://www.travelcostarica.nu/
-
Code isn't wrong.
Did you add this: onLoad="rankingsPush();" to the tag?
Using any other custom variables that might overwrite these? You checked in the new and old interface?
-
oh sorry, i indicated the wrong source! i am actually referring to the code from this article http://www.seomoz.org/blog/gettings-rankings-into-ga-using-custom-variables!
-
This, above the GA code snippet:
And this just in front of the snippet you posted:
Better to check the article again, because you're missing the essence of it working :)
-
which php-part? didnt notice that..
no, i just used exactly the code you see above.
-
Did you also use the PHP part of the code?
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
-
Google Analytics View Filters
Using the same GA property, I would like to set up three filtered views: 1. Tracking across one subdomain and one primary domain (example: shop.example.com & example.com) 2. Track only primary domain (example.com) 3. Track only subdomain (shop.example.com) Can this be achieved by using view filters? If so, how do they need to be set? Also, according to this article: https://moz.com/blog/cross-domain-subdomain-tracking-in-google-analytics, with cross domain tracking, I need to ignore self-referrals, which can only be done at the property level. If set up to ignore example.com referrals, will this cause problems with filter 2 and 3?
Reporting & Analytics | | Evan340 -
Google Analytics Stopped Tracking Visits - NEED HELP!
Hi Moz Community, I have about 10 sites, static HTML sites and WordPress sites, which ALL stopped tracking Google Analytics on August 2nd. They go to a flat-line! Dead! No data! Has anyone else experienced this either currently or before? I have confirmed all code is correct as it's been tracking these sites for years. One site gets 5,000+ visits a month and they are sitting at only 1,500 now and will be a fun conversation to have with the client. If all code is correct, what should I do? How do I overcome this without having to re-create another account/tracking ID? Never dealt with something like this before and there is not much on the web or in other forums. Would appreciate any help or advice or tips! - Patrick
Reporting & Analytics | | WhiteboardCreations0 -
Google Analytics Set-Up for site with both http & https pages
We have a client that migrated to https last September. The site uses canonicals pointing to the https version. The client IT team is reluctant to put 301 redirects from the non-secure to the secure and we are not sure why they object. We ran a screaming frog report and it is showing both URLs for the same page (http and https). The non-secure version has a canonical pointing to the secure version. For every secure page there is a non-secure version in ScreamingFrog so Google must be ignoring the canonical and still indexing the page however, when we run a site: we see that most URLs are the secure version. At that time we did not change the Google Analytics setup option to use: "https" instead of "http" BUT GA appears to be recording data correctly. Yesterday we set up a new profile and selected "https" but our question is: Does the GAnalytics http/https version make a difference if so, what difference is it?
Reporting & Analytics | | RosemaryB1 -
Google Analytics Events that lead to Goals (conversions)
Hello! I'm in the process of setting up Events in Google Analytics to track the performance of banner ads on our site. While that will take care of the action performed by the visitor (i.e. the click on the banner), it doesn't tell me if the visitor ultimately completed the form where the banner ad directs them (which is set up as one of out site's Goals). Once the Event is in place, will I be able to track the Goal conversions that it leads to? It's nice that Events will tell me which banner drove someone to the form, but if I'm not able to see if that Event led to a Goal conversion it seems like something will be missing. So, is this something that's already available within Goals or Events reporting, or is there an additional step I need to take? Thanks in advance for your feedback! Erik
Reporting & Analytics | | SmileMoreSEO0 -
Google Analytics: Okay to change domain?
So, we are a long time user of GA and we're planning a domain change.
Reporting & Analytics | | jmueller0823
Does anyone know if I can 'change the domain' in GA so we don't lose our past data?
Thanks!0 -
Google Analytics Tracking Code Problems
I am having a problem with my Google Analytics tracking codes. The relevant GA tracking codes have been entered into the source code of certain sites I'm running campaigns on, but Google Analytics is still telling me that the tracking code hasn't been installed - yet it has. What could possibly be the problem here? I have checked that these sites don't run off multiple domains, and that the tracking code has been entered in the correct place within the source code - and yet I am still having problems with GA. Any suggestions?
Reporting & Analytics | | WebhouseISP0 -
Installing Google Analytics tracking code on Landing Pages
Hello, I have my landing pages located on a separated subdomain (LP.example.com). I've created a new property in Google Analytics for that subdomain. My question is: where do I have to place the GA tracking code ? in the header ? before I close the tag or before I close the tag ? I have another issue: I've placed the GA Tracking code on some pages in the way below:
Reporting & Analytics | | JonsonSwartz
in the body tag of that Landing page HTML Code I added this line:0 -
Google Analytics: Multi channel funnel
Hi 🙂 I have a little problem. In Multi-channel Funnel Overview I see 50 conversions from Paid Search (screenshot 1). But when I click on Assisted Conversion and then choose Paid Search, I see 31 Assisted Conversions and 32 Last Interaction Conversion. (screenshot 2) So my question is - why the number of converstions in overview (50) is different than number in Assisted Conversions (assisted or last interaction conversion, or both together)? Probably, the answer is so simply, but I can found out it! 🙂 thanks a lot. X6UihL7.png lCNsw4T.png
Reporting & Analytics | | visibilitysk0