3

So i have this little dilemma with Google Analytics, i want to record every times someone hits a specific content which is loaded in Javascript.

User -> Condition [not met] -> show message -> Trigger Analytics.

User -> Condition [met] -> don't show message -> Don't Trigger Analytics.

But the nature of the content is dynamic, so by virtue of it would be to trigger a Pageview Event based on a virtual path.

But this will inflate my pageview count thus i will need to create/edit views and exclude this criteria.

Now with dimensions i can trigger the same message and i probably can get more out of my data in terms of what kind of flow the user did until he met the condition that would trigger the event.

Maybe i'm over complicating things and i should keep to event for more generality, but what do you guys think?

2

But this will inflate my pageview count thus i will need to create/edit views and exclude this criteria.

The best way to handle this use-case to to submit your event as a non-interactive event in Google Analytics.

Firing an interactive event on a pageview is a bad idea as it will count as an interaction on your website - meaning that you will have a bounce rate of 0%.

Dimensions could also be used if your event is specific to a state the user is in i.e. has an account but for an interaction point it is better to use events i.e. logs in.

If you are doing behaviour-driven state management, than it might be better to use Custom Dimensions to better segment you data and user-behaviour - though non-interactive events can be done just as effectively with the right segmentation and user filters.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.