Dollique
Dollique

Reputation: 1012

Google Analytics: How to add 'seconds' to dimension?

In Google Analytics I have dimensions available for hours and minutes. Is there an easy way to also have seconds?

I know that I could do custom dimensions, but I don't want to change my tracking code if possible.

Why I want this: I search for the service provider (B2B customer) and want to track the steps (pages) a service provider did. I need this in chronological order and without seconds this is very inaccurate.

Upvotes: 1

Views: 1351

Answers (2)

Kemen Paulos Plaza
Kemen Paulos Plaza

Reputation: 1570

Inside Google Analytics this is not enable, but you can use code to extract this information from the computer (it's not the most accurate way because the second will based on the computer where the code is placed), but it can be an option for you

First you have to create a function to extract the second

function gaTime(){ 
var date = new Date;
return date.getSeconds();
}

and then use that on every desired hit, in this case, i used the code on the pageiew (you can replace this line for the one inside the main snippet placing the function before)

ga('send', 'pageview', {
  'dimensionxx':  gaTime()
});

Upvotes: 1

Linda Lawton - DaImTo
Linda Lawton - DaImTo

Reputation: 116868

Google Analytics does not offer agitation deeper then minute. You could technically do it yourself using a Custom Dimension. However this will not change the resulting data calculations.

there is currently an issue request for Ga:unixtime that might help with this but they have already stated that it wont aggregate down below minute.

Even if we are able to create this dimension the Analytics Reporting API only reports data in aggregate and as such the finest grain reporting would be minute

Upvotes: 0

Related Questions