# Issues with sGTM Piwik PRO tags

**URL:** <https://community.piwik.pro/t/issues-with-sgtm-piwik-pro-tags/4601>\
**Category:** Data collection and tags\
**Created:** [November 2, 2024, 7:36pm UTC](https://community.piwik.pro/t/issues-with-sgtm-piwik-pro-tags/4601 "2024-11-02T19:36:14Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Alin](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/alin/32/3870_2.png) [@Alin](https://community.piwik.pro/u/Alin)\
**Post date:** [November 2, 2024, 7:36pm UTC](https://community.piwik.pro/t/issues-with-sgtm-piwik-pro-tags/4601/1 "2024-11-02T19:36:14Z")

</div>

Hello,

I am new to Piwik PRO - core plan, just started to play with it and trying to get familiar with the tags, setup, etc.

I am using your official sGTM tag template with GA4 as a client. (I DONT have any Piwik tag on client-side, only on sGTM)  
I noticed that if I use “inherit from client” everything is ok, the only thing that I want to change is the Item sku since it automatically populate with item\_id instead of sku.

So, I tried to add in the Additional Parameters section (knowing that this will override inherited params) the “new” sku.  
Looking at the documentation I was unable to find the correct param for that, so I tried with “sku” and “product\_sku” (I found both in the documentation)  
Unfortunately this did not work.

Can you please give some guidance on that?

Also, I noticed that when I wanted to switch from “inherit from client” to select the specific ecomm event type, in piwik tracker debugger i get this error “Error message: Tracking parameter `e_t` has invalid value. unknown variant `product_detail_view`, expected one of `order`, `abandoned-cart`, `cart-update`, `product-detail-view`, `add-to-cart`, `remove-from-cart` at line 1 column 598”

Is pretty confusing for me to see inside the tag, in the drop down, “product\_detail\_view” with underscore since the correct event is with dashes.

So, again, I am new to piwik pro and maybe I am making some big mistakes, but I am here to learn.

Thanks!  
.

---

<div class="post-metadata">

**Author:** ![anthonybartczak](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/anthonybartczak/32/2430_2.png) [@anthonybartczak](https://community.piwik.pro/u/anthonybartczak)\
**Post date:** [November 4, 2024, 12:52pm UTC](https://community.piwik.pro/t/issues-with-sgtm-piwik-pro-tags/4601/2 "2024-11-04T12:52:25Z")

</div>

Hi @Alin!

1. The SKUs are usually nested inside the `ec_products` parameter. Each product is an array, so each parameter (like SKU) has its index. SKUs should be 1st in the array, so the index is 0.

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/5/5b2166c93186cd6217469af6750ff87c7b409d3f.png)

> **[Tracking HTTP API](https://developers.piwik.pro/en/latest/data_collection/api/http_api.html)**
>
> Tracking HTTP API collects events such as page views, custom events and content impressions. The data sent to this API will be processed and eventually appear in Analytics reports.

1. As for the event type issue - I’ll look into this. Thanks for letting us know.

---

<div class="post-metadata">

**Author:** ![Alin](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/alin/32/3870_2.png) [@Alin](https://community.piwik.pro/u/Alin)\
**Post date:** [November 4, 2024, 3:55pm UTC](https://community.piwik.pro/t/issues-with-sgtm-piwik-pro-tags/4601/3 "2024-11-04T15:55:28Z")

</div>

Hi, @anthonybartczak,

Thanks for your response.  
Here are some screens shots to make my problem clear.

This is Piwik Pro tag from sGTM.

 ![Screenshot 2024-11-04 at 17.30.28](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/e/e60cc5bec544bb0231a75d67088ba9d4cea671e2.png)

 ![Screenshot 2024-11-04 at 17.32.17](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/1/1ef38736c50ac002174f18cd9d01a0a048033ac6.png)

In Ecommerce seciton, for „Ecommerce Event Type” I have „Inherit from client”.  
I am trying to over-write the SKU param since in Tracker Debugger I get the ID instead of the SKU, as you can see below.

 ![Screenshot 2024-11-04 at 17.27.58](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/5/5dbcee52bdaedbb320534e3e0a531c0987e6995a.png)

This is what items contain on Event Data.

 ![Screenshot 2024-11-04 at 17.38.58](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/5/518d7412a00e451f8e6ab1c0f178911a342b9232.png)

So, inside the Piwik Pro tag, in Additional Parameters, what parameter name should I use for SKU?

Also, as you can see, I am trying the same with „brand”. Actually, there is a list where I can see these parameters for all the events?

This will be my first problem.  
Now, the second one, with switching from „Inherit from Client” to dedicated tags for each event…

 ![Screenshot 2024-11-04 at 17.49.27](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/1/12928de34b34033729c57c84c5744f64a0030742.png)  
(ignore the fact that the tag is paused)

As you can see I choose product\_detail\_view (so here is the issue with \_ and -) but I get an error in Tracket Debugger.

 ![Screenshot 2024-11-04 at 17.53.02](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/0/08a25a256c26466b2df7c6b492755374d034d5e8.png)

So, for the second question, what would be the best practice when I want to use dedicated tags for each event (so I am NOT using Inherit from Client) and where can I see the dedicated params for each event?

Thanks,  
Alin

---

<div class="post-metadata">

**Author:** ![anthonybartczak](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/anthonybartczak/32/2430_2.png) [@anthonybartczak](https://community.piwik.pro/u/anthonybartczak)\
**Post date:** [November 5, 2024, 11:58am UTC](https://community.piwik.pro/t/issues-with-sgtm-piwik-pro-tags/4601/4 "2024-11-05T11:58:53Z")

</div>

> [@Alin](#):
>
> I am trying to over-write the SKU param since in Tracker Debugger I get the ID instead of the SKU, as you can see below.

The Piwik PRO tag automatically converts GA4 `items` array to fit the Piwik PRO schema. Have you tried using a [transformation](https://www.simoahava.com/analytics/transformations-server-side-google-tag-manager/#augment-event) on the event data object provided by the GA4 client? You can also restrict it to the Piwik PRO tag I guess.

> [@Alin](#):
>
> Actually, there is a list where I can see these parameters for all the events?

Yep, here:

> [@anthonybartczak](#):
>
> ![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/5/5b2166c93186cd6217469af6750ff87c7b409d3f.png)
> 
> [Tracking HTTP API — Piwik PRO Analytics Suite 18.29 documentation](https://developers.piwik.pro/en/latest/data_collection/api/http_api.html)

> [@Alin](#):
>
> So, for the second question, what would be the best practice when I want to use dedicated tags for each event (so I am NOT using Inherit from Client) and where can I see the dedicated params for each event?

Looks like a bug, we’ll fix this. As for the documentation - use the same link I mention above. Search for parameters that start with `ec_`.

 ![image](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/e/e400d4f1a2bb83aeca7c06c63df258793b85ca70.png)

---

<div class="post-metadata">

**Author:** ![Alin](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/alin/32/3870_2.png) [@Alin](https://community.piwik.pro/u/Alin)\
**Post date:** [November 6, 2024, 9:07pm UTC](https://community.piwik.pro/t/issues-with-sgtm-piwik-pro-tags/4601/5 "2024-11-06T21:07:15Z")

</div>

Hei, @anthonybartczak

Problem is partially solved.

Using this transformation

 ![Screenshot 2024-11-06 at 23.01.37](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/d/d7656381ad826db29fa293ac046bf8c07b6ac7ab.png)  
I get the right result for view\_item event, meaning that SKU is used instead of item\_id.

But in case of a purchase/order event, obviously only the first item from the array will have SKU changed.  
Do you know a workaround for transforming arrays?

 ![Screenshot 2024-11-06 at 22.27.29](https://europe1.discourse-cdn.com/flex005/uploads/piwikpro/original/2X/2/2c848502e7d027f44adcaebff7819c8de938fa9c.png)

PS: if I need to use Transformation in order to modify some params, then the Additional Parameters section from the tag what will be used for? Can you give me please at least one use case so I better understand the difference between Transformations and Additional Parameters.

Thanks,  
Alin

---

<div class="post-metadata">

**Author:** ![mbaersch](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/mbaersch/32/35_2.png) [@mbaersch](https://community.piwik.pro/u/mbaersch)\
**Post date:** [November 6, 2024, 9:37pm UTC](https://community.piwik.pro/t/issues-with-sgtm-piwik-pro-tags/4601/6 "2024-11-06T21:37:27Z")

</div>

Hi,

this custom variable template should help you to re-map the whole items array: [Tag Manager Template Gallery](https://tagmanager.google.com/gallery/#/owners/Sogody/templates/array-map-gtm-template)

best  
Markus

---

<div class="post-metadata">

**Author:** ![Alin](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/alin/32/3870_2.png) [@Alin](https://community.piwik.pro/u/Alin)\
**Post date:** [November 7, 2024, 6:04am UTC](https://community.piwik.pro/t/issues-with-sgtm-piwik-pro-tags/4601/7 "2024-11-07T06:04:22Z")

</div>

Thanks, @mbaersch!

I will monitor to see how this solution will go. For now, everything looks good.

But, again, this is a temporary solution and only if I use „Inherit from client”.  
I will wait for a tag template update so I can properly use dedicated tags for each ecomm event.  
For me is still unclear how to use „Additional parameters” section inside the tag.

---

<div class="post-metadata">

**Author:** ![anthonybartczak](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/anthonybartczak/32/2430_2.png) [@anthonybartczak](https://community.piwik.pro/u/anthonybartczak)\
**Post date:** [November 7, 2024, 9:00am UTC](https://community.piwik.pro/t/issues-with-sgtm-piwik-pro-tags/4601/8 "2024-11-07T09:00:52Z")

</div>

> [@Alin](#):
>
> For me is still unclear how to use „Additional parameters” section inside the tag.

The SKU itself is not a parameter - it’s a part of a different parameter (`ec_products`). You could use `Additional parameters` to e.g. force anonymization (`uia=1`), enable device data anonymization (`dda=1`) or even change the mentioned SKU by changing `ec_products`. I just thought that transformations might be better in this case.

---

<div class="post-metadata">

**Author:** ![Alin](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/alin/32/3870_2.png) [@Alin](https://community.piwik.pro/u/Alin)\
**Post date:** [November 7, 2024, 10:23am UTC](https://community.piwik.pro/t/issues-with-sgtm-piwik-pro-tags/4601/9 "2024-11-07T10:23:40Z")

</div>

Thanks, @anthonybartczak, for your reponse.

Ok, got it related to Additional Params.  
But related to using dedicated tags for ecomm (so, NOT using Inherit from Client) I guess that I should wait for a tag template update, right?

Until then, can you please point me (in the documentation - cuz I was unable to find) what param should I send with an “order” event, let’s say?  
Maybe I have wrong expectations, but I was looking for smth like this

> **[Recommended events  |  Google Analytics  |  Google for...](https://developers.google.com/analytics/devguides/collection/ga4/reference/events?sjid=4402082607979193224-EU&client_type=gtm#purchase)**

Thanks,  
Alin

---

<div class="post-metadata">

**Author:** ![anthonybartczak](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/anthonybartczak/32/2430_2.png) [@anthonybartczak](https://community.piwik.pro/u/anthonybartczak)\
**Post date:** [November 7, 2024, 10:50am UTC](https://community.piwik.pro/t/issues-with-sgtm-piwik-pro-tags/4601/10 "2024-11-07T10:50:55Z")

</div>

> [@Alin](#):
>
> But related to using dedicated tags for ecomm (so, NOT using Inherit from Client) I guess that I should wait for a tag template update, right?

Yep, the code is ready and waiting for review

> <https://github.com/PiwikPRO/server-side-template-for-gtm-v2/pull/10>
>
> Fixed e-commerce event types (e\_t). E.g. from \`product\_detail\_view\` to \`product-…detail-view\`.

> [@Alin](#):
>
> Until then, can you please point me (in the documentation - cuz I was unable to find) what param should I send with an “order” event, let’s say?  
> Maybe I have wrong expectations, but I was looking for smth like this

You should be [looking at parameters](https://developers.piwik.pro/en/latest/data_collection/api/http_api.html) starting with `ec_`.

Also might be useful:

> ### **Step 16: Order completed**
> 
> If the `&idgoal `parameter is 0 and the `&ec_id` parameter is present, or the `&e_t` parameter has the value `'order'`, the event is marked as `Order completed`.

> **[What are events and how are they detected? | Piwik PRO help center](https://help.piwik.pro/support/questions/what-are-events-and-how-are-they-detected/#step-16:-order-completed)**
>
> An event is an action performed by a visitor on your site or app. This includes things like viewing a page, downloading a file or clicking a link. A single tracking request will typically result in a single event. However, there are cases where a...

Example of the parameters:

```auto
"e_t": "order",
"ec_id": "1",
"ec_products": "[["772","Product C",["Pyramid"],"25","1","TriangularTech","Blue"]]",
"ec_sh": "25",
"ec_tx": "1.81",
"idsite": "2c033ca9-3016-4537-be01-d556371b8fc3",
"pv_id": "32xliL",
"rec": "1",
"res": "2342x1317",
"revenue": "51.81",
"url": "https://ecommerce.demo.piwikpro.com/checkout",
```

---

<div class="post-metadata">

**Author:** ![anthonybartczak](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/anthonybartczak/32/2430_2.png) [@anthonybartczak](https://community.piwik.pro/u/anthonybartczak)\
**Post date:** [November 8, 2024, 9:09am UTC](https://community.piwik.pro/t/issues-with-sgtm-piwik-pro-tags/4601/11 "2024-11-08T09:09:28Z")

</div>

@Alin FYI the event type issue should be fixed now

---

<div class="post-metadata">

**Author:** ![Alin](https://dub1.discourse-cdn.com/flex005/user_avatar/community.piwik.pro/alin/32/3870_2.png) [@Alin](https://community.piwik.pro/u/Alin)\
**Post date:** [November 8, 2024, 10:25am UTC](https://community.piwik.pro/t/issues-with-sgtm-piwik-pro-tags/4601/12 "2024-11-08T10:25:36Z")

</div>

Thanks, @anthonybartczak for the update.

I will take a look.
