HI All,
Is there an easy way to get instances vs all occurrences (+ persisted values) for a given eVar or post_Evar? I only see how to get occurrences.
Any expertise or help downstream would be awesome.
Thanks.
In the data feeds every line is equal to one server call. So one row would equal one instance of an evar.
The "evar" column is populated when an evar fires, the "post_evar" column is populated when an evar fires or has a persisted value.
So if you want to count the number of times for it firing, look at the number of rows with the "evar" value, if you want to count all occurrences, count the "post_evar". I would do something like this
For evar instances (when it actually fires)
Select
evar,
count(distinct concat(post_visid_high,post_visid_low,visit_num,first_hit_time_gmt,visit_page_num) as evar_instances
from
data_feed_table
For evar occurrences (every time the value fires and/or persists)
Select
post_evar,
count(distinct concat(post_visid_high,post_visid_low,visit_num,first_hit_time_gmt,visit_page_num) as evar_occurrances
from
data_feed_table
These will show you all the instances/occurrences for each value in the evar or post_evar. The count and concatenation is what identifies a unique row/hit.
The Instances of an eVar are also passed in the event_list / post_event_list...
Instance of eVar1 is "100" in the event list.
100 Instance of eVar1
101 Instance of eVar2
102 Instance of eVar3
103 Instance of eVar4
104 Instance of eVar5
105 Instance of eVar6
106 Instance of eVar7
...
199 Instance of eVar100
10000 Instance of eVar101
10001 Instance of eVar102
10002 Instance of eVar103
This would probably be a lot easier than trying to replicate the logic with a count distinct....
Yeah, that's true about using the instances for when the evar actually fires.
But for the post_evar, even if you're using the post event list, the instances will only fire when the evar actually fires. So if you want occurrences for the evar, you still need to do a distinct count of the visit_page_num.
Yes, which is why I only referenced "instances" in my post... leaving your original occurrences logic.
@skatofiabah Did you find the suggestion helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!
Views
Replies
Total Likes