Please note that this is the help section for the former Newsletter2Go software.

How Can I Combine the Conversion Tracking With Google Tag Manager?

You can combine conversion tracking with Google Tag Manager. 

Google Tag Manager passes parameters directly to the javascript snippet, which starts the conversion. If you want to use conversion tracking with the Google Tag Manager, follow these steps:

  1. Create two parameters (previously known as macros), which include the value of the dataLayer-parameter ecommerce.purchase.actionField (in our example we’ll use the parameter transaction) as well as ecommerce.purchase.products (parameter items). You can check out the documentation here.
  2. Create a trigger (previously, rule), which will be triggered on the landing page (for example the confirmation page after making a purchase)
  3. Create a tag with Google Tag Manager, which will be triggered according to the rule in the second step. It should include the following information: 
  4. <script id="n2g_script">
        !function(e,t,n,c,r,a,i){e.Newsletter2GoTrackingObject=r,e[r]=e[r]||function(){(e[r].q=e[r].q||[]).push(arguments)},e[r].l=1*new Date,a=t.createElement(n),i=t.getElementsByTagName(n)[0],a.async=1,a.src=c,i.parentNode.insertBefore(a,i)}(window,document,"script","https://static.newsletter2go.com/utils.js","n2g");
    
    
        var transaction = ecommerce.purchase.actionField;
        var items = ecommerce.purchase.products;
    
    
        n2g('create', 'Ihre ID');
        n2g('ecommerce:addTransaction', transaction);
        for(var i = 0; i < items.length; i++){
            items[i].sku = items[i].id;
            items[i].id = transaction.id;
            n2g('ecommerce:addItem', items[i]);
        }
    
    
        n2g('ecommerce:send');
        
    </script>
    	
    1. Embed the conversion tracking JavaScript-Snippet on the landing page. Please replace the part Your ID with your account ID, which you’ll find under Email Settings > Tracking. You can access your email settings through the drop-down menu at the top right of your screen.

  5. Now activate the tag.

Check out more details about conversion tracking here.