Search code examples
javascriptgoogle-analyticsgoogle-analytics-apisurvey

Collecting survey data with Custom dimensions and metrics in Google Analytics


I was wondering that is there anything that I should be concerned about when collecting survey data to Analytics?

It is a small 3-4 step survey that has structured questions. The purpose of this survey it to give better insight on how visitors feel about our site and perhaps to help analyze different contents.

I'm 100 % sure about on which level I should to collect the data: hit, session or user level.

EDIT: I just noticed that dimensions can only be sent with pageview. If I have survey with three questions it would mean +3 pageview for a single page. In a long run wouldn't it distort almost all data in collected to analytics?

And secondly, if I were to create a "virtual page" and e.g. separate them into own view then it could fit to all other data at session level but on page/hit level it wouldn't be possible.


Solution

  • First thing you need to be concerned about is privacy - structured question (yes/no, rating scales etc) should be fine. Do not use text input since users might enter personal data.

    For the scope it depends on your use case. I have implemented something like this for a "was this page helpful"-gadget, and that is obviously hit scope since it is supposed to tell me something about the content of that url.

    If you want to analyze user reactions to multiple subsequent pageviews you would use session scope. From your question it seems that this is what you want to do.

    User scope assumes that your users can only answer once and not change their minds (it is technically possible to overwrite user scope variables, but conceptually this is something that is set once).