I've searched high and low for an answer for this problem and need the help of experts.
The website I'm helping to oversee has a registration in a frame on their main website. When a user visits the site, they can choose which course to take and click on a "Register" link to be taken to the externally hosted form.
I was able to get the GA tags changed on the framed pages, so that step is done.
However, I realise that in order to properly cross-domain track with Google Analytics, I need to also add an onclick event to any links that bring users to those pages, such as the example below.
Link
However, the site I'm working with is in Wordpress, and when I view the link in there it looks like this:
[iab_event link="http://www.EXAMPLESITE.com/course/4105/register.asp" text="Register"]
And when you view the page source of the live site this link is translated to this:
Register
I tried adding the second onclick event to the one above, but that didn't work. Is there any way to add the onClick="pageTracker._link('http://www.EXAMPLESITE.com/course/4105/register.asp'); return false;" to this link without breaking it?
Thank you in advance for any advice given!
Try stacking them in the onclick event like this:
Register
It should run all of the commands as long as they're separated by semi-colons.
Related
I would like to use the google analytics visitors flow tool but it does not show any specific page. All visits are in one big block "/". If I click on "group details" pages are listed just fine.
My site uses url parameters like mypage.com?p=products to switch between pages. I have managed to set up analytics so that it understands this and works on the "content" page and everywhere. How can I make it also work with "visitors flow" to display specific pages?
this might be the same problem: Google Analytics: 100% Drop off from landing page
Just noticed that links on my page are missing the slash before the "?". will add the slash and report back.
Edit: Though I guess that was an improvement it did not solve the problem.
I am using absolute links (http:/mysite.com/?p=contact) all over the place. Should I try relative links to get this to work?
Yes, you need to put a / before the ? in your links or else Analytics could interpret your full URL as the domain/sub-domain and not report any page paths or levels (like you're observing).
Additionally, are you sure the Analytics script is firing whenever a new page is loaded? Clicking through your site it looks like the base page template may not be reloading whenever you click to a different page (only the content is reloaded). If this is the case and the Analytics script is part of your base template, it would only fire once when the visitor first enters the site and load the page template and never again. Since Google Analytics calculates pageviews and time on site/page based on the difference in time between when the _trackPageview() is fired, it could explain your problem.
I would suggest moving your Analytics script to a portion of the markup that is reloaded every time someone clicks to a new page to see if this does the trick.
Has anyone been able to use and see the Enhanced Link Attribution data in the In-Page Analytics interface of Google Analytics as per this document?
http://support.google.com/analytics/bin/answer.py?hl=en&answer=2558867
I've implemented this plugin and call and I can see the data being transferred to GA in my __utm.gif call however when viewing the In-page Analytics of the site, there is no difference. I still see the clicks being shown in an aggregated standard form.
I'm curious if there is a piece missing and I need to enable some Advanced Segment filters or something to view the information.
There is a thread on Google Groups where people shared similar experience with the implementation and my observations are the same:
http://productforums.google.com/forum/#!searchin/analytics/enhanced$20link$20attribution/analytics/-FuKG8ARAPY/t-crCmrGEHsJ
Any help or insight would be highly appreciated! Google seems to be on mute as usual.
To solve the problem, I had to manually put a unique 'id' attribute to each link tag pointing to the same URL that I wanted to distinguish. The scope is the page so you don't need to worry if the same IDs repeat on different pages, they just need to be unique per page.
I used a naming convention that allowed me to have unique IDs and not to worry about duplicity, unless there were two links to the same URL within a section (in my header I have the logo and the home navigation link go to the same URL).
For example, in my site template, all header links use id="header-...", all links in the footer use id="footer-...", and all links in the body of the page use id="body-...".
Example:
Home
<img src="/logo.gif" alt="logo" />
go to homepage
Homepage
This has made the percentage in GA show different values for the same URL, which solved the problem. Nothing else I tried in the settings, or initializing the enhanced attribution plugin, did not work.
This was just announced:
http://analytics.blogspot.co.il/2012/11/announcing-enhanced-link-attribution.html
You'll need to enable enhanced link attribution in the web property settings tab (within the Admin section), which is rolling out - you may see it only in a few days/weeks.
First : Go to Analytics. Click "Admin" in the top right for the selected web property. Property settings tab > In-Page Analytics heading > Use enhanced link attribution = Tick checkbox.
You might also want to narrow down the date window to the last few days when looking at the data (after allowing 24 hours for it to come in). If you don't do this, the link-attributed data might get diluted in the standard "last 30 days" window.
Using Google Analytics,
I am trying to track initiated from external site(siteA.com).
At siteA.com, open new window to go main site(siteB.com).
So I put setDomainName("none"), trackPageview, and getLinkerUrl(URL_TO_SiteB) on siteA.com.
And open URL returned from getLinkerUrl, open new window to go siteB.com
And also put setDomainName("none"), setAllowLinker(true), trackPageview on siteB.com.
But, I think something wrong with this configuration.
At navigation summary, there is no previous page or next page at page tracked from siteA.com.
And strange page(another page of siteB.com) is recorded as previous page of siteB.com.
Is there any missing part of configuration?
In short,
site A > site B linking is not working(there is no page having site A as previous page and there are strange pages used as previous page of site B).
I am struggling with this issue about a month.
I eagerly waiting for your help.
Thanks in advance.
The code you are using is for tracking iframes.
To setup cross domain tracking in the <a> of link to siteB add
onclick="_gaq.push(['_link', this.href]); return false;"
Complete details here
https://developers.google.com/analytics/devguides/collection/gajs/gaTrackingSite#multipleDomains
I need some help with the setup of tracking virtual clicks on a submit button. What I need to do is get the referring site, which Google already tracks, and then track if they click on the button. I have setup an onclick for the submit button and setup a goal in Analytics but it is not tracking. I do have the code in place for Analytics in my header to track pageviews.
So what I am trying to do right now with my goal is to track a referring website and then track who clicks on the button. The virtual view I am using for the click is:
onclick="pageTracker._trackPageview('/Orders/Subscription');"
Thank you for any help in getting this setup working. I am still working on learning analytics.
If you want to ...get the referring site, which Google already tracks at the time the user clicks the submit button, you will have to read the cookies (the _utmz in this case) that GA sets and extract it from there.
Referral data can be obtained from the reports in GA, but if you want it at the time of submit, you'll have to get it from the cookies. Plain vanilla javascript can do this for you, just google it. Or, use whatever language your pages are written in to extract the data from the cookie (PHP and many others have this capability).
Regarding tracking the virtual page view, if the user can submit your form by hitting the enter key, then onclick is not desirable. onsubmit in the form tag would be better.
If it is still not recording for you, make sure your goal steps are entered into GA correctly (it's quite common to mess this up and GA is not forgiving to even the slightest error) and that you are using the traditional tracking snippet in the head of your document because your example is in the traditional tracking format. You should not mix async and traditional snippets.
To check if GA is even tracking your virtual page, go to the Content, Top Content report and filter by your virtual page. If it's in there, then it's your goal tracking set up. If it's not in there, it's your virtual page tracking on the form itself.
HTH.
I have a page in ASP.NET C#, In my page I have iframe with another page. I want to add a Goal in Google analytics when people press the Submit-linkbutton in the framed page.
While my url doesnt change when I press the submit button I have heard that you can use the following javascript to tell Analytics that you´re on the specified page:
pageTracker._trackPageview('/booking.html');
So I have added the following line in the page_load function:
SubmitButton.Attributes.Add("onclick", "pageTracker._trackPageview('/booking.html');");
And in Google analytics have I added the goal url:
/booking.html
But nothing happends in the goal section when I press the submit button.
Im really not sure of what im doing so some help had been really appreciated.
Martin
Since iframes are treated as completely separate pages, I suspect you need to add the tracking code to the framed content as well.
You might also try calling a function in the parent page which triggers the page tracker:
SubmitButton.Attributes.Add("onclick", "parent.TrackPageView(window.location.href)");