I am building an e-commerce website where we display hundreds of products on a main page. I need to show to vendors total view count (impressions) for each product.
I can store each impression by using Google Tags API. I call the below code when the product image comes into view.
window.gtag('event', 'offer_view', {
'offer_id': offerID });
The events are registered at the Google analytics dashboard. However, I could not figure out a way retrieve event data using code. I need to display the impression count for each product to the vendors on my website. Is there a way to do this?