Duplicate pageview after implementing ecommerce

Wouldn’t this cause a page view duplicate? One page view with the init/config tag, and another after product view? Seems like a very clumsy implementation of product view

I moved your message to a separate topic.

It all depends on the configuration and what you want to achieve. Right now I can see 2 page views, from which one has some ecommerce data stored as custom dimensions.

Hi Kuba, thanks for the swift reply :slight_smile:
So I am trying to set up ecommerce for a client as a replacement of GA4 client side. And I stumbled upon SetEcommerceView which would act as your alternative for GA4s view_item if I am not mistaken.

When I set the ppms.js using the piwik tag in GTM it also fires a page_view, and if I am not mistaken using SetEcommerceView will not work before the config/ppms.js-tag has been fired? Otherwise I’d get _paq is not defined.

So how would I be able to send this product info with the first page_view sent from the intial config on page load then?

Hi @falkenburger,
You could declare the _paq array first (please see the example below) and then use the setEcommerceView method. If you run it before the page view, you should achieve the desired result.

var _paq = _paq || [];

Another aproach could be using custom events to capture product impression information instead of the discussed method.

Please let me know if the above helps.

Thank you for your suggestion! I’ll give it a try :slight_smile: