We are trying to build certain metrics from the adobe raw files that we export through the data feed. We have been successful in calculating visits and page views. But when we try to apply logic that we have in a segment (Ex: page = x OR page = y) we don't seem to get the same number of visits we see in adobe analytics.
For Example: In adobe analytics, there's a segment called "Contact Us" and in the segment we have rules that include visit if page = x or prop1 = y
To calculate the same visits using adobe raw data feed, we use the following code, but it doesn't give us numbers that match when we see visits to that segment in adobe analytics:
SELECT count(distinct concat(post_vis_id_high,
post_vis_id_low,
CAST(visit_num AS VARCHAR),
CAST(visit_start_time_gmt AS VARCHAR)))Visits, date FROM "adobe_data_feed"
WHERE exclude_hit = 0
AND hit_source NOT IN (5,7,8,9))
AND (page = x OR post_prop1 = y)
group by date
order by date