◂ Back to 'Reports'

How can I use Newsletter2Go conversion tracking with Google Tag Manager?

In order to use conversion tracking with the Google Tag Manager, the latter must be set up with the following settings/changes.

1. Create a variable (formerly Makro), which contains the value of the dataLayer Variable “ecommerce.purchase.products” according to the documentation (https://developers.google.com/tag-manager/enhanced-ecommerce#purchases).
2. Create a trigger (formerly a rule), which is triggered on the thankyou page of the shopping basket.
3. Create a tag containing the following code in Google Tag Manager that is fired when the rule from step 2 is triggered:

<script type=”text/javascript” src=”https://www.newsletter2go.de/pr/conversion/nl2goconversion.js?4784b8“></script>
<script>
products = {{products}};
var options = new Object();
options.product = new Array();
for (var i = 0; i < products.length; i++) {
var product = new Object();
product.name = products[i].brand + ‘ ‘ + products[i].name;
product.number = products[i].quantity;
product.amount = products[i].price * products[i].quantity;
product.description = myproducts[i].brand + ‘ ‘ + products[i].name;
options.product.push(product);
}
nl2goconversion(options);

4. Publish the tag.

Newsletter2go verwendet Cookies, um Ihnen den bestmöglichen Service zu gewährleisten. Wenn Sie auf der Seite weitersurfen stimmen Sie der Cookie-Nutzung zu. Ich stimme zu.