1. Help Center
  2. Website Integration Help
  3. Tracking Conversions and Remarketing Events

How to install our Enhanced Conversion Tracking & Dynamic Remarketing scripts on an unsupported platform

Even if you are not on one of our supported platforms, you can still use our container by adding the following datalayer events to your website.

This article provides Javascript snippets that you can install on your website. These scripts push data to the Google Tag Manager datalayer, and can be used with our standard Google Tag Manager container to support a range of dynamic remarketing and conversion tracking scenarios and platforms.

Homepage

<!-- FeedOps Dynamic Remarketing -->

<!-- CODE SETTINGS START -->

<script>

dataLayer.push({

      'event': 'DynamicRemarketing',

     'ecomm_pagetype': 'home'
});

</script>

<!-- FeedOps Dynamic Remarketing Page →


Product Page

Whenever a product page is viewed, you should execute the following code.

<!-- FeedOps Dynamic Remarketing -->

<!-- CODE SETTINGS START -->

<script>

dataLayer.push({

      'event': 'DynamicRemarketing',

     'ecomm_pagetype': 'product',

     'ecomm_totalvalue': 123.45, //should be the product price, for anything that requires explanation (e.g. this should include any GST / VAT) Note: as long as it is a valid javascript.

     'currency': 'AUD', // should be the currency of the product

     'ecomm_prodid': ['PD123','PD454'] //should be the product IDs (loop here if more than 1 product)

});

</script>

<!-- FeedOps Dynamic Remarketing Page →

Add to cart button

Your website may have "Add to cart" functionality in multiple locations (e.g. on the product page, on category landing pages etc.). Any time one of these buttons are clicked, you want to record an event.

The following script uses a jquery selector to hook the click event for the add to cart button and push data to the Google Tag Manager datalayer. You will need to replace the button ID / classname according to your site's implementation.

<!-- FeedOps Dynamic Remarketing -->

<!-- CODE SETTINGS START -->

<script>

  document.querySelector('# BUTTON ID OR CLASSNAME').addEventListener('click',function () {

    dataLayer.push({

      'event': 'DynamicRemarketing',

      'ecomm_pagetype': 'cart',

      'ecomm_totalvalue': 104.34, // value of the product

      'currency': 'AUD', // currency value of the product

     'ecomm_prodid': ['122344','234534'] // should be the product IDs (loop here if more than 1 product)

    });

  });

</script>

<!-- FeedOps Dynamic Remarketing Page →


Note: You can find the button ID or classname when you select the “Add to Cart '' button on the page and it is highlighted. You can verify if you have put the correct ID or classname, when you go to “Console” and type this part of the code “document.querySelector('#BUTTON_ID OR .CLASSNAME')”.


Checkout


Place the following code below on your checkout success page. This should only occur after an order is complete, rather than just when the cart is being viewed.

<!-- FeedOps Dynamic Remarketing Purchase Page -->

<script>

  dataLayer.push({

      'event': 'DynamicRemarketing',

      'ecomm_pagetype': 'purchase',

     'ecomm_totalvalue': 123.45, // Cart value for the transaction

      'order_id': '1234556789', // The Order ID for the transaction

      'currency': 'AUD', // The currency for the transaction,

      'user_email': 'abc@abc.com', // Customer’s email address for the transaction

      'user_phone': '+61123456789', // Customer’s phone number for the transaction

      'order_user_first_name': 'Jon', // Customer’s first name

      'order_user_last_name': 'Doe', // Customer’s last name

     'order_shipping_street': 'Easy Street', // Shipping address - street name

     'order_shipping_city': 'Sydney', // Shipping address - city name

     'order_shipping_region': 'Australia', // Shipping address - region/state name

     'order_shipping_postal_code': '2000', // Shipping address - postal/pin code

     'order_shipping_country_code': 'AU', // Shipping address - country code in ISO Alpha 2 - ex: AU, US

     'ecomm_prodid': ['122344','234534'] // should be the product IDs (loop here if more than 1 product)

  });

</script>

<!-- FeedOps - Dynamic Remarketing - Version 2 END -->