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.
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 using google analytics with google tag manager.
I created a "view_item_list" event. If i send my dummy data via datalayer to GA4 then the debug view shows to much items because the "item_list_name" and the "item_list_id" showen like a item (both items have the same value).
GA4 Debug view result
Datalayer from GTM
GTM Event
window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"view_item_list",ecommerce:{items:[{item_id:"TEST-1",item_name:"TEST-1",price:20,currency:"EUR"},{item_id:"TEST-2",item_name:"TEST-2",price:30,currency:"EUR"},{item_id:"TEST-3",item_name:"TEST-3",price:40,currency:"EUR"}],item_list_name:"Testlist 1",item_list_id:"testlist1"},user_login:"admin",user_id:1,user_role:"administrator"});
Have anyone an idea whats wrong?
I'm working on the site that sells subscriptions.
On /subscribe page, there's a list of available subscription plans, that I push to Analytics as product impressions on page load using dataLayer syntax. On clicking the plan, its details are shown, so it'd be natural to send "productClick" in click handler. This info is sent to GA, but then product details is shown on the same page, changing the location hash.
GA documentation gives the only example on how to track product details given page view, but we don't actually have one here. Is there a way to manually send product detail?
In addition, there's a user flow which involves showing the same /subscribe page in an iframe. I'd like product impressions to be sent to GA too, but, once again, when I push to parent.dataLayer, the data is not sent to GA.
Also, clicking on plan maps to addToCart event, so I'd like to send it as well, but somehow what goes through is only a "productClick". Is there a way to push both "productClick" and "addToCart" events at the same time?
"Is there a way to manually send product detail?"
You need an interaction hit to send the data with Google Analytics. Plus the data must be available before (or alongside) the GTM event (be it native or a custom event in the datalayer) is fired, since GTM updates its internal data structure from the datalayer variable when an event occurs.
In your case, since the location hash changes you might be able to use GTMs history change event handler (or you push a custom event with your product data) to fire a Google Analytics event that sends your e-commerce data. Conceivably you could event do a pageview with a virtual pagename if the content changes enough to warrant to be counted as a new page.
I have created a tag which fires when the click url contains certain words. When I view the website in GTM debug mode the tag is getting fired. But the event is not getting captured on Google Analytics Real Time Events.
The following is the screenshot of my tag and trigger.
Will the real time events in Google Analytics not show until I publish the changes in GTM?
What the possible problems you may have(as you are saying your tag is firing and IP was not filtered in GA:
Your tracking ID for GA is incorrect(or you are checking data in the wrong GA property): your tag config looks correct, so data should be sent to GA(as you are saying GTM trigger works fine);
Trigger name is hidden, but looks like trigger type is "Click". Make sense to check if option "Wait for tags" was enabled. If this option is disabled and after click user redirecting on another website page, GTM may not have enough time after click and before redirection to send data to GA. And your tag will fire, but data will not be received to GA.
I had the same problem. It ended up being a double up in the GA id. I had used a constant variable to define the GA property but not removed the ID itself.
Hi am using google analytics ga.js to track a button click event. It is working fine. However, i want to track the button click event for individual users in my site.(eg. karthik - 5, Richard - 7 etc ) Am using wordpress. How to achieve this?
There are ways track non PII user data using Google Analytics. This is an example of importing CRM user data, which you could use import the type of information you are looking for.
Basically you can send in a User Scoped Custom Dimensions which represents a user with the hit data,and then import a CSV to map that dimension to any other user scoped custom dimension.
I have find a solution for this. I have used event tracking to achieve this. I have used the following function in the click event of the button.
_gaq.push(['_trackEvent','button-category','Click','Clicked by the user:User id from my site ']);
In the label field i use the logged in user id from my site. Now, i can see the clicks of a particular user using his id under Behavior->Events->Pages->Your Page->Event Category->Event Action->Event Label. As username is personally identifiable info according to google, i didn't use username.