Dear Piwik Community,
I am running into a strange issue when trying to implement the Piwik Pro Tag Manager into an ecommerce site. The dataLayer is set in stone, I cannot change it. Whenever someone checks an item or adds something to the cart, two events fire on the site with different contents in the dataLayer.
Event 1:
Event 2:
As you can see, the event name is the same, but the dataLayer content differs. Now the problem is that a tag set to fire on the “arguments.add_to_cart” event fires on both of these (as expected). I would like to make sure it only fires once. My method was adding an additional parameter to the trigger that fires the tag. I tried with two separate solutions.
Solution 1:
This resulted in the tag not firing at all.
Solution 2:
This resulted in the tag firing twice.
Looking further into the problem, I noticed that while the dataLayer pushes had different content in the two “arguments.add_to_cart” events, while looking at the variables the moment they fired, there were no differences in the value of the variables.
My assumption is that the variables are being looked at globally by Piwik and not on an event-by-event basis. Do you have any recommendations on limiting the firing of the tag to only “Event 2” in my case?
Thank you in advance!