Expand my Community achievements bar.

Join us January 15th for an AMA with Champion Achaia Walton, who will be talking about her article on Event-Based Reporting and Measuring Content Groups!
SOLVED

API request pageviews per product

Avatar

Level 1

Hello,
I want to make an Adobe Analytics API request for an e-commerce site to get the number of page views for each product in the e-commerce (there is already a "product" dimension in the Adobe Analytics, which is coming from the URLs.

The problem is that I don't want to include pageviews from pages which are "checkout" pages (can be identified easily as they contain the string "checkout" in the URL).

 

I can do this with a search filter, but then I have to include 2 dimensions and the request time increases exponentially and becomes unmanageable (I need to extract the pageviews for hundreds of thousands of products).

 

What would be the way to extract the pageviews per product excluding pageviews from checkout pages?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

You can try expanding your API request's conditions to exclude data where Page starts with "/checkout", since that seems to be the common pattern of pages that you want to exclude.

 


@oriolj62758098 wrote:

I am really surprised it takes so much time to just pull the data with two dimensions instead of one so that I could filter on the page name... Isn't there any workaround for this?

I don't agree with this sentiment. Using AA effectively requires not only knowing how the reporting end works, but also how the data collection works too. As I had mentioned, Product Views are tracked with the "prodView" event or when there is an s.products string without any events. Normally, this happens with product pages. But in your case, it looks like this is happening with checkout pages too.

So if you're finding it difficult to get the data that you want, then you have to look into how the data is collected in the first place. (You can't extract orange juice if you're harvesting lemons. )

View solution in original post

4 Replies

Avatar

Community Advisor

What if you used "Product Views" instead of Pageviews? Product Views are tracked either when there is a "prodView" event in the beacon, or there is a valid s.products without any corresponding events in the beacon. I guess this is how product view tracking has been implemented in your website. If so, then you can use that in your API request.

Avatar

Level 1

This was a good try because when using the dimension with name "Product Views" (id="productinstances") the pageviews on "/checkout/cart" pages are not being counted anymore. However, the pageviews on some other checkout pages (such as "/checkout/identification" and  "/checkout/shipping") are still added up to the total Product Views, so I don't think this exact solution is valid for my purpose of extracting the page views of the page of each product (without counting checkout pages).

I am really surprised it takes so much time to just pull the data with two dimensions instead of one so that I could filter on the page name... Isn't there any workaround for this?

The only alternative I would now see is to extract pageviews or Product Views at page level and then parse the page dimension to extract the product from there (the product code is in the page dimension).

Do you think there could be another more robust solution?


Avatar

Correct answer by
Community Advisor

You can try expanding your API request's conditions to exclude data where Page starts with "/checkout", since that seems to be the common pattern of pages that you want to exclude.

 


@oriolj62758098 wrote:

I am really surprised it takes so much time to just pull the data with two dimensions instead of one so that I could filter on the page name... Isn't there any workaround for this?

I don't agree with this sentiment. Using AA effectively requires not only knowing how the reporting end works, but also how the data collection works too. As I had mentioned, Product Views are tracked with the "prodView" event or when there is an s.products string without any events. Normally, this happens with product pages. But in your case, it looks like this is happening with checkout pages too.

So if you're finding it difficult to get the data that you want, then you have to look into how the data is collected in the first place. (You can't extract orange juice if you're harvesting lemons. )

Avatar

Employee Advisor

I agree with @yuhuisg to add a segment and just exclude hits where page contains "/checkout"