I defined a custom event and am logging it as follows:
Analytics.logEvent("upload_art", parameters: ["size": ((art.size ?? 0) / 1000000)])
I am seeing the event propogate into the console after 24 hours, but I don't see any reporting on the custom parameter size. I'd like to be able to see reporting on this and an average. How do I set this up? In older blog posts from the firebase team, it seems as though I should be able to see this in the console but my console looks like this:
(I am seeing that "size" is being correctly logged in the debug view.)
I have been logging my event clicks, which seem to show up but I can't seem to find parameters anywhere in the Firebase Console. All I see is:
Events with custom reporting parameters will show up here
Here is how I am adding parameters:
var map = {'label': value};
_analytics.logEvent(name: 'session_button', parameters: map);
I can see session_button showing up in my console, just no data for the event parameters. Am I missing anything?
You don't seem to have any error in your code.
In the events tab of the Firebase Analytics console you have to click the three vertical dots on the right of your session_button event and do Edit parameter reporting. From there you can add the parameter that you want. Your custom label parameter should be on that list assuming the event has been triggered at some point. Following this your parameters should show up in other views.
Is it possible to push custom channel group into Google analytics in a similar way as events? For events I use this code:
_gaq.push(['_trackEvent', 'Popup - displayed', 'Popup displayed - Popup Id 5', 'This is popup title']);
Now I want to push new custom channel group Popup displayed each time user get served popup so I can compare results with Organic search without popup, Direct traffic without popup with organic search with popup.
I would like to accomplish something like this:
Tnx!
With the current Google Analytics version you could use a set call with your tracker object to overwrite campaign data and then create a custom channel definition that matches your custom data:
trackers = ga.getAll();
tracker = trackers[0];
tracker.set('campaignMedium', 'withPopup');
No idea how you would do this with your version of Analytics which is deprecated. Also this may have side effects (like loosing the original campaign data).
However you may simply create two segments, one for users who have seen the event and those who have not. Since you can select multiple segments this allows for a comparison without changing anything in the code.
I'm using the Google Analytics Measurement Protocol to register events with HTTP requests. I'm building this for a Roku app I'm working on. The events are getting sent and registered, but it seems the custom dimensions aren't working.
Here's what I'm sending
Destination URL:
https://ssl.google-analytics.com/collect
POST body:
v=1 // version
&dh=www.my-site.com // document hostname
&tid=UA-XXXXXXXX-X // Tracking ID / Property ID
&uid=(a user id) // user id
&cid=(an assigned UUID) // Anonymous Client ID
&sr=1280x720 // screen resolution of the tv
&t=event // Event hit type
&ec=ExampleCategory // Event Category. Required
&ea=ExampleAction // Event Action. Required
&el=ExampleLabel // Event label
&cd1=WAAA // Custom dimension 1, Station
&cd2=(some id) // Custom dimension 2, User ID
&z=1432199801 // Cache buster
When I go to Behavior > Events > Top Events in Google Analytics and set the secondary dimension as being Station for instance, none of the events show up. The events show up when I take off the secondary dimension though, so it seems like Google Analytics just isn't liking something about the custom definitions.
I've tried waiting 24 hours to see if there's a time delay problem, but that didn't help.
I've also made sure to turn on the custom definitions and set them to "Hit" scope type from the Admin panel in Analytics as well.
When I submit the above to https://ssl.google-analytics.com/debug/collect (the validation server that returns errors if there's something wrong with the request), it says the request is valid.
Any idea what could be going on here?
Thanks for the help!
our marketing consultant has asked me to help with configuring google analytics to setup Goal Tracking for User Signups... from what I've read this is accomplished by assigning the URL of the page the user is directed to after a successful signup to the Goal you are trying to track.
but what if the URL your user is directed to is a URL they regularly visit? e.g. after signing up they are directed to their profile page - which is the same page they visit every time they login. is there some way to configure a referer to go with the goal URL so that it is the pair of them that define the goal? e.g. user visits /profile and is referred by /signup.
further complication: what if after signup the user is directed to a different page depending on the user type? it would be nice to configure a single Goal with multiple URLs (but still using the referer restriction described above).
an alternative would be to use an event... if the server creates a user then it could signal the view to output the javascript code that generates the appropriate event.
or... is there a way for server-side code to send events to google analytics? is there an api?
If your users are directed to is a URL they regularly visit you can make a conditional statement for the goal occasion with a virtual pageview, have a look at this: http://services.google.com/analytics/breeze/en/et_vps/index.html
If after signup the user is directed to a different page depending on the user type, you can use regular expressions to set goal URL pattern, like this ^user./login./(type1|type2|type3)/$, look here for more info: http://services.google.com/analytics/breeze/en/regex_ga/index.html
I came across this question in google and believe I found a more appropriate answer.
Google Analytics now provide a service called Analytics Measurement Protocol.
This will allow you to send server-side requests to track your users activities in your analytics account.
To track a sign up event as mentioned in the question, the best way I can see would be to first create an event based goal in your account with the category set to 'users' and an action as 'sign_up' (you can optionally provide a label and value). Then in your code once a successful sign-up occurs (maybe when a user confirms their activation email link?), send a POST request to www.google-analytics.com/collect with the following payload:
v=1 // Version.
&tid=UA-XXXXX-Y // Tracking ID / Property ID.
&cid=555 // Anonymous Client ID.
&t=event // Event hit type
&ec=user // Event Category. Required.
&ea=sign_up // Event Action. Required.
&el=label // Event label.
&ev=1 // Event value.
A full list of the parameters and their meanings are defined here: https://developers.google.com/analytics/devguides/collection/protocol/v1/parameters
You could use an event that is triggered when the user submits the sign-up form :
onsubmit="_gaq.push(['_trackEvent', 'Category','Action','Label','Value']);"
and use the Category / Action / Label data model in Google Analytics to pass whatever data you need to pass, for example :
onsubmit="_gaq.push(['_trackEvent', 'Sign-up','Premium','6-month',6]);"
You then have to configure this Goal in Google Analytics as an Event, which lets you choose which combination of each of the fields Category / Action / Label / Value you want to use.
Another option, maybe less maintenance-heavy, is to use a query-string to identify people that get back to the Profile page after having just signed up. So instead of sending them back to /user/profile after they sign up, you send them back to /user/profile/?sign-up=true.
You will then be able to track these pages as a URL goal in GA using a Regular expression like :
\?sign-up=true
I wrote a helper function for tracking GA events.
function trackGoogleAnalyticsEvent(category, action, label) {
try {
ga('send', 'event', category, action, label);
} catch (e) {
console.warn('Google analytics error: ' + e);
}
}
Usage:
trackGoogleAnalyticsEvent('Signup', 'Signup Success', 'Facebook');