I have a problem with google analytics code when i try to count how many times, clicked a specific button, on my wordpress site. To be more specific, on my website, i would like to count, with google analytics, how many times someones click specifics buttons.
So the steps i followed for doing this were:
inserted this code:
inside of buttons tags, which i would like to count.
Created a goal event in google analytics, which in "goal details" in analytics, i inserted these values
for "Category"-Form
for "Action"-Button
for "Label"-Business Strategy.
When i saved both of them, in the beginning, google analytics counted how many times click the specific button, but after a while stopped the count.
I would like to ask, i had made anything wrong with the code and how to resolve this problem?
You can see how many times the button has been clicked from the report 'Behavior -> Events -> Top Events' under column 'Total events'.
The goal instead counts the sessions that triggered that event, so if an user in a session clicks 5 times on the button you will get 5 total events but only one goal (also intended as a unique event).
Related
I need some help with Google Tag Manager and Google Analytics.
I want to send a pageview to Google Analytics if a user is viewing an image in a gallery on an article. The user is staying on the same URL, when he is viewing an image.
I created a trigger group which consists of two events
• Consent given by the user to use Google Analytics
• Event which is fired when an image in a gallery is being viewed
This works so far so good. Unfortunately, the trigger group is only being fired once on a page. When a user open the gallery and views the image and scrolls to next image, he is staying on the same URL. In that case, the trigger group is only being fired once.
How can I achieve that the trigger group is being fired multiple times on the same page without removing the second trigger (consent)?
I found out that I can create a second trigger group and add two image views and the consent as a trigger. But this solution means that I have to create 100 new tags, which is kind of crazy. Is there any workaround?
Thanks in advance
Once consent has been given by the user in a way that each pageview can pick up (e.g. you're setting it in some persisted state: data layer, cookie, etc.), you're ultimately just looking at triggering when the event happens.
Since you describe a scenario where it happens only once, I'd urge you to take a look at the other triggers on your tag and remove the page-specific trigger your description suggests you have in place. Replace it with only your event and consent triggers and it should work every time an event is observed.
I'm receiving data from my GA, but it can be viewed only under the real-time reports events tab. But where GA stores these events? I mean where GA saves all received events? Is it possible to view for example events for several past days or several past months?
in the sidebar choose "all events" and select the event you are looking for.
you change the time interval on the top left of the page.
How to do event tracking and send data to Google Analytics without creating a Goal in Google Analytics.
e.g. If I have 6 image links on the homepage, I want to do event tracking and send data to GA that how many people clicked on which image/category. But don't want to create goal for it.
As long as there is tracking code attached to your image, you can see events at Google Analytics at Behaviour -> Event -> Top Events, there you will be able to see reports by event category / event label / event action. You don't need a goal to achieve so.
For example, if I have a news page that's already being tracked via GA and I add a javascript event to capture clicks on a specific link to the news page (e.g. navigation) am I then 'double counting'?
If a fake pageview is not beneficial in this situation, and from your description that you're looking to track an engagement click on your page, use Event Tracking instead of Pageviews.
Tracking a click/event is easy (especially if you're already using Javascript). The best part is that this event is not considered a page view, keeping those stats safe.
The implementation is simple and allows for quite a bit of customization:
_trackEvent(category, action, opt_label, opt_value)
Below is an example of a link that's been encoded with an event tag:
Play
Here's the Google Analytics resource page on Event Tagging:
http://code.google.com/apis/analytics/docs/tracking/eventTrackerGuide.html
Well it's not a real page view, but Google Analytics thinks that it is--i.e., it shows up in your pageview counts.
Fortunately, it's easy to filter those so they don't contaminate your pageview data.
So for instance,
_gaq.push(['_trackPageview', 'unique_virtual_pagename']);
So in your GA Browser, you'll see the number of clicks actually shown as the number of pageviews of *unique_virtual_pagename*, which is not good.
There are a two ways to fix this (that i am aware of): (i) set a temporary filter at the bottom of the pageview table; or (ii) set a persistent (c*ustom*) filter in your Admin Panel (which i think is best) to remove pageviews having only the name *unique_virtual_pagename*, or whatever name you've chosen. This will of course take up to 24 hours to set, so the best plan is to set the filter first, then add the javascript to your page. so the filter is active when you begin collecting clicks.
But that just solves the problem of disaggregating these virtual pageviews from your real pageviews, you still need a way to count/record them.
I prefer to create a separate profile in these cases. So first, i filter the virtual pageviews from my actual pageviews using a custom filter, then i create a new profile which has another filter excluding everything but these virtual pageviews. I usually give that profile a name based on the event.
What you're doing is registering what's called a 'virtual page view'. To GA it's seen as a real page view and shows up in your content report's and page view counts etc. This is often useful if you want to show a page view for media that GA can't track. It's also commonly used to count an event, such as a button click, as a goal conversion.
If you just want to record the event and not count a page view you should look at using GA event tracking instead.
A mortgage page on our website is accesible by multiple links on one page. In order to determine which of the links on that same page has been clicked on, I use event tracking. All events for these links are being stored under the category: "mortgage"
When I look at the total number of pageviews for this mortgage page and the total number of events for the event category "mortgage", the number of pageviews is 10%-20% higher.
My questions are:
Can I compare pageviews and events?
If not, why not?
Thanks,
Aart Nicolai (funda.nl)
You can create a report.
Create a new custom report
In the Metric Groups, select metrics: "visits" and "Pageviews"
In Dimension, select "event category", "event action", and "event label"
The 10%-20% that your seeing are people that are viewing the page and not clicking the link that you have the event on.
Comparing them is the best way to determine how well the site is performing in terms of enticing visitors to click on the link.
Incidentally, within Google Analytics, you can add the Page dimension to your Events reports to get a breakdown of which page the user was on when the event occurred. This is especially useful if you have similar events on different pages of the site.