Google Analytics - Multipe Visits and Events - google-analytics

Can anyone please help me clarify below queries?
Including GA code two times in a same page cause double visitor counts?
Using below/event code directly on the page, does it creates an events directly in the GA portal? Or first do we have to create 'Video' as event first in the GA portal and then call this so that it will map itself?
Ex: _gaq.push(['_trackEvent', 'Videos', 'Play', 'Gone With the Wind']);
In google chrome extensions, while publishing it will asks for the GA id, and we provide, and if we keep main GA code in the extension pages(popup.html) too, then does it count as twice?

1. Including GA code two times in a same page cause double visitor counts?
If it's the same code pointing to the same account# and you aren't doing anything inbetween like deleting cookies, then no, it will not cause double visitor count. However, it will cause double page view count.
Using below/event code directly on the page, does it creates an events directly in the GA portal? Or first do we have to create 'Video' as event first in the GA portal and then call this so that it will map itself? Ex: _gaq.push(['_trackEvent', 'Videos', 'Play', 'Gone With the Wind']);
Traditional GA does not require you to do anything special in the interface for this. You should see "Video" show up as a value in the Category dimension automatically.
In google chrome extensions, while publishing it will asks for the GA id, and we provide, and if we keep main GA code in the extension pages(popup.html) too, then does it count as twice?
I think you may be confusing your Google Developer Account ID with the Account# associated with your google analytics account, but if your extension outputs GA code and there is also GA code on the page and it points to the same account, then yes, it will count some things twice (see your first question).
To be clear, every time a _trackPageview is invoked, a page view will be tracked. So if you have multiple calls to that then it will count multiple times. If the visitor cookie isn't reset or broken, it will count as the same visit(or).

Related

GTM - Virtual page views & Goals

We have a web site that already has GA page tracking and Goals set up to track conversion based on URLs, and these are working fine via GTM & GA.
We want to introduce a new product and track it via a separate goal/funnel.
Problem is the pages stay the same, so there isn't any change in the URL to differentiate when a customer has selected this product.
Our flow is as follows:
/Price
/Up-sell
/Summary
/Payment
/PaymentComplete
The customer selects the product on the Price page.
In order to get the Goals to track for this new product I've created a series of virtual page views that are triggered when the product is clicked and persist on subsequent pages.
So the URLs within GA now look like:
/Virtual/Price
/Virtual/Up-sell
/Virtual/Summary
/Virtual/Payment
/Virtual/PaymentComplete
I can see the page views within GA fine.
When I create a new goal I base it off the /Virtual/ urls.
However, because GA is firing on each page by default I effectively get two URLs in GA the original URL, e.g. /Price AND /Virtual/Price this then causes issues tracking between pages in the funnel & goal.
What am I doing wrong here?
How does everyone else manage this scenario?
You can add exceptions to the GA trigger in GTM, add the URLs that you don’t want. Or, don’t fire the trigger that sends the virtual page.

Google Analytics: send Content Grouping without a pageview?

I am implementing Content Grouping on my Wordpress website using the tracking code method.
I understand from the official documentation that the tracking code should be inserted before a pageview, that is,
ga('set', 'contentGroup1', 'Blog')
alone won't fire but
ga('set', 'contentGroup1', 'Blog');
ga('send', 'pageview');
will. My question is:
Is there a way to send the grouping information without relying on a pageview?
I have tried sending an event rather than a pageview, but it didn't work.
I am asking because I am using a Wordpress plugin to inject the default GA tracking code, and I would like not to mess with it.
Thank you for your time!
Content groupings can be applied to events, and not just pageviews. When you send in an event hit, you can go to the Events > Pages reports to see if a particular page associated with an event falls into a specific content grouping.
One of the caveats is that the content groupings report under Site Content > All Pages report is different from the Events > Pages report. The former categorizes only pageviews, whereas the latter categorizes pages associated with an event.
Note that if you use the 'set' method to set the content group as you've done before the pageview hit, all subsequent hits for the page (events, pageviews, transactions, etc.) will be associated with the specified content group (ie. "Blog").

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.

Google analytics to track impressions/views?

I have a site that lists business listings from a database. On each page you can do different things such as forward it to a friend, print the page etc. My question is could I use google analytics to track impressions and views for each listing? So if I showed the top 10 listings on the home page I want to track each listing as an impression since its being showed, then if they click one of the links to view the business listing it tracks it as a view. Then on the business listing details page if they do any of the actions such as forward to a friend or print the page I want to track that as well.
For tracking views/clicks Im assuming I would need to use setPageView passing something like setPageView('/listing/12345') correct? I dont know how to track it for impressions though. Then on the listing details page to track if they printed it etc Im assuming I would track it as an event? Such as trackEvent('listing', 'Print') if that is what I need to do for event how does it associate with the page tracking so that I could see how many times someone printed the listing page for /listings/12345?
No need to create fake page views. Google Analytics has a feature called Event Tracking, which is described in the Event Tracking Guide. The guide has an illustrative example;
A simple example illustrates how you might use the Event Tracking method
to record user interaction with a video Play link on your page. It
assumes that pageTracker is the name used for your tracking object.
Play
In this scenario, the reports for Events would display Videos as the Category,
Play as the Action, and Baby's First Birthday as the Label.
In your case, you would track Views and Clicks using the Event Tracking feature. You'd have to decide on how you'd want Actions, Categories and Labels set up to match your data. You might want package types (Gold, Silver etc) as Categories or Labels, for example.
This question and its answers are similar to your scenario.

Resources