Data Layer Variable – Purchased Article List
-
Dear readers,
I have a question regarding a data layer configuration in WooCommerce. Of course I’m using the “Google Tag Manager for WordPress” PlugIn by Thomas Geiger. The basic setup worked fine as usual, but right now I’m struggling with adding a new data layer variable at the check out page.
For this client I’m using a retargeting plattform, which requires 5 different conversion tags (product page, cart page, checkout etc.). On the checkout page the required tag looks like this:
<script src=”https://d.hyj.mobi/conv?cid=xxx&orderId={{OrderID}}&amount={{PurchaseValue}}&products={{ProductID – Checkout}}”></script>
The variable {{ProductID – Checkout}} is configured by myself, but I’m wondering how I can setup a WooCommerce data layer variable, which transfers the purchased product_ids within the Tag Manager PlugIn.
Normally I use Shopware for E-Commerce clients and the configuration of this “articlelist” is quite easy, when using the plugin “Tag Manager” by Webmatch GmbH.
In this plugin I usually configure the variable “articlelist” with the following value:
[{foreach $sBasket.content as $sArticle}{$sArticle.ordernumber|escape}{if !$sArticle@last},{/if}{/foreach}]
Does anybody here have an idea, how I can setup this “articlelist” variable in WooCommerce and then how I can correctly transfer this variable in the Tag Manager Conversion tag?
Thank you very much in advance!
The topic ‘Data Layer Variable – Purchased Article List’ is closed to new replies.