Tracking an event to a referrer in Google Analytics - google-analytics

A site I'm working on is tracking Google Analytics events that always have a direct referral URL that is internal to our site. What would be good practice to link the event to the originating referral URL?
An example use case is:
User is on facebook -> Click through to our site -> Pageview -> Pageview -> EVENT
In this case the referral is considered direct but the traffic originated from facebook.
How do I make sure that the event's referrer is facebook in this case? So that when I look at goal conversion rates for my event, site visits that began with a referral from facebook and end in my event will count as goal conversions? And that this works for any referrer?

This can be achieved using a Custom Report.
Here is a template to get you started. Simply load this URL when you have Google Analytics open: https://www.google.com/analytics/web/template?uid=TGYsmF8ZT8Cthzq-9We9Yg
In a nutshell, I've defined the metric as unique events (that's what will be measured), and added Event Action as the default dimension. You can also filter by a specific Event, and add other Event data (label, category, value) as secondary dimensions.
Hope this helps!

Related

Using Google Tag Manager to track conversions in Google Analytics

I have managed to set up Google Tag Manager to fire off events to Google Analytics when links are clicked on different pages of my websites. I know it works as when I click the links, an alert shows up in Real Time --> Events section of Google Analytics.
I was wondering how to implement the following: For each page on my site I would like to see in Google Analytics the conversion which I define to be: Number of Relevant Links clicked on Page / Number of visits to Page. The numerator in this instance being whatever came from Google Tag Manager.
Thank you.
You are tacking about metric, not conversion. For conversion tracking you have to define exact value.
To track such metric you can use calculated metric with a formula X/Pageviews, where X is can be number of events (link clicks in your case).

show event label with referral path in google analytics

Is it possible to somehow connect/pass event variables (label, etc.) from referring site to referred site? I own both sites. I would like to create a report that shows url where the click was made and also what kind of event the link belongs to.
Thank you for any help.
Yes you can pass referrer in event label
But in GA there exist dimensions that can show you referrers for events
Full Referrer
https://developers.google.com/analytics/devguides/reporting/core/dimsmets#view=detail&group=traffic_sources&jump=ga_fullreferrer
&
Referral Path
https://developers.google.com/analytics/devguides/reporting/core/dimsmets#view=detail&group=traffic_sources&jump=ga_referralpath

Do Google Analytics goals, events, or transactions trigger a pageview?

If I programmatically trigger a goal, event, or a ecommerce transaction on a certain page, does Google Analytics register a page view on the page? (which would show up under Behavior > All Pages for example)
With goals it's actually the other way round - a pageview might be defined as a destinantion goal, i.e. the pageview triggers the goal. However the goal is not a pageview by itself, especially since it only exists in the view configuration.
Events and transaction won't show up as pageviews, either - but then thinking in pageviews does not always make sense. It's much better to think of "interactions", people doing something with your page. So an event will not show up in the page content section of your report, but it is still an interaction that shows up in the behaviour/events report and may e.g. have influence on your bouncerate. PLus any interaction will count towards your hit quota (free version of GA is limited to 10mio user interactions per month).
Google Analytics will only trigger a pageview in the following two conditions:
A page view is registered whenever one of the pages on a traditional web site is visited. In other words, if a user takes an action that causes the browser to refresh, a pageview will be counted. Take note, this does not count for single-page (ajax) applications.
Additionally, a page view can be manually triggered by issuing ga('send', 'pageview'); using analytics.js. You can attach this code to nearly any sort of event (including ecommerce transactions).
A pageview will not be registered otherwise.
Read about analyics.js here.

Google Analytics Custom Tracking

For marketing purposes, if a link to our company website is posted on a page on an external website. Is it possible to track the time in which the user landed on the external website and clicked on the link to our company website, using custom tracking ?
I have been reading about custom GA tags however am having a hard time understanding how to make the above possible.
Thanks in advance!
You cannot track an external website, as you can only track sites where you control the tracking code.
If you have control over the external site and have implemented analytics tracking there you would
create a timestamp on page load
add an onclick event handler to the link to your site
in the callback function for that link create another timestamp, substract the original timestamp to get a duration
send a user timing call:
ga('send', 'timing', 'Link', 'Duration to click', duration);
Where the "duration" parameter would be replaced with your timestamp.
As I've said that would only work if you can run your own Google Analytics on the external site which does not seems very likely. Plus I have really no idea what you mean by "custom GA tags" (there are custom variables and custom dimensions/metrics, both of which will not help you here).
So basically the anwser is you can't, really.

Track foreign url using google analytics

I have a URL(https://www.mysite.com/tab/subtab/) that belongs to my website(https://www.mysite.com/). Clearly, to track clicks on this url, all I have to do is append the utm_source, utm_medium and utm_campaign parameters to it. Now, what I want to do is, track a url http://www.notmysite.com/tab/subtab/. This url is neither a part of my site, nor is it mentioned any where in my google analytics account, only the link is available for modification. If I append the utm_* params here, the "clicks" information goes to the http://www.notmysite.com website owner's GAQ account and not mine(obviously!). What parameters should be appended to this foreign url, so that I can track the clicks on it?
If this is not possible with google analytics, are there any other options?
Thanks
You will want to look into event tracking to track clicks on links.
https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide#Anatomy
Taking an example from Google's doc:
Click here
Any clicks on that link will now appear in Analytics under Content -> Events. Notice though how I added target="_blank" which is needed for ensure the accuracy of events for external links due to there not being enough time to send the data to Google. A workaround is to add a delay via javascript which is a better approach if you're tracking more clicks.

Resources